periodic
intsharp/boundary.py
Periodic boundary conditions
Supports: 1D and 2D (selected automatically based on domain)
1D
Values wrap around the interval:
\[ f_{-1} = f_{N-1}, \qquad f_N = f_0 \]
Implemented via np.roll in the solver.
2D
Values wrap in both directions (toroidal domain):
- x: left edge connects to right edge, right to left
- y: bottom edge connects to top edge, top to bottom
Implemented via np.roll along each axis in the 2D solver.
YAML
boundary:
type: periodic
No extra parameters; same for 1D and 2D.