17 template <
int nVarsFixed = 1>
20 const std::string &name,
25 bool buildTrans =
true,
33 u.
father->Resize(mesh->NumCell(), nVars, 1);
36 u.
father->Resize(mesh->NumNode(), nVars, 1);
39 u.
father->Resize(mesh->NumFace(), nVars, 1);
48 u.
son->Resize(mesh->NumCellGhost(), nVars, 1);
51 u.
son->Resize(mesh->NumNodeGhost(), nVars, 1);
54 u.
son->Resize(mesh->NumFaceGhost(), nVars, 1);
67 u.
trans.BorrowGGIndexing(mesh->cell2node.trans);
70 u.
trans.BorrowGGIndexing(mesh->coords.trans);
73 u.
trans.BorrowGGIndexing(mesh->face2node.trans);
78 u.
trans.createMPITypes();
79 u.
trans.initPersistentPull();
80 u.
trans.initPersistentPush();
83 for (
index iCell = 0; iCell < u.
Size(); iCell++)
88 template <
int nVarsFixed,
int dim>
91 const std::string &name,
96 bool buildTrans =
true,
103 u.
father->Resize(mesh->NumCell(), dim, nVars);
106 u.
father->Resize(mesh->NumNode(), dim, nVars);
109 u.
father->Resize(mesh->NumFace(), dim, nVars);
118 u.
son->Resize(mesh->NumCellGhost(), dim, nVars);
121 u.
son->Resize(mesh->NumNodeGhost(), dim, nVars);
124 u.
son->Resize(mesh->NumFaceGhost(), dim, nVars);
136 u.
trans.BorrowGGIndexing(mesh->cell2node.trans);
139 u.
trans.BorrowGGIndexing(mesh->coords.trans);
142 u.
trans.BorrowGGIndexing(mesh->face2node.trans);
147 u.
trans.createMPITypes();
148 u.
trans.initPersistentPull();
149 u.
trans.initPersistentPush();
152 for (
index iCell = 0; iCell < u.
Size(); iCell++)
#define DNDS_assert(expr)
Debug-only assertion (compiled out when DNDS_NDEBUG is defined). Prints the expression + file/line + ...
Primary solver state container: an ArrayEigenMatrix pair with MPI-collective vector-space operations.
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).
int64_t index
Global row / DOF index type (signed 64-bit; handles multi-billion-cell meshes).
std::shared_ptr< T > ssp
Shortened alias for std::shared_ptr used pervasively in DNDSR.
void TransAttach()
Bind the transformer to the current father / son pointers.
ssp< TArray > father
Owned-side array (must be resized before ghost setup).
index Size() const
Combined row count (father->Size() + son->Size()).
void InitPair(const std::string &name, Args &&...args)
Allocate both father and son arrays, forwarding all args to TArray constructor.
ssp< TArray > son
Ghost-side array (sized automatically by createMPITypes / BorrowAndPull).
TTrans trans
Ghost-communication engine bound to father and son.
Lightweight bundle of an MPI communicator and the calling rank's coordinates.