61 return std::make_tuple(
121 aPair.father->Resize(
mesh->NumCell(), others...);
122 aPair.son->Resize(
mesh->NumCellGhost(), others...);
138 aPair.father->Resize(
mesh->NumFace(), others...);
139 aPair.son->Resize(
mesh->NumFaceGhost(), others...);
163 template <
int nVarsFixed = 1>
169 template <
int nVarsFixed,
int dim>
261 if (!
mesh->isPeriodic)
285 if (!
mesh->isPeriodic)
292 if (
if2c == 1 && Geom ::FaceIDIsPeriodicMain(
faceID))
303 if (!
mesh->isPeriodic)
310 if (
if2c == 1 && Geom ::FaceIDIsPeriodicMain(
faceID))
323 if (!
mesh->isPeriodic)
343 if (!
mesh->isPeriodic)
363 if (!
mesh->isPeriodic)
403 for (
int i = 0; i <
e.GetNumVertices(); i++)
404 for (
int j = 0;
j < i;
j++)
422 template <DeviceBackend B>
425 template <DeviceBackend B>
428 template <DeviceBackend B>
Free-function DOF array builders extracted from FiniteVolume.
Device memory abstraction layer with backend-specific storage and factory creation.
CRTP mixin that provides uniform to_device/to_host/device/getDeviceArrayBytes for classes that enumer...
Assertion / error-handling macros and supporting helper functions.
#define DNDS_assert(expr)
Debug-only assertion (compiled out when DNDS_NDEBUG is defined). Prints the expression + file/line + ...
#define DNDS_MAKE_1_MEMBER_REF(x)
Construct a MemberRef capturing x and its stringified name.
DNDS_DEVICE_CALLABLE int getDim()
DNDS_DEVICE_CALLABLE bool CellIsFaceBack(index iCell, index iFace) const
DNDS_DEVICE_CALLABLE index CellFaceOther(index iCell, index iFace) const
void ConstructCellSmoothScale()
Geom::tPoint GetFaceNormFromCell(index iFace, index iCell, rowsize if2c, int iG)
void parseSettings(FiniteVolumeSettings::json &j)
t3VecsPair faceUnitNorm
constructed using ConstructMetrics()
real GetFaceParamArea(index iFace) const
t3VecPair faceMeanNorm
constructed using ConstructMetrics()
Geom::Elem::Quadrature GetFaceQuad(index iFace) const
t3MatPair cellMajorCoord
constructed using ConstructMetrics()
real GetCellMaxLenScale(index iCell)
void BuildUGradD(tUGrad< nVarsFixed, dim > &u, int nVars, bool buildSon=true, bool buildTrans=true, Geom::MeshLoc varloc=Geom::MeshLoc::Cell)
int GetCellOrder(index iCell)
tRecAtrPair faceAtr
constructed using ConstructMetrics()
void MakePairDefaultOnFace(TArrayPair &aPair, const std::string &name, TOthers... others)
make pair with default MPI type, match face layout
t3VecPair cellBary
constructed using ConstructMetrics()
Geom::tPoint GetCellBary(index iCell)
void for_each_device_member(F &&f)
t3VecPair cellCent
constructed using ConstructMetrics()
Geom::Elem::Quadrature GetFaceQuadO1(index iFace) const
Geom::tPoint GetCellQuadraturePPhys(index iCell, int iG)
void ConstructFaceIntPPhysics()
Geom::tPoint GetOtherCellBaryFromCell(index iCell, index iCellOther, index iFace)
real GetCellNodeMinLenScale(index iCell)
ssp< Geom::UnstructuredMesh > mesh
Geom::tPoint GetFaceQuadraturePPhys(index iFace, int iG)
index CellFaceOther(index iCell, index iFace) const
tCoeffPair faceIntJacobiDet
constructed using ConstructMetrics()
real GetCellSmoothScaleRatio(index iCell) const
tCoeffPair cellIntJacobiDet
constructed using ConstructMetrics()
Geom::Elem::Quadrature GetCellQuad(index iCell) const
void ConstructCellAlignedHBox()
t3MatPair cellInertia
constructed using ConstructMetrics()
Geom::tPoint GetFaceNorm(index iFace, int iG) const
const FiniteVolumeSettings & getSettings() const
t3VecsPair faceIntPPhysics
constructed using ConstructMetrics()
real GetCellVol(index iCell) const
void ConstructCellIntJacobiDet()
bool CellIsFaceBack(index iCell, index iFace) const
real GetFaceJacobiDet(index iFace, rowsize iG)
Geom::tPoint GetFaceQuadraturePPhysFromCell(index iFace, index iCell, rowsize if2c, int iG)
int SetAxisSymmetric(int v)
void BuildUDof(tUDof< nVarsFixed > &u, int nVars, bool buildSon=true, bool buildTrans=true, Geom::MeshLoc varloc=Geom::MeshLoc::Cell)
void ConstructCellMajorHBoxCoordInertia()
tScalarPair faceArea
constructed using ConstructMetrics()
std::set< index > axisFaces
FiniteVolumeSettings settings
FiniteVolumeDeviceView< B > t_deviceView
Geom::Elem::Quadrature GetCellQuadO1(index iCell) const
t3VecPair faceCent
constructed using ConstructMetrics()
void MakePairDefaultOnCell(TArrayPair &aPair, const std::string &name, TOthers... others)
make pair with default MPI type, match cell layout
real GetFaceArea(index iFace) const
t3VecPair cellMajorHBox
constructed using ConstructMetrics()
tRecAtrPair cellAtr
constructed using ConstructMetrics()
Geom::tPoint GetFacePointFromCell(index iFace, index iCell, rowsize if2c, const Geom::tPoint &pnt)
void ConstructCellVolume()
Geom::Base::CFVPeriodicity periodicity
real GetGlobalVol() const
FiniteVolume(MPIInfo nMpi, ssp< Geom::UnstructuredMesh > nMesh)
real GetCellJacobiDet(index iCell, rowsize iG)
real GetCellParamVol(index iCell) const
t3VecsPair cellIntPPhysics
constructed using ConstructMetrics()
t_deviceView< B > deviceView()
tScalarPair cellSmoothScale
constructed using ConstructMetrics()
void ConstructCellIntPPhysics()
int GetAxisSymmetric() const
t3VecPair cellAlignedHBox
constructed using ConstructMetrics()
tScalarPair volumeLocal
constructed using ConstructMetrics()
void ConstructFaceIntJacobiDet()
Geom::tPoint GetOtherCellPointFromCell(index iCell, index iCellOther, index iFace, const Geom::tPoint &pnt)
void ConstructFaceUnitNorm()
RecAtr & GetFaceAtr(index iFace)
RecAtr & GetCellAtr(index iCell)
Geom::tGPoint GetOtherCellInertiaFromCell(index iCell, index iCellOther, index iFace)
auto device_array_list()
constructed using ConstructMetrics()
void ConstructFaceMeanNorm()
CRTP mixin giving a class uniform to_device / to_host / device / getDeviceArrayBytes methods.
index getDeviceArrayBytes()
Total footprint of every registered father+son pair in bytes.
void BuildUGradDOnMesh(tUGrad< nVarsFixed, dim > &u, const std::string &name, const MPIInfo &mpi, const ssp< Geom::UnstructuredMesh > &mesh, int nVars, bool buildSon=true, bool buildTrans=true, Geom::MeshLoc varloc=Geom::MeshLoc::Cell)
Build a gradient DOF array pair matching a mesh location.
void BuildUDofOnMesh(tUDof< nVarsFixed > &u, const std::string &name, const MPIInfo &mpi, const ssp< Geom::UnstructuredMesh > &mesh, int nVars, bool buildSon=true, bool buildTrans=true, Geom::MeshLoc varloc=Geom::MeshLoc::Cell)
Build a DOF array pair matching a mesh location (cell/face/node).
Eigen::Matrix< real, 3, Eigen::Dynamic > tSmallCoords
DNDS_DEVICE_CALLABLE bool FaceIDIsPeriodic(t_index id)
DNDS_DEVICE_CALLABLE bool FaceIDIsPeriodicDonor(t_index id)
DNDS_DEVICE_CALLABLE bool FaceIDIsPeriodicMain(t_index id)
void AllreduceOneIndex(index &v, MPI_Op op, const MPIInfo &mpi)
Single-scalar Allreduce helper for indices (in-place, count = 1).
DeviceBackend
Enumerates the backends a DeviceStorage / Array can live on.
@ Unknown
Unset / sentinel.
DNDS_CONSTANT const index UnInitIndex
Sentinel "not initialised" index value (= INT64_MIN).
int32_t rowsize
Row-width / per-row element-count type (signed 32-bit).
int64_t index
Global row / DOF index type (signed 64-bit; handles multi-billion-cell meshes).
void for_each_member_list(TList &&obj_member_list, F &&f)
Invoke f(member) for every element of a std::tuple of members.
double real
Canonical floating-point scalar used throughout DNDSR (double precision).
DNDS_CONSTANT const real veryLargeReal
Catch-all upper bound ("practically infinity") for physical scalars.
int MPI_int
MPI counterpart type for MPI_int (= C int). Used for counts and ranks in MPI calls.
A means to translate nlohmann json into c++ primitive data types and back; and stores then during com...
nlohmann::ordered_json json
DNDS_HOST void ParseFromJson(const json &jsonSetting)
Backward-compatible read (used by Python bindings and VRSettings).
Lightweight bundle of an MPI communicator and the calling rank's coordinates.
Eigen::Matrix< real, 5, 1 > v