Simplest concrete lduMesh that stores the addressing needed by lduMatrix. More...


Public Member Functions | |
| ClassName ("lduPrimitiveMesh") | |
| lduPrimitiveMesh (const label nCells) | |
| Construct from number of cells. More... | |
| lduPrimitiveMesh (const label nCells, labelList &l, labelList &u, const label comm, bool reuse) | |
| Construct from components but without interfaces. Add interfaces. More... | |
| void | addInterfaces (lduInterfacePtrsList &interfaces, const lduSchedule &ps) |
| Add interfaces to a mesh constructed without. More... | |
| lduPrimitiveMesh (const label nCells, labelList &l, labelList &u, PtrList< const lduInterface > &primitiveInterfaces, const lduSchedule &ps, const label comm) | |
| Construct from components and re-use storage. More... | |
| lduPrimitiveMesh (const label comm, const labelList &procAgglomMap, const labelList &procIDs, const lduMesh &myMesh, const PtrList< lduPrimitiveMesh > &otherMeshes, labelList &cellOffsets, labelList &faceOffsets, labelListList &faceMap, labelListList &boundaryMap, labelListListList &boundaryFaceMap) | |
| Construct by combining multiple meshes. The meshes come from. More... | |
| virtual | ~lduPrimitiveMesh ()=default |
| Destructor. More... | |
| virtual bool | hasDb () const |
| Return true if thisDb() is a valid DB. More... | |
| virtual const lduAddressing & | lduAddr () const |
| Return ldu addressing. More... | |
| virtual lduAddressing & | lduAddr () |
| Return non-const ldu addressing. More... | |
| virtual lduInterfacePtrsList | interfaces () const |
| Return a list of pointers for each patch with only those pointing to interfaces being set. More... | |
| virtual lduInterfacePtrsList & | interfaces () |
| Return a non-const list of pointers for each patch with only those pointing to interfaces being set. More... | |
| PtrList< const lduInterface > & | primitiveInterfaces () |
| Return a non-const list of primitive interfaces. More... | |
| const lduInterfacePtrsList & | rawInterfaces () const |
| Return a list of pointers for each patch. More... | |
| virtual label | comm () const |
| Return communicator used for parallel communication. More... | |
| virtual const labelUList & | lowerAddr () const |
| Return Lower addressing. More... | |
| virtual const labelUList & | upperAddr () const |
| Return Upper addressing. More... | |
| virtual labelList & | lowerAddr () |
| Return non-const Lower addressing. More... | |
| virtual labelList & | upperAddr () |
| Return non-const Upper addressing. More... | |
| virtual const labelUList & | patchAddr (const label i) const |
| Return patch addressing. More... | |
| virtual const lduSchedule & | patchSchedule () const |
| Return patch evaluation schedule. More... | |
| template<class ProcPatch > | |
| Foam::lduSchedule | nonBlockingSchedule (const lduInterfacePtrsList &interfaces) |
Public Member Functions inherited from lduMesh | |
| TypeName ("lduMesh") | |
| Runtime type information. More... | |
| virtual | ~lduMesh ()=default |
| Destructor. More... | |
| virtual const objectRegistry & | thisDb () const |
| Return the object registry. More... | |
| template<class T , class BinaryOp > | |
| void | reduce (T &Value, const BinaryOp &bop) const |
| Helper: reduce with current communicator. More... | |
| InfoProxy< lduMesh > | info () const noexcept |
| Return info proxy, used to print mesh information to a stream. More... | |
Public Member Functions inherited from lduAddressing | |
| lduAddressing (const lduAddressing &)=delete | |
| No copy construct. More... | |
| void | operator= (const lduAddressing &)=delete |
| No copy assignment. More... | |
| lduAddressing (const label nEqns) noexcept | |
| Construct with size (number of equations) More... | |
| virtual | ~lduAddressing ()=default |
| Destructor. More... | |
| label | size () const noexcept |
| Return number of equations. More... | |
| void | clearOut () |
| Clear additional addressing. More... | |
| const labelUList & | losortAddr () const |
| Return losort addressing. More... | |
| const labelUList & | ownerStartAddr () const |
| Return owner start addressing. More... | |
| const labelUList & | losortStartAddr () const |
| Return losort start addressing. More... | |
| const labelUList & | lowerCSRAddr () const |
| Return CSR addressing. More... | |
| label | triIndex (const label a, const label b) const |
| Return off-diagonal index given owner and neighbour label. More... | |
| Tuple2< label, scalar > | band () const |
| Calculate bandwidth and profile of addressing. More... | |
| template<class Type > | |
| void | map (const UList< Type > &faceVals, List< Type > &vals) const |
| Helper to convert lower addressing & data into CSR format. More... | |
Static Public Member Functions | |
| static const lduMesh & | mesh (const lduMesh &mesh0, const PtrList< lduPrimitiveMesh > &otherMeshes, const label meshI) |
| Select either mesh0 (meshI is 0) or otherMeshes[meshI-1]. More... | |
| static void | gather (const label agglomComm, const lduMesh &mesh, PtrList< lduPrimitiveMesh > &otherMeshes) |
| Gather meshes from other processors using agglomComm. More... | |
| template<class ProcPatch > | |
| static lduSchedule | nonBlockingSchedule (const lduInterfacePtrsList &) |
| Get non-scheduled send/receive schedule. More... | |
| static labelList | upperTriOrder (const label nCells, const labelUList &lower, const labelUList &upper) |
| Calculate upper-triangular order. More... | |
| static void | checkUpperTriangular (const label size, const labelUList &l, const labelUList &u) |
| Check if in upper-triangular ordering. More... | |
| static labelListList | globalCellCells (const lduMesh &mesh, const globalIndex &globalNumbering) |
| Calculate global cell-cells. More... | |
Simplest concrete lduMesh that stores the addressing needed by lduMatrix.
Definition at line 48 of file lduPrimitiveMesh.H.
|
explicit |
Construct from number of cells.
Definition at line 420 of file lduPrimitiveMesh.C.
| lduPrimitiveMesh | ( | const label | nCells, |
| labelList & | l, | ||
| labelList & | u, | ||
| const label | comm, | ||
| bool | reuse | ||
| ) |
Construct from components but without interfaces. Add interfaces.
separately using addInterfaces
Definition at line 360 of file lduPrimitiveMesh.C.
References Foam::ensightOutput::debug, Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::max(), and Foam::min().

| lduPrimitiveMesh | ( | const label | nCells, |
| labelList & | l, | ||
| labelList & | u, | ||
| PtrList< const lduInterface > & | primitiveInterfaces, | ||
| const lduSchedule & | ps, | ||
| const label | comm | ||
| ) |
Construct from components and re-use storage.
Definition at line 430 of file lduPrimitiveMesh.C.
References Foam::ensightOutput::debug, Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::max(), and Foam::min().

| lduPrimitiveMesh | ( | const label | comm, |
| const labelList & | procAgglomMap, | ||
| const labelList & | procIDs, | ||
| const lduMesh & | myMesh, | ||
| const PtrList< lduPrimitiveMesh > & | otherMeshes, | ||
| labelList & | cellOffsets, | ||
| labelList & | faceOffsets, | ||
| labelListList & | faceMap, | ||
| labelListList & | boundaryMap, | ||
| labelListListList & | boundaryFaceMap | ||
| ) |
Construct by combining multiple meshes. The meshes come from.
processors procIDs: procIDs[0] : local processor (myMesh) procIDs[i] : processor where otherMeshes[i-1] comes from procAgglomMap : for every processor which processor it agglomerates onto. The new processor numbers are in compact numbering (so ranks in communicator comm), i.e. similar to cell-restrict-addressing. We need this information to be able to map inter-processor interfaces cellOffsets : for every processor the offset it gets in the mesh faceMap : for every processor, for every face, the destination face. Negative for flipped faces. boundaryMap : for every processor, for every patch, -1 or the new patch index in the mesh. boundaryFaceMap : for every processor, for every patch, for every patch face:
Definition at line 485 of file lduPrimitiveMesh.C.
References Foam::abort(), lduMesh::comm(), Foam::ensightOutput::debug, Foam::endl(), Foam::exit(), lduInterface::faceCells(), Foam::faceMap(), Foam::FatalError, FatalErrorInFunction, UList< T >::find(), Foam::findIndices(), Foam::flatOutput(), forAll, Foam::inplaceReorder(), lduMesh::interfaces(), fvMesh::interfaces(), UList< T >::last(), lduMesh::lduAddr(), lduAddressing::lowerAddr(), Foam::max(), mesh, Foam::min(), UPstream::msgType(), processorLduInterface::myProcNo(), UPstream::myProcNo(), n, processorLduInterface::neighbProcNo(), Foam::nl, Foam::Pout, UPtrList< T >::set(), autoPtr< T >::set(), List< T >::setSize(), UList< T >::size(), lduAddressing::size(), UPtrList< T >::size(), HashTable< T, edge, Hash< edge > >::size(), Foam::sortedOrder(), lduAddressing::upperAddr(), WarningInFunction, and Foam::Zero.

|
virtualdefault |
Destructor.
| ClassName | ( | "lduPrimitiveMesh" | ) |
| void addInterfaces | ( | lduInterfacePtrsList & | interfaces, |
| const lduSchedule & | ps | ||
| ) |
Add interfaces to a mesh constructed without.
Definition at line 399 of file lduPrimitiveMesh.C.
References forAll, and List< T >::setSize().

|
inlinevirtual |
Return true if thisDb() is a valid DB.
Implements lduMesh.
Reimplemented in lduPrimitiveMeshAssembly.
Definition at line 223 of file lduPrimitiveMesh.H.
|
inlinevirtual |
Return ldu addressing.
Implements lduMesh.
Definition at line 231 of file lduPrimitiveMesh.H.
Referenced by fvMatrix< Type >::createOrUpdateLduPrimitiveAssembly().

|
inlinevirtual |
Return non-const ldu addressing.
Definition at line 239 of file lduPrimitiveMesh.H.
|
inlinevirtual |
Return a list of pointers for each patch with only those pointing to interfaces being set.
Implements lduMesh.
Definition at line 248 of file lduPrimitiveMesh.H.
Referenced by faceAreaPairGAMGAgglomeration::movePoints().

|
inlinevirtual |
Return a non-const list of pointers for each patch with only those pointing to interfaces being set.
Definition at line 257 of file lduPrimitiveMesh.H.
|
inline |
Return a non-const list of primitive interfaces.
Definition at line 265 of file lduPrimitiveMesh.H.
Referenced by faceAreaPairGAMGAgglomeration::movePoints().

|
inline |
Return a list of pointers for each patch.
with only those pointing to interfaces being set (reference to cached interfaces)
Definition at line 276 of file lduPrimitiveMesh.H.
Referenced by faceAreaPairGAMGAgglomeration::movePoints().

|
inlinevirtual |
Return communicator used for parallel communication.
Implements lduMesh.
Definition at line 284 of file lduPrimitiveMesh.H.
|
inlinevirtual |
Return Lower addressing.
Implements lduAddressing.
Definition at line 292 of file lduPrimitiveMesh.H.
|
inlinevirtual |
Return Upper addressing.
Implements lduAddressing.
Definition at line 300 of file lduPrimitiveMesh.H.
|
inlinevirtual |
Return non-const Lower addressing.
Definition at line 308 of file lduPrimitiveMesh.H.
|
inlinevirtual |
Return non-const Upper addressing.
Definition at line 316 of file lduPrimitiveMesh.H.
|
inlinevirtual |
Return patch addressing.
Implements lduAddressing.
Reimplemented in lduPrimitiveMeshAssembly.
Definition at line 324 of file lduPrimitiveMesh.H.
|
inlinevirtual |
Return patch evaluation schedule.
Implements lduAddressing.
Definition at line 332 of file lduPrimitiveMesh.H.
|
static |
Select either mesh0 (meshI is 0) or otherMeshes[meshI-1].
Definition at line 1319 of file lduPrimitiveMesh.C.
|
static |
Gather meshes from other processors using agglomComm.
Received meshes get GAMGInterface.
Definition at line 1330 of file lduPrimitiveMesh.C.
References fvMesh::comm(), PstreamBuffers::finishedGathers(), forAll, interface(), fvMesh::interfaces(), fvMesh::lduAddr(), lduAddressing::lowerAddr(), UPstream::master(), UPstream::masterNo(), mesh, GAMGInterface::New(), UPstream::nProcs(), lduAddressing::patchSchedule(), Foam::readLabel(), Foam::refCast(), PtrList< T >::set(), UPtrList< T >::set(), PtrList< T >::setSize(), UList< T >::size(), lduAddressing::size(), UPtrList< T >::size(), UPstream::subProcs(), and lduAddressing::upperAddr().

|
static |
Get non-scheduled send/receive schedule.
Referenced by viewFactor::initialise().

|
static |
Calculate upper-triangular order.
Definition at line 235 of file lduPrimitiveMesh.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, UList< T >::last(), Foam::stringOps::lower(), DynamicList< T, SizeMin >::resize(), Foam::sortedOrder(), Foam::stringOps::upper(), and Foam::Zero.

|
static |
Check if in upper-triangular ordering.
Definition at line 40 of file lduPrimitiveMesh.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, and UList< T >::size().

|
static |
Calculate global cell-cells.
Definition at line 93 of file lduPrimitiveMesh.C.
References Foam::constant::physicoChemical::c1, forAll, Foam::identity(), globalIndex::localStart(), lduAddressing::lowerAddr(), mesh, UPtrList< T >::set(), lduAddressing::size(), UPtrList< T >::size(), lduAddressing::upperAddr(), and Foam::Zero.

| Foam::lduSchedule nonBlockingSchedule | ( | const lduInterfacePtrsList & | interfaces | ) |
Definition at line 28 of file lduPrimitiveMeshTemplates.C.
References forAll, UPtrList< T >::set(), and UPtrList< T >::size().
