Simplest concrete lduMesh that stores the addressing needed by lduMatrix. More...
#include <lduPrimitiveMesh.H>


Public Member Functions | |
| ClassName ("lduPrimitiveMesh") | |
| lduPrimitiveMesh (const label nCells) | |
| Construct from number of cells. | |
| lduPrimitiveMesh (const label nCells, labelList &l, labelList &u, const label comm, bool reuse) | |
| Construct from components but without interfaces. Add interfaces. | |
| void | addInterfaces (lduInterfacePtrsList &interfaces, const lduSchedule &ps) |
| Add interfaces to a mesh constructed without. | |
| 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. | |
| 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. | |
| virtual | ~lduPrimitiveMesh ()=default |
| Destructor. | |
| virtual bool | hasDb () const |
| Return true if thisDb() is a valid DB. | |
| virtual const lduAddressing & | lduAddr () const |
| Return ldu addressing. | |
| virtual lduAddressing & | lduAddr () |
| Return non-const ldu addressing. | |
| virtual lduInterfacePtrsList | interfaces () const |
| Return a list of pointers for each patch with only those pointing to interfaces being set. | |
| virtual lduInterfacePtrsList & | interfaces () |
| Return a non-const list of pointers for each patch with only those pointing to interfaces being set. | |
| PtrList< const lduInterface > & | primitiveInterfaces () |
| Return a non-const list of primitive interfaces. | |
| const lduInterfacePtrsList & | rawInterfaces () const |
| Return a list of pointers for each patch. | |
| virtual label | comm () const |
| Return communicator used for parallel communication. | |
| virtual const labelUList & | lowerAddr () const |
| Return Lower addressing. | |
| virtual const labelUList & | upperAddr () const |
| Return Upper addressing. | |
| virtual labelList & | lowerAddr () |
| Return non-const Lower addressing. | |
| virtual labelList & | upperAddr () |
| Return non-const Upper addressing. | |
| virtual const labelUList & | patchAddr (const label i) const |
| Return patch addressing. | |
| virtual const lduSchedule & | patchSchedule () const |
| Return patch evaluation schedule. | |
| template<class ProcPatch> | |
| Foam::lduSchedule | nonBlockingSchedule (const lduInterfacePtrsList &interfaces) |
| Public Member Functions inherited from lduMesh | |
| TypeName ("lduMesh") | |
| Runtime type information. | |
| virtual | ~lduMesh ()=default |
| Destructor. | |
| virtual const objectRegistry & | thisDb () const |
| Return the object registry. | |
| template<class T, class BinaryOp> | |
| void | reduce (T &val, BinaryOp bop) const |
| Helper: reduce with current communicator. | |
| InfoProxy< lduMesh > | info () const noexcept |
| Return info proxy, used to print mesh information to a stream. | |
| Public Member Functions inherited from lduAddressing | |
| lduAddressing (const lduAddressing &)=delete | |
| No copy construct. | |
| void | operator= (const lduAddressing &)=delete |
| No copy assignment. | |
| lduAddressing (const label nEqns) noexcept | |
| Construct with size (number of equations). | |
| virtual | ~lduAddressing ()=default |
| Destructor. | |
| label | size () const noexcept |
| Return number of equations. | |
| void | clearOut () |
| Clear additional addressing. | |
| const labelUList & | losortAddr () const |
| Return losort addressing. | |
| const labelUList & | ownerStartAddr () const |
| Return owner start addressing. | |
| const labelUList & | losortStartAddr () const |
| Return losort start addressing. | |
| const labelUList & | lowerCSRAddr () const |
| Return CSR addressing. | |
| label | triIndex (const label a, const label b) const |
| Return off-diagonal index given owner and neighbour label. | |
| Tuple2< label, scalar > | band () const |
| Calculate bandwidth and profile of addressing. | |
| template<class Type> | |
| void | map (const UList< Type > &faceVals, List< Type > &vals) const |
| Helper to convert lower addressing & data into CSR format. | |
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]. | |
| static void | gather (const label agglomComm, const lduMesh &mesh, PtrList< lduPrimitiveMesh > &otherMeshes) |
| Gather meshes from other processors using agglomComm. | |
| template<class ProcPatch> | |
| static lduSchedule | nonBlockingSchedule (const lduInterfacePtrsList &) |
| Get non-scheduled send/receive schedule. | |
| static labelList | upperTriOrder (const label nCells, const labelUList &lower, const labelUList &upper) |
| Calculate upper-triangular order. | |
| static void | checkUpperTriangular (const label size, const labelUList &l, const labelUList &u) |
| Check if in upper-triangular ordering. | |
| static labelListList | globalCellCells (const lduMesh &mesh, const globalIndex &globalNumbering) |
| Calculate global cell-cells. | |
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 419 of file lduPrimitiveMesh.C.
References lduAddressing::lduAddressing().

Construct from components but without interfaces. Add interfaces.
separately using addInterfaces
Definition at line 359 of file lduPrimitiveMesh.C.
References comm(), and lduAddressing::lduAddressing().

| 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 429 of file lduPrimitiveMesh.C.
References comm(), lduAddressing::lduAddressing(), and primitiveInterfaces().

| 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 484 of file lduPrimitiveMesh.C.
References Foam::abort(), List< T >::append(), HashTable< T, Key, Hash >::cfind(), checkUpperTriangular(), lduMesh::comm(), comm(), HashTable< T, Key, Hash >::csorted(), Foam::endl(), Foam::exit(), lduInterface::faceCells(), Foam::faceMap(), Foam::FatalError, FatalErrorInFunction, UList< T >::find(), Foam::findIndices(), Foam::flatOutput(), forAll, Foam::inplaceReorder(), lduMesh::interfaces(), interfaces(), Foam::isA(), UList< T >::last(), lduMesh::lduAddr(), lduAddr(), lduAddressing::lduAddressing(), lduAddressing::lowerAddr(), lduAddressing::map(), Foam::max(), mesh, Foam::min(), UPstream::msgType(), processorLduInterface::myProcNo(), UPstream::myProcNo(), n, processorLduInterface::neighbProcNo(), Foam::nl, nonBlockingSchedule(), Foam::Pout, autoPtr< T >::ptr(), Foam::refCast(), UPtrList< T >::set(), List< T >::setSize(), HashTable< T, Key, Hash >::size(), lduAddressing::size(), UList< T >::size(), UPtrList< T >::size(), Foam::sortedOrder(), lduAddressing::upperAddr(), upperTriOrder(), WarningInFunction, and Foam::Zero.

|
virtualdefault |
Destructor.
| ClassName | ( | "lduPrimitiveMesh" | ) |
References comm(), Foam::faceMap(), interfaces(), and primitiveInterfaces().

| void addInterfaces | ( | lduInterfacePtrsList & | interfaces, |
| const lduSchedule & | ps ) |
Add interfaces to a mesh constructed without.
Definition at line 398 of file lduPrimitiveMesh.C.
References forAll, interfaces(), 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.
References lduAddressing::lduAddressing().
Referenced by fvMatrix< Type >::createOrUpdateLduPrimitiveAssembly(), lduPrimitiveMesh(), lduPrimitiveMeshAssembly::lduPrimitiveMeshAssembly(), and lduPrimitiveMeshAssembly::update().


|
inlinevirtual |
Return non-const ldu addressing.
Definition at line 239 of file lduPrimitiveMesh.H.
References lduAddressing::lduAddressing().

|
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 addInterfaces(), ClassName(), gather(), globalCellCells(), lduPrimitiveMesh(), faceAreaPairGAMGAgglomeration::movePoints(), nonBlockingSchedule(), lduPrimitiveMeshAssembly::update(), and lduPrimitiveMeshAssembly::updateMaps().

|
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 ClassName(), lduPrimitiveMesh(), faceAreaPairGAMGAgglomeration::movePoints(), and lduPrimitiveMeshAssembly::update().

|
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 gather(), and faceAreaPairGAMGAgglomeration::movePoints().

|
inlinevirtual |
Return communicator used for parallel communication.
Implements lduMesh.
Definition at line 284 of file lduPrimitiveMesh.H.
Referenced by ClassName(), gather(), lduPrimitiveMesh(), lduPrimitiveMesh(), lduPrimitiveMesh(), and lduPrimitiveMeshAssembly::lduPrimitiveMeshAssembly().

|
inlinevirtual |
Return Lower addressing.
Implements lduAddressing.
Definition at line 292 of file lduPrimitiveMesh.H.
Referenced by gather(), and lduPrimitiveMeshAssembly::update().

|
inlinevirtual |
Return Upper addressing.
Implements lduAddressing.
Definition at line 300 of file lduPrimitiveMesh.H.
Referenced by gather(), and lduPrimitiveMeshAssembly::update().

|
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 1318 of file lduPrimitiveMesh.C.
Referenced by gather(), globalCellCells(), lduPrimitiveMeshAssembly::lduPrimitiveMeshAssembly(), and nonBlockingSchedule().

|
static |
Gather meshes from other processors using agglomComm.
Received meshes get GAMGInterface.
Definition at line 1329 of file lduPrimitiveMesh.C.
References comm(), PstreamBuffers::finishedGathers(), forAll, interface(), interfaces(), lduAddressing::lduAddressing(), lduAddressing::lowerAddr(), lowerAddr(), UPstream::master(), UPstream::masterNo(), mesh(), GAMGInterface::New(), nonBlockingSchedule(), UPstream::nProcs(), rawInterfaces(), Foam::readLabel(), Foam::refCast(), PtrList< T >::set(), UPtrList< T >::set(), PtrList< T >::setSize(), lduAddressing::size(), UList< T >::size(), UPstream::subProcs(), lduAddressing::upperAddr(), and upperAddr().
Referenced by GAMGAgglomeration::procAgglomerateLduAddressing().


|
static |
Get non-scheduled send/receive schedule.
References mesh(), and lduAddressing::size().
Referenced by GAMGAgglomeration::agglomerateLduAddressing(), gather(), viewFactor::initialise(), lduPrimitiveMesh(), and oversetFvMeshBase::updateAddressing().


|
static |
Calculate upper-triangular order.
Definition at line 234 of file lduPrimitiveMesh.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, UList< T >::last(), DynamicList< T, SizeMin >::resize(), Foam::sortedOrder(), and Foam::Zero.
Referenced by fvMeshPrimitiveLduAddressing::addAddressing(), lduPrimitiveMesh(), and lduPrimitiveMeshAssembly::update().


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


|
static |
Calculate global cell-cells.
Definition at line 92 of file lduPrimitiveMesh.C.
References forAll, Foam::identity(), interfaces(), lduAddressing::lduAddressing(), globalIndex::localStart(), lduAddressing::lowerAddr(), mesh(), UPstream::myProcNo(), UPstream::nonBlocking, UPstream::nRequests(), PtrList< T >::set(), List< T >::setSize(), lduAddressing::size(), lduAddressing::upperAddr(), UPstream::waitRequests(), and Foam::Zero.

| Foam::lduSchedule nonBlockingSchedule | ( | const lduInterfacePtrsList & | interfaces | ) |
Definition at line 27 of file lduPrimitiveMeshTemplates.C.
References forAll, interfaces(), Foam::isA(), and List< T >::setSize().
