---
title: Wachspress-Based Transfinite Formulation
url: https://www.emergentmind.com/topics/wachspress-based-transfinite-formulation
type: topic
---

# Wachspress-Based Transfinite Formulation

A Wachspress-based transfinite formulation is a geometric and analytic framework for exactly enforcing Dirichlet boundary conditions in physics-informed neural networks (PINNs) and the deep Ritz method, specifically on convex polygonal domains. It leverages Wachspress coordinates—generalized barycentric coordinates for convex $n$-gons—and transfinite interpolation, providing a mechanism for lifting prescribed boundary data into the interior of convex polygons. This approach generates kinematically admissible trial functions whose Laplacian remains bounded throughout the domain, thereby overcoming the singularity pathologies present in previous methods based on distance functions, and offering robust accuracy for both forward and inverse problems in elliptic partial differential equations [2601.01756].

## 1. Wachspress Coordinates for Convex Polygons

Given a convex polygon $P \subset \mathbb{R}^2$ with $n$ vertices $v_1,\ldots,v_n$ and edges $E_i = \operatorname{conv}(v_i, v_{i+1})$, Wachspress coordinates $\lambda_i(\mathbf{x})$ generalize barycentric coordinates from triangles to $n$-gons. For a point $\mathbf{x} \in \overline{P}$, the three-point formula is
$$
w_i(\mathbf{x}) = \frac{A(v_{i-1}, v_i, v_{i+1})}{A(v_{i-1}, v_i, \mathbf{x})\,A(v_i, v_{i+1}, \mathbf{x})},
$$
$$
\lambda_i(\mathbf{x}) = \frac{w_i(\mathbf{x})}{\sum_{j=1}^n w_j(\mathbf{x})},
$$
where $A(a,b,c)$ denotes the signed area of triangle $(a,b,c)$. These coordinates satisfy $\lambda_i \ge 0$, $\sum_i \lambda_i = 1$, and the mean-value property $\sum_i \lambda_i v_i = \mathbf{x}$. Wachspress coordinates provide a smooth ($C^\infty$) geometric feature map and encode the boundary-edge structure of the polygon, which is essential for neural network input representations and the imposition of boundary conditions [2601.01756].

## 2. Construction of Transfinite Interpolants

For each edge $E_i$ of $P$, let $\tilde{\alpha}_i : E_i \to \mathbb{R}$ be the prescribed boundary function. On $E_i$, only $\lambda_i$ and $\lambda_{i+1}$ are nonzero, allowing $\tilde{\alpha}_i$ to be reparametrized as $\alpha_i(\lambda_{i+1})$. The transfinite interpolant lifts the vector of boundary data into the interior via
$$
g(\bm{\lambda}) = \sum_{i=1}^n \lambda_i \left[ \alpha_i(\lambda_{i+1}) + \alpha_{i-1}(1-\lambda_{i-1}) - \alpha_i(0) \right].
$$
This interpolant is continuous, satisfies $g|_{\partial P} = \tilde{B}$, and can be written more generally in terms of faces and projections:
$$
g(\bm{\lambda}) = \sum_{i=1}^n \lambda_i \sum_{\Pi \in \mathcal{G}(i)} (-1)^{\dim\Pi+1} B(\mathbb{P}_{\Pi, v_i}(\bm{\lambda})),
$$
where $\mathcal{G}(i)$ is the set of faces incident to $v_i$, $B$ the boundary function, and $\mathbb{P}_{\Pi, v_i}$ the projection onto face $\Pi$. This construction extends bilinear Coons transfinite interpolation and Boolean-sum blending from rectangles to general convex polygons [2601.01756].

## 3. Formulation of Neural-Network Trial Functions

Let $N(\mathbf{x};\theta)$ denote the neural network output without boundary conditioning. The Wachspress-based transfinite formulation defines the trial function as
$$
u_N(\mathbf{x}) = g(\mathbf{x}) + [N(\mathbf{x};\theta) - L(N(\cdot;\theta))(\mathbf{x})],
$$
where $L[\cdot] \equiv g(\cdot)$ is the transfinite lifting operator. On $\partial P$, $L(N) = N$, forcing $u_N|_{\partial P} = g = N|_{\partial P} = \tilde{B}$, and exactly enforcing the Dirichlet data (“hard constraint”). The boundedness and smoothness ($H^2(P)$ regularity) of $u_N$ is ensured by the properties of Wachspress coordinates, avoiding the singular-Laplacian pathology of previous distance-function approaches [2601.01756].

## 4. Implementation Methodology

### Geometric Feature Map
Each interior (or boundary) collocation point $\mathbf{x} \in \overline{P}$ is mapped to Wachspress coordinates $\bm{\lambda}(\mathbf{x}) \in [0,1]^n$, which serve as input features to a fully connected neural network with activation functions (e.g., $\tanh$) in the hidden layers and a linear output.

### Loss Functions
- **PINN Collocation:** The loss over $M$ interior points $\{\mathbf{x}_k\}$ is
  $$
  \mathcal{L}(\theta) = \frac{1}{M} \sum_{k=1}^{M} [\Delta u_N(\mathbf{x}_k) - f(\mathbf{x}_k)]^2,
  $$
  with no explicit boundary term required.

- **Deep Ritz (Variational):** The loss functional (energy minimization) is
  $$
  \mathcal{L}(\theta) = \int_P \frac{1}{2} |\nabla u_N|^2\,dx - \int_P f\,u_N\,dx,
  $$
  evaluated by quadrature over mesh or unstructured points. Kinematic admissibility permits the use of the exact Dirichlet energy [2601.01756].

## 5. Generalizations and Numerical Evidence

On rectangles, Wachspress coordinates reduce to standard bilinear finite-element shape functions and the blended transfinite interpolant coincides with the classical Coons patch. For convex $n$-gons, the Boolean-sum blending generalizes this property. The formulation offers extensibility to new convex geometries and different barycentric coordinate systems (e.g., mean-value) by substituting accordingly in the scheme.

Experimental results on squares, quadrilaterals, pentagons, and parametrized quadrilateral families $Q_p$ demonstrate robust training even near vertices. Typical maximum pointwise errors in $u$ and $\nabla u$ are $10^{-6}$ to $10^{-4}$, outperforming earlier distance-function-based methods. Inverse heat-conduction examples achieved accurate recovery of linear source terms to $0.5\%$ error using only data and PDE losses, with no explicit boundary penalty. Parametric neural networks trained over $(x, y, p)$ solved the Poisson equation for all $p \in [0,1]$ with $\mathcal{O}(10^{-6})$ error [2601.01756].

## 6. Algorithmic Workflow

### Stepwise Procedure

| Step | Operation | Output |
|------|-----------|--------|
| 1    | Precompute Wachspress weights $w_i(\mathbf{x})$ and normalized coordinates $\lambda_i(\mathbf{x})$ | $\{\lambda_i(\mathbf{x})\}_{i=1}^n$ |
| 2    | Form transfinite lift $g(\bm{\lambda})$ | $g(\bm{\lambda})$ |
| 3    | Define trial ansatz $u_N(\bm{\lambda})$ | $u_N(\bm{\lambda})$ |
| 4    | Assemble the appropriate loss function for PINN or Ritz | $\mathcal{L}(\theta)$ |
| 5    | Optimize network parameters (Adam $\to$ L-BFGS) | Converged $\theta$ |
| 6    | Evaluate $u_N(\mathbf{x})$ at test points | Solution assessment |

This algorithm supports rapid extension to arbitrary convex polygonal domains and diverse boundary data. Substituting alternate barycentric coordinate schemes further generalizes the approach.

## 7. Significance and Applications

The Wachspress-based transfinite formulation establishes a rigorous, mesh-independent technique for enforcing boundary conditions in neural network solvers for PDEs. Its applicability spans forward, inverse, and parametrized boundary-value problems, with empirical superiority in accuracy and regularity over prior distance-function-based methods. The underlying mathematical structure facilitates direct extension to physics-informed machine learning for general convex geometries, and is compatible with recent advances in geometric design, interpolation theory, and functional analysis [2601.01756].

Source: https://www.emergentmind.com/topics/wachspress-based-transfinite-formulation