|
core 1.5.0
Shared MPI block decomposition, asynchronous ghost-layer exchange, SDF geometry, load balancing (header-only C++20)
|
A box resolved by a regular cell grid. More...
#include <domain.hpp>
Public Member Functions | |
| UniformGrid ()=default | |
| UniformGrid (const IVec< Dim > &c, const Box< Dim > &b) | |
| const Vec< Dim > & | length () const |
| const Vec< Dim > & | origin () const |
| bool | periodic (int axis) const |
| const IVec< Dim > & | resolution () const |
| Vec< Dim > | spacing () const |
| Cell size per axis: length / cells. | |
| Real | minSpacing () const |
| The smallest cell size — the reference length the solvers non-dimensionalise with. | |
| bool | isIsotropic (Real tol=1e-12) const |
True when every axis has the same cell size to within tol relative. | |
| Index | numCells () const |
| Real | cellVolume () const |
| Vec< Dim > | cellCentre (const IVec< Dim > &idx) const |
Physical centre of cell idx: origin + (idx + 1/2) * h. | |
| Vec< Dim > | faceCentre (int axis, const IVec< Dim > &idx) const |
Physical centre of the axis-normal face at index idx (MAC staggering): the face coordinate is on the node in axis and cell-centred in the other axes. | |
| Vec< Dim > | nodePosition (const IVec< Dim > &idx) const |
Physical position of grid node idx (cell corner): origin + idx * h. | |
| Vec< Dim > | indexOf (const Vec< Dim > &p) const |
| Continuous index coordinate of a physical point: xi = (p - origin) / h. | |
| Vec< Dim > | physicalOf (const Vec< Dim > &xi) const |
Physical point of a continuous index coordinate: p = origin + xi * h. Inverse of indexOf. | |
| IVec< Dim > | cellOf (const Vec< Dim > &p) const |
Index of the cell containing p (floor of the continuous index). No bounds check. | |
| bool | contains (const Vec< Dim > &p) const |
| Vec< Dim > | wrap (const Vec< Dim > &p) const |
| Vec< Dim > | minImage (const Vec< Dim > &a, const Vec< Dim > &b) const |
Static Public Member Functions | |
| static UniformGrid | cellUnits (const IVec< Dim > &c, const std::array< bool, Dim > &per={}) |
| The historical cell-unit grid: extent == cells, origin 0, spacing exactly 1. | |
| static constexpr int | dim () |
Public Attributes | |
| Box< Dim > | box {} |
| IVec< Dim > | cells {} |
A box resolved by a regular cell grid.
Satisfies Domain plus resolution().
Constructed from cells + a box; spacing() is derived. UniformGrid::cellUnits(cells) builds the historical "cell units" grid (extent == cells, origin 0, spacing 1) that peclet solvers used before physical domains existed.
Definition at line 107 of file domain.hpp.
|
default |
|
inline |
Definition at line 112 of file domain.hpp.
|
inlinestatic |
The historical cell-unit grid: extent == cells, origin 0, spacing exactly 1.
Definition at line 115 of file domain.hpp.
|
inlinestaticconstexpr |
Definition at line 126 of file domain.hpp.
Definition at line 127 of file domain.hpp.
References peclet::core::UniformGrid< Dim >::box.
Definition at line 128 of file domain.hpp.
References peclet::core::UniformGrid< Dim >::box.
|
inline |
Definition at line 129 of file domain.hpp.
References peclet::core::UniformGrid< Dim >::box.
|
inline |
Definition at line 130 of file domain.hpp.
References peclet::core::UniformGrid< Dim >::cells.
|
inline |
Cell size per axis: length / cells.
Zero cells on an axis yields 0 (degenerate; callers check).
Definition at line 134 of file domain.hpp.
References peclet::core::UniformGrid< Dim >::box, and peclet::core::UniformGrid< Dim >::cells.
Referenced by peclet::core::UniformGrid< Dim >::cellCentre(), peclet::core::UniformGrid< Dim >::cellVolume(), peclet::core::UniformGrid< Dim >::faceCentre(), peclet::core::UniformGrid< Dim >::indexOf(), peclet::core::UniformGrid< Dim >::isIsotropic(), peclet::core::UniformGrid< Dim >::minSpacing(), peclet::core::UniformGrid< Dim >::nodePosition(), and peclet::core::UniformGrid< Dim >::physicalOf().
|
inline |
The smallest cell size — the reference length the solvers non-dimensionalise with.
Definition at line 142 of file domain.hpp.
References peclet::core::UniformGrid< Dim >::spacing().
|
inline |
True when every axis has the same cell size to within tol relative.
Definition at line 151 of file domain.hpp.
References peclet::core::UniformGrid< Dim >::spacing().
|
inline |
Definition at line 162 of file domain.hpp.
References peclet::core::UniformGrid< Dim >::cells.
|
inline |
Definition at line 169 of file domain.hpp.
References peclet::core::UniformGrid< Dim >::spacing().
|
inline |
Physical centre of cell idx: origin + (idx + 1/2) * h.
Definition at line 178 of file domain.hpp.
References peclet::core::UniformGrid< Dim >::box, and peclet::core::UniformGrid< Dim >::spacing().
|
inline |
Physical centre of the axis-normal face at index idx (MAC staggering): the face coordinate is on the node in axis and cell-centred in the other axes.
Definition at line 188 of file domain.hpp.
References peclet::core::UniformGrid< Dim >::box, and peclet::core::UniformGrid< Dim >::spacing().
|
inline |
Physical position of grid node idx (cell corner): origin + idx * h.
Definition at line 199 of file domain.hpp.
References peclet::core::UniformGrid< Dim >::box, and peclet::core::UniformGrid< Dim >::spacing().
|
inline |
Continuous index coordinate of a physical point: xi = (p - origin) / h.
The inverse of physicalOf; cell centre (i+1/2) maps back to itself.
Definition at line 209 of file domain.hpp.
References peclet::core::UniformGrid< Dim >::box, and peclet::core::UniformGrid< Dim >::spacing().
Referenced by peclet::core::UniformGrid< Dim >::cellOf().
|
inline |
Physical point of a continuous index coordinate: p = origin + xi * h. Inverse of indexOf.
Definition at line 218 of file domain.hpp.
References peclet::core::UniformGrid< Dim >::box, and peclet::core::UniformGrid< Dim >::spacing().
|
inline |
Index of the cell containing p (floor of the continuous index). No bounds check.
Definition at line 227 of file domain.hpp.
References peclet::core::UniformGrid< Dim >::indexOf().
|
inline |
Definition at line 235 of file domain.hpp.
References peclet::core::UniformGrid< Dim >::box.
|
inline |
Definition at line 236 of file domain.hpp.
References peclet::core::UniformGrid< Dim >::box.
|
inline |
Definition at line 237 of file domain.hpp.
References peclet::core::UniformGrid< Dim >::box.
| Box<Dim> peclet::core::UniformGrid< Dim >::box {} |
Definition at line 108 of file domain.hpp.
Referenced by peclet::core::UniformGrid< Dim >::cellCentre(), peclet::core::UniformGrid< Dim >::contains(), peclet::core::UniformGrid< Dim >::faceCentre(), peclet::core::UniformGrid< Dim >::indexOf(), peclet::core::UniformGrid< Dim >::length(), peclet::core::UniformGrid< Dim >::minImage(), peclet::core::UniformGrid< Dim >::nodePosition(), peclet::core::UniformGrid< Dim >::origin(), peclet::core::UniformGrid< Dim >::periodic(), peclet::core::UniformGrid< Dim >::physicalOf(), peclet::core::UniformGrid< Dim >::spacing(), and peclet::core::UniformGrid< Dim >::wrap().
| IVec<Dim> peclet::core::UniformGrid< Dim >::cells {} |
Definition at line 109 of file domain.hpp.
Referenced by peclet::core::UniformGrid< Dim >::numCells(), peclet::core::UniformGrid< Dim >::resolution(), and peclet::core::UniformGrid< Dim >::spacing().