lduPrimitiveMesh Class Reference

Simplest contrete lduMesh which stores the addressing needed by lduMatrix. More...

Inheritance diagram for lduPrimitiveMesh:
Collaboration diagram for lduPrimitiveMesh:

Public Member Functions

 ClassName ("lduPrimitiveMesh")
 
 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...
 
 lduPrimitiveMesh (const lduPrimitiveMesh &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~lduPrimitiveMesh ()
 Destructor. More...
 
virtual const lduAddressinglduAddr () const
 Return ldu addressing. More...
 
virtual lduInterfacePtrsList interfaces () const
 Return a list of pointers for each patch. More...
 
const lduInterfacePtrsListrawInterfaces () const
 Return a list of pointers for each patch. More...
 
virtual label comm () const
 Return communicator used for parallel communication. More...
 
virtual const labelUListlowerAddr () const
 Return Lower addressing. More...
 
virtual const labelUListupperAddr () const
 Return Upper addressing. More...
 
virtual const labelUListpatchAddr (const label i) const
 Return patch addressing. More...
 
virtual const lduSchedulepatchSchedule () const
 Return patch evaluation schedule. More...
 
void operator= (const lduPrimitiveMesh &)=delete
 Disallow default bitwise assignment. More...
 
template<class ProcPatch >
Foam::lduSchedule nonBlockingSchedule (const lduInterfacePtrsList &interfaces)
 
- Public Member Functions inherited from lduMesh
 TypeName ("lduMesh")
 Runtime type information. More...
 
virtual ~lduMesh ()
 Destructor. More...
 
virtual const objectRegistrythisDb () 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< lduMeshinfo () const
 Return info proxy. More...
 
- Public Member Functions inherited from lduAddressing
 lduAddressing (const label nEqns)
 
 lduAddressing (const lduAddressing &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~lduAddressing ()
 Destructor. More...
 
label size () const
 Return number of equations. More...
 
const labelUListlosortAddr () const
 Return losort addressing. More...
 
const labelUListownerStartAddr () const
 Return owner start addressing. More...
 
const labelUListlosortStartAddr () const
 Return losort start 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...
 
void operator= (const lduAddressing &)=delete
 Disallow default bitwise assignment. More...
 

Static Public Member Functions

static const lduMeshmesh (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 comm, const lduMesh &mesh, const labelList &procIDs, PtrList< lduPrimitiveMesh > &otherMeshes)
 Gather meshes from other processors onto procIDs[0]. More...
 
template<class ProcPatch >
static lduSchedule nonBlockingSchedule (const lduInterfacePtrsList &)
 Get non-scheduled send/receive schedule. More...
 

Detailed Description

Simplest contrete lduMesh which stores the addressing needed by lduMatrix.

Source files

Definition at line 49 of file lduPrimitiveMesh.H.

Constructor & Destructor Documentation

◆ lduPrimitiveMesh() [1/4]

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 204 of file lduPrimitiveMesh.C.

References lduPrimitiveMesh::addInterfaces().

Referenced by lduPrimitiveMesh::addInterfaces(), lduPrimitiveMesh::lduPrimitiveMesh(), and procLess::operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lduPrimitiveMesh() [2/4]

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 241 of file lduPrimitiveMesh.C.

References forAll, and lduPrimitiveMesh::lduPrimitiveMesh().

Here is the call graph for this function:

◆ lduPrimitiveMesh() [3/4]

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:

  • the new internal face (if boundaryMap=-1)
  • the new patch face (if boundaryMap>=0) Faces becoming internal are negative for flipped faces.

Definition at line 272 of file lduPrimitiveMesh.C.

References Foam::abort(), lduMesh::comm(), HashTableCore::end(), Foam::endl(), Foam::exit(), lduInterface::faceCells(), Foam::FatalError, FatalErrorInFunction, HashTable< T, Key, Hash >::find(), Foam::findIndex(), Foam::findIndices(), forAll, forAllConstIter(), Foam::inplaceReorder(), HashTable< T, edge, Hash< edge > >::insert(), lduMesh::interfaces(), UList< T >::last(), lduMesh::lduAddr(), lduAddressing::lowerAddr(), Foam::max(), mesh, lduPrimitiveMesh::mesh(), Foam::min(), UPstream::msgType(), processorLduInterface::myProcNo(), UPstream::myProcNo(), n, processorLduInterface::neighbProcNo(), Foam::Pout, UPtrList< T >::set(), List< T >::setSize(), UPtrList< T >::size(), List< T >::size(), lduAddressing::size(), UList< T >::size(), Foam::sortedOrder(), lduAddressing::upperAddr(), and WarningInFunction.

Here is the call graph for this function:

◆ lduPrimitiveMesh() [4/4]

lduPrimitiveMesh ( const lduPrimitiveMesh )
delete

Disallow default bitwise copy construction.

◆ ~lduPrimitiveMesh()

virtual ~lduPrimitiveMesh ( )
inlinevirtual

Destructor.

Definition at line 177 of file lduPrimitiveMesh.H.

Member Function Documentation

◆ ClassName()

ClassName ( "lduPrimitiveMesh"  )

◆ addInterfaces()

void addInterfaces ( lduInterfacePtrsList interfaces,
const lduSchedule ps 
)

Add interfaces to a mesh constructed without.

Definition at line 220 of file lduPrimitiveMesh.C.

References forAll, lduPrimitiveMesh::lduPrimitiveMesh(), and List< T >::setSize().

Referenced by lduPrimitiveMesh::lduPrimitiveMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lduAddr()

virtual const lduAddressing& lduAddr ( ) const
inlinevirtual

Return ldu addressing.

Implements lduMesh.

Definition at line 186 of file lduPrimitiveMesh.H.

References lduPrimitiveMesh::interfaces(), and lduPrimitiveMesh::rawInterfaces().

Here is the call graph for this function:

◆ interfaces()

virtual lduInterfacePtrsList interfaces ( ) const
inlinevirtual

Return a list of pointers for each patch.

with only those pointing to interfaces being set

Implements lduMesh.

Definition at line 193 of file lduPrimitiveMesh.H.

Referenced by lduPrimitiveMesh::lduAddr().

Here is the caller graph for this function:

◆ rawInterfaces()

const lduInterfacePtrsList& rawInterfaces ( ) const
inline

Return a list of pointers for each patch.

with only those pointing to interfaces being set (reference to cached interfaces)

Definition at line 201 of file lduPrimitiveMesh.H.

Referenced by lduPrimitiveMesh::lduAddr().

Here is the caller graph for this function:

◆ comm()

virtual label comm ( ) const
inlinevirtual

Return communicator used for parallel communication.

Implements lduMesh.

Definition at line 207 of file lduPrimitiveMesh.H.

◆ lowerAddr()

virtual const labelUList& lowerAddr ( ) const
inlinevirtual

Return Lower addressing.

Implements lduAddressing.

Definition at line 213 of file lduPrimitiveMesh.H.

◆ upperAddr()

virtual const labelUList& upperAddr ( ) const
inlinevirtual

Return Upper addressing.

Implements lduAddressing.

Definition at line 219 of file lduPrimitiveMesh.H.

◆ patchAddr()

virtual const labelUList& patchAddr ( const label  i) const
inlinevirtual

Return patch addressing.

Implements lduAddressing.

Definition at line 225 of file lduPrimitiveMesh.H.

◆ patchSchedule()

virtual const lduSchedule& patchSchedule ( ) const
inlinevirtual

Return patch evaluation schedule.

Implements lduAddressing.

Definition at line 231 of file lduPrimitiveMesh.H.

References lduPrimitiveMesh::gather(), lduPrimitiveMesh::mesh(), lduPrimitiveMesh::nonBlockingSchedule(), and lduPrimitiveMesh::operator=().

Here is the call graph for this function:

◆ mesh()

const Foam::lduMesh & mesh ( const lduMesh mesh0,
const PtrList< lduPrimitiveMesh > &  otherMeshes,
const label  meshI 
)
static

Select either mesh0 (meshI is 0) or otherMeshes[meshI-1].

Definition at line 963 of file lduPrimitiveMesh.C.

References lduPrimitiveMesh::gather().

Referenced by lduPrimitiveMesh::lduPrimitiveMesh(), and lduPrimitiveMesh::patchSchedule().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gather()

void gather ( const label  comm,
const lduMesh mesh,
const labelList procIDs,
PtrList< lduPrimitiveMesh > &  otherMeshes 
)
static

◆ nonBlockingSchedule() [1/2]

static lduSchedule nonBlockingSchedule ( const lduInterfacePtrsList )
static

Get non-scheduled send/receive schedule.

Referenced by lduPrimitiveMesh::patchSchedule().

Here is the caller graph for this function:

◆ operator=()

void operator= ( const lduPrimitiveMesh )
delete

Disallow default bitwise assignment.

Referenced by lduPrimitiveMesh::patchSchedule().

Here is the caller graph for this function:

◆ nonBlockingSchedule() [2/2]

Foam::lduSchedule nonBlockingSchedule ( const lduInterfacePtrsList interfaces)

Definition at line 32 of file lduPrimitiveMeshTemplates.C.

References forAll, UPtrList< T >::set(), and UPtrList< T >::size().

Here is the call graph for this function:

The documentation for this class was generated from the following files: