Documentation |
There are two types of boundaries:
Boundaries between the interior of the region and the exterior of the region
Boundaries between subdomains—these are boundaries in the interior of the region
Boundary conditions, either Dirichlet or generalized Neumann, apply only to boundaries between the interior and exterior of the region. This is because the toolbox formulation uses the weak form of PDEs; see Finite Element Method (FEM) Basics. In the weak formulation you do not specify boundary conditions between subdomains, even if coefficients are discontinuous between subdomains. So Partial Differential Equation Toolbox™ does not support defining boundary conditions on subdomain boundaries.
For example, look at a rectangular region with a circular subdomain. The red numbers are the subdomain labels, the black numbers are the edge segment labels.
You need not give boundary conditions on segments 5, 6, 7, and 8, because these are subdomain boundaries, not exterior boundaries.
However, if the circle is a hole, meaning it is not part of the region, then you do give boundary conditions on segments 5, 6, 7, and 8. For an example, see Scalar PDE Functional Form and Calling Syntax.