8 template <DeviceBackend B>
16 static_assert(std::is_trivially_copyable_v<FiniteVolumeSettings>);
17 static_assert(std::is_trivially_copyable_v<Geom::UnstructuredMeshDeviceView<B>>);
45 static_assert(std::is_trivially_copyable_v<tScalarPair::t_deviceView<B>>);
46 static_assert(std::is_trivially_copyable_v<tRecAtrPair::t_deviceView<B>>);
47 static_assert(std::is_trivially_copyable_v<tCoeffPair::t_deviceView<B>>);
48 static_assert(std::is_trivially_copyable_v<t3VecsPair::t_deviceView<B>>);
49 static_assert(std::is_trivially_copyable_v<t3VecPair::t_deviceView<B>>);
50 static_assert(std::is_trivially_copyable_v<t3MatPair::t_deviceView<B>>);
55 template <
class TMain>
96 auto e =
mesh.GetFaceElement(iFace);
102 auto e =
mesh.GetFaceElement(iFace);
110 auto e =
mesh.GetCellElement(iCell);
116 auto e =
mesh.GetCellElement(iCell);
126 return mesh.CellIsFaceBack(iCell, iFace);
131 return mesh.CellFaceOther(iCell, iFace);
144 if (!
mesh.isPeriodic)
146 auto faceID =
mesh.faceElemInfo[iFace]->zone;
154 return mesh.periodicInfo.TransVectorBack(
GetFaceNorm(iFace, iG), faceID);
168 if (!
mesh.isPeriodic)
170 auto faceID =
mesh.faceElemInfo[iFace]->zone;
175 if (if2c == 1 && Geom ::FaceIDIsPeriodicMain(faceID))
190 if (!
mesh.isPeriodic)
192 auto faceID =
mesh.faceElemInfo[iFace]->zone;
197 if (if2c == 1 && Geom ::FaceIDIsPeriodicMain(faceID))
203 return mesh.periodicInfo.TransCoord(pnt, faceID);
206 return mesh.periodicInfo.TransCoordBack(pnt, faceID);
214 if (!
mesh.isPeriodic)
217 auto faceID =
mesh.faceElemInfo[iFace]->zone;
226 return mesh.periodicInfo.TransCoordBack(
GetCellBary(iCellOther), faceID);
234 if (!
mesh.isPeriodic)
237 auto faceID =
mesh.faceElemInfo[iFace]->zone;
243 return mesh.periodicInfo.TransCoord(pnt, faceID);
246 return mesh.periodicInfo.TransCoordBack(pnt, faceID);
254 if (!
mesh.isPeriodic)
257 auto faceID =
mesh.faceElemInfo[iFace]->zone;
263 return mesh.periodicInfo.template TransMat<3>(
cellInertia[iCellOther], faceID);
266 return mesh.periodicInfo.template TransMatBack<3>(
cellInertia[iCellOther], faceID);
281 real ret = std::max(hb[0], hb[1]);
283 ret = std::max(ret, hb[2]);
#define DNDS_DEVICE_CALLABLE
#define DNDS_DEVICE_TRIVIAL_COPY_DEFINE_NO_EMPTY_CTOR(T, T_Self)
#define DNDS_assert(expr)
Debug-only assertion (compiled out when DNDS_NDEBUG is defined). Prints the expression + file/line + ...
#define DNDS_COPY_MEMBER(obj, member)
#define DNDS_COPY_MEMBER_VIEW(obj, member)
DNDS_DEVICE_CALLABLE Geom::tPoint GetCellBary(index iCell)
DNDS_DEVICE_CALLABLE Geom::Elem::Quadrature GetFaceQuad(index iFace) const
t3VecsPair::t_deviceView< B > faceIntPPhysics
t3MatPair::t_deviceView< B > cellInertia
DNDS_DEVICE_CALLABLE real GetFaceParamArea(index iFace) const
FiniteVolumeDeviceView(TMain &fv, index placeholder)
DNDS_DEVICE_CALLABLE Geom::tPoint GetOtherCellBaryFromCell(index iCell, index iCellOther, index iFace)
DNDS_DEVICE_CALLABLE real GetCellJacobiDet(index iCell, rowsize iG) const
DNDS_DEVICE_CALLABLE Geom::tPoint GetOtherCellPointFromCell(index iCell, index iCellOther, index iFace, const Geom::tPoint &pnt)
DNDS_DEVICE_CALLABLE Geom::Elem::Quadrature GetFaceQuadO1(index iFace) const
t3VecPair::t_deviceView< B > cellBary
t3MatPair::t_deviceView< B > cellMajorCoord
DNDS_DEVICE_CALLABLE Geom::tPoint GetFacePointFromCell(index iFace, index iCell, rowsize if2c, const Geom::tPoint &pnt)
Geom::UnstructuredMeshDeviceView< B > mesh
DNDS_DEVICE_CALLABLE Geom::tPoint GetFaceQuadraturePPhys(index iFace, int iG)
DNDS_DEVICE_CALLABLE Geom::tPoint GetFaceQuadraturePPhysFromCell(index iFace, index iCell, rowsize if2c, int iG)
t3VecPair::t_deviceView< B > cellAlignedHBox
DNDS_DEVICE_CALLABLE int getDim()
tCoeffPair::t_deviceView< B > cellIntJacobiDet
DNDS_DEVICE_CALLABLE Geom::tPoint GetFaceNorm(index iFace, int iG) const
DNDS_DEVICE_CALLABLE real GetGlobalVol() const
DNDS_DEVICE_CALLABLE Geom::Elem::Quadrature GetCellQuadO1(index iCell) const
FiniteVolumeSettings settings
DNDS_DEVICE_CALLABLE real GetFaceArea(index iFace)
t3VecPair::t_deviceView< B > cellMajorHBox
DNDS_DEVICE_CALLABLE real GetCellVol(index iCell)
tScalarPair::t_deviceView< B > faceArea
DNDS_DEVICE_CALLABLE real GetCellMaxLenScale(index iCell)
t3VecPair::t_deviceView< B > faceCent
DNDS_DEVICE_CALLABLE bool CellIsFaceBack(index iCell, index iFace) const
DNDS_DEVICE_CALLABLE real GetCellSmoothScaleRatio(index iCell) const
t3VecPair::t_deviceView< B > faceMeanNorm
DNDS_DEVICE_CALLABLE Geom::tGPoint GetOtherCellInertiaFromCell(index iCell, index iCellOther, index iFace)
tRecAtrPair::t_deviceView< B > faceAtr
tScalarPair::t_deviceView< B > volumeLocal
DNDS_DEVICE_CALLABLE index CellFaceOther(index iCell, index iFace) const
DNDS_DEVICE_CALLABLE Geom::tPoint GetFaceNormFromCell(index iFace, index iCell, rowsize if2c, int iG)
DNDS_DEVICE_CALLABLE real GetCellParamVol(index iCell) const
t3VecsPair::t_deviceView< B > cellIntPPhysics
DNDS_DEVICE_CALLABLE Geom::tPoint GetCellQuadraturePPhys(index iCell, int iG)
DNDS_DEVICE_CALLABLE Geom::Elem::Quadrature GetCellQuad(index iCell) const
t3VecPair::t_deviceView< B > cellCent
tRecAtrPair::t_deviceView< B > cellAtr
DNDS_DEVICE_CALLABLE real GetFaceJacobiDet(index iFace, rowsize iG) const
t3VecsPair::t_deviceView< B > faceUnitNorm
tCoeffPair::t_deviceView< B > faceIntJacobiDet
tScalarPair::t_deviceView< B > cellSmoothScale
DNDS_DEVICE_CALLABLE bool FaceIDIsPeriodic(t_index id)
DNDS_DEVICE_CALLABLE bool FaceIDIsPeriodicDonor(t_index id)
DNDS_DEVICE_CALLABLE bool FaceIDIsPeriodicMain(t_index id)
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).
double real
Canonical floating-point scalar used throughout DNDSR (double precision).
Mutable device view onto an ArrayPair (for CUDA kernels).
ArrayPairDeviceView< B, DNDS::ParArray< RecAtr, 1 > > t_deviceView
Device-view template alias: t_deviceView<DeviceBackend::CUDA> gives the mutable CUDA view type for th...
A means to translate nlohmann json into c++ primitive data types and back; and stores then during com...