---
kind: concept
slug: domain-decomposition
title: Domain decomposition
summary: >-
  Splitting the solution domain of a physics-informed network into subdomains, each with its own small network, and enforcing agreement of field values and fluxes across shared edges with weighted penalty terms. It helps when material properties jump across the domain and one network struggles at the sharp borders. Only one paper so far, and its results are author-reported.
tags: [pinn, domain-decomposition, cpinn, interface-conditions, linear-elasticity, micromechanics]
papers: ["2110.07374"]
related: [physics-informed-neural-network, adaptive-collocation-sampling, gradient-clipping, finite-element-method]
status: draft
updated_at: 2026-11-08
---

## Overview

A single physics-informed network uses one global function for the whole
domain. For a material with sharp phase transitions, the largest errors appear
at those transitions, and the gradients near them can become hard to optimise
[arxiv:2110.07374 §3] [arxiv:2110.07374 §5.1]. Domain decomposition answers
this by cutting the domain into subdomains and giving each one its own network.
The networks are coupled by interface terms that require neighbouring
subdomains to agree on displacement and traction across their shared edge
[arxiv:2110.07374 §5.2].

The invariant the variants share is that the local equations hold inside each
subdomain, and the solution is continuous across the interfaces. The paper
calls its version a conservative PINN (cPINN), in the sense of Jagtap,
Kharazmi and Karniadakis (2020), which has no card here [arxiv:2110.07374 §5.2].

## Variants

### Whole-domain PINN (no decomposition)

One network covers the entire domain. It is the baseline against which the
split versions are compared. In the paper's convergence study it reaches a
mean residual of 1.49 x 10^-1 in the split comparison, against 1.22 x 10^-1
for the 4x4 cPINN [arxiv:2110.07374 fig. 10]. Card:
[Physics informed neural networks for continuum micromechanics](/papers/2110.07374).

### Conservative PINN (cPINN) on a regular grid

The domain is split into a regular grid of subdomains, each with its own
fully connected network. Each subdomain keeps the local residual loss. The
interface terms add, for each shared edge, squared differences of the
displacement components and of the stress components that carry the traction
across that edge [arxiv:2110.07374 §5.2]. The paper uses a 4x4 split, with
weight ψ = 20 on the interface terms [arxiv:2110.07374 §5.3]. Card:
[Physics informed neural networks for continuum micromechanics](/papers/2110.07374).

The paper tests grids from 1x1 to 5x5 and reports that the 5x5 split has a
higher mean residual than the 4x4 split. Its explanation is that each extra
subnetwork adds interface terms that make the loss harder to optimise
[arxiv:2110.07374 fig. 10] [arxiv:2110.07374 §5.3].

### Subdomain networks with adapted boundary constraints

Subnetworks that share part of the outer boundary need hard boundary
constraints adapted to that case, and the paper states this as a requirement
[arxiv:2110.07374 §5.2]. The same paper applies its 4x4 cPINN to a
micro-CT slice of a composite, with 90 units per subnetwork [arxiv:2110.07374
§6.2.2]. The release does not include the CT data, so this case cannot be
rerun from the code [arxiv:2110.07374 §6.1]. All of the paper's results are
author-reported.

## When to use which

| Situation | Use | Why |
|---|---|---|
| Homogeneous material, a single network already fits | Whole-domain PINN | The paper solves its homogeneous plate with one network and reports no split comparison for it [arxiv:2110.07374 §4.3.1] |
| Sharp material jump, errors concentrated at the jump | cPINN on a regular grid, starting around 4x4 | The paper uses 4x4 as its best trade-off in the split study, and reports 5x5 as worse than 4x4 [arxiv:2110.07374 §5.3] [arxiv:2110.07374 fig. 10] |
| Many subdomains or heavy interface coupling | Fewer, larger subdomains, or measure the split count | Extra interfaces add loss terms that the paper says make optimisation harder [arxiv:2110.07374 §5.3] |
| Need to fix error at a jump by sampling more points instead | Compare with [adaptive collocation](/concepts/adaptive-collocation-sampling) | In the paper, adaptive collocation did not converge from 64^2 points upwards [arxiv:2110.07374 §5.3] |
| Subdomains share an outer boundary | Adapt the boundary constraints per case | The paper says the hard constraints must be rebuilt for those cases [arxiv:2110.07374 §5.2] |

The paper's evidence is one problem family: 2D linear elastostatics on a
square with a stiff inclusion, plus a micro-CT slice [arxiv:2110.07374 §4.3]
[arxiv:2110.07374 §6]. Before using the split count or ψ = 20 elsewhere,
check them on your own problem. The paper does not claim they transfer.

## Implementation sketch

Language-agnostic outline of the cPINN loss. Each subdomain has its own
network and a local residual loss; each shared edge adds interface terms once.
The paper leaves open whether a shared edge should be counted once or twice,
and the released code counts it once [arxiv:2110.07374 §5.2]. See
[the card's code notes](/papers/2110.07374).

```pseudocode
# Build a regular split of the square into n_x by n_y subdomains  [§5.3]
# Each subdomain gets its own network  [§5.2]
def build_subdomains(n_x, n_y):
    subdomains = []
    for i in range(n_x):
        for j in range(n_y):
            # Four hidden layers  [§4.3.1]; width is a free choice  [§5.3]
            net = fully_connected(depth=4, width=64 // n_x)
            subdomains.append((net, bounds(i, j)))
    return subdomains
```

```pseudocode
# Total cPINN loss: local residuals plus weighted interface agreement  [§5.2]
# psi = 20 in the paper's experiments  [§5.3]
def cpinn_loss(subdomains, interfaces, psi=20.0):
    total = 0.0
    for net, box in subdomains:
        # Local PDE residual loss inside this subdomain  [§4.1]
        total = total + local_residual_loss(net, box)
    for edge in interfaces:
        # One term per shared edge, counted once  [§5.2]
        a, b = edge.left, edge.right
        if edge.is_horizontal:
            # Displacement u_x and the traction stresses must agree  [§5.2]
            total = total + psi * mse(a.u_x(edge.pts), b.u_x(edge.pts))
            total = total + psi * mse(a.sigma_xx(edge.pts), b.sigma_xx(edge.pts))
            total = total + psi * mse(a.sigma_xy(edge.pts), b.sigma_xy(edge.pts))
        else:
            # Vertical edge: u_y and the other traction components  [§5.2]
            total = total + psi * mse(a.u_y(edge.pts), b.u_y(edge.pts))
            total = total + psi * mse(a.sigma_yy(edge.pts), b.sigma_yy(edge.pts))
            total = total + psi * mse(a.sigma_xy(edge.pts), b.sigma_xy(edge.pts))
    return total
```

Notes on where variants differ. The paper's loss is minimised with full BFGS
rather than Adam [arxiv:2110.07374 §4.1]. Clipping the gradient is used by the
adaptive scheme in the text, and the threshold is not stated
[arxiv:2110.07374 §5.1]. The paper says only that the subnetwork width was
chosen to keep about 13 x 10^3 weights in total [arxiv:2110.07374 §5.3]. The
sketch's width of 64 // n_x is the released code's rule, not a rule the paper
states, see the [card's code notes](/papers/2110.07374).

## Contradictions

- **Size of the cPINN gain.** The text says the 4x4 cPINN reduces the mean
  residual by one quarter relative to the PINN [arxiv:2110.07374 §5.3]. The
  plotted values give 1.22 x 10^-1 against 1.49 x 10^-1, about 18% lower
  [arxiv:2110.07374 fig. 10]. The [card's pitfalls](/papers/2110.07374) advise
  using the figure values.
- **Adaptive PINN versus PINN.** The text says the adaptive PINN is lower
  than the PINN in the first half of the study. The table shows this only at
  16^2 and 32^2 points; at 8^2 the adaptive PINN is higher
  [arxiv:2110.07374 fig. 8]. This is about adaptive collocation, but it
  affects the comparison in the split study.
- **Parameter count for the CT slice.** The paper gives about 2.7 x 10^4
  weights for the CT cPINN [arxiv:2110.07374 §6.2.2]. The card's own count from
  the layer sizes is about 2.5 x 10^4 per subnetwork and about 4 x 10^5 for 16
  subnetworks. The paper does not say which count it means, and the
  [card's pitfalls](/papers/2110.07374) note the gap.

## Papers

- [Physics informed neural networks for continuum micromechanics](/papers/2110.07374): the cPINN with 4x4 subdomains, weighted interface agreement, and the split and adaptive comparisons. Released code is GPL-3.0 and differs from the paper in several settings.
