dirichlet
intsharp/boundary.py
Dirichlet (fixed value) boundary conditions
Supports: 1D and 2D (selected automatically based on domain)
1D
Sets the field value at the two boundaries:
\[ f_0 = v_L, \qquad f_{N-1} = v_R \]
where \( v_L \) is the value at the left boundary and \( v_R \) at the right.
2D
The same two values apply to all four edges:
- Left edge (x = 0): \( f_{i,0} = v_L \)
- Right edge (x = L): \( f_{i,-1} = v_R \)
- Bottom edge (y = 0): \( f_{0,j} = v_L \)
- Top edge (y = L): \( f_{-1,j} = v_R \)
value_left is used for the “min” boundaries (left, bottom); value_right for the “max” boundaries (right, top).
YAML
boundary:
type: dirichlet
value_left: 0.0
value_right: 1.0