Geometric Domains
A GeometricDomain describes the physical problem region and nothing else: its bounding box, which points are inside, how boundary points are tagged, which axes are periodic, and which boundary condition belongs to which tag. Numerical padding (ghost layers) and point generation are handled separately when the ParticleGrid is built.
Fields
| Field | Meaning |
|---|---|
mins, maxs | Bounding box of the physical region |
is_periodic::SVector{D,Bool} | Periodicity per axis |
is_interior(x) | true if x lies in the physical region |
get_tag(x) | 0 for interior points, a positive integer boundary tag otherwise |
bc_map::Dict{Int,AbstractBoundaryCondition} | Boundary condition per tag |
Built-in shapes
Rectangular
get_rectangular_domain(T, mins, maxs; bc_map = Dict(), is_periodic = false)is_periodic is either one Bool for all axes or an NTuple{D,Bool}. Tags in 2-D are assigned by the nearest edge: 1 left, 2 right, 3 bottom, 4 top. In 1-D and 3-D every boundary point has tag 1.
Spherical
get_spherical_domain(T, center, radius; bc_map = Dict(), is_periodic = false)A disc (2-D) or ball (3-D); every exterior point gets tag 1.
Point generation
When a ParticleGrid is constructed, the domain is wrapped in a ComputationalDomain, and points are generated as follows:
- Canvas. On non-periodic axes the bounding box is extended by $\lceil R/\Delta x_{\max}\rceil$ spacings on each side to host ghost particles. As soon as any axis is periodic, no padding is added on any axis.
- Lattice. A Cartesian lattice with spacing
nominal_dx(plus optional jitterrandomness) covers the canvas. A non-periodic axis getsround(L/dx) + 1points, endpoints included. A periodic axis getsround(L/dx)points, because the endpoint coincides with the start point after wrapping. - Narrow band. Lattice points outside the physical region are kept only if they lie within $R + \Delta x_{\max}$ of an interior point. These become the boundary (ghost) particles.
- Tags.
get_tagsetstagsandis_boundary = (tag != 0).
Boundary particles carry the boundary condition and are never updated by the spatial scheme; see Boundary Conditions.
Reference
HyperCloudCore.GeometricDomain — Type
GeometricDomain{GEO, D, T, F_Interior, F_Tag}A pure mathematical abstraction representing the physical shape and boundary regions of the problem space.
Fields
label::GEO: The geometric identifier (e.g.,Val(:rectangular)orVal(:spherical)).mins::Space{D, T}: The minimal bounding box coordinates.maxs::Space{D, T}: The maximal bounding box coordinates.is_periodic::SVector{D, Bool}: Periodic boundary flags for each spatial dimension.is_interior::F_Interior: A function evaluating whether a given coordinate resides strictly within the geometry.get_tag::F_Tag: A function generating integer boundary tags based on spatial location.bc_map::Dict{Int, AbstractBoundaryCondition}: A mapping of integer tags to specific boundary condition evaluators.
HyperCloudCore.get_rectangular_domain — Method
get_rectangular_domain(::Type{T}, mins, maxs; bc_map)Generates a rectangular GeometricDomain instance.
- Constructs an interior evaluation function enforcing strict Cartesian bounding box constraints.
- Automatically handles edge tagging in 2D by assigning 1 to Left, 2 to Right, 3 to Bottom, and 4 to Top based on nearest-distance evaluations.
HyperCloudCore.get_spherical_domain — Method
get_spherical_domain(::Type{T}, center, radius; bc_map)Generates a spherical (or circular) GeometricDomain instance.
- Employs a squared-distance interior evaluation against the defined center point and radius.
- Assigns a uniform boundary tag of 1 to all exterior points.