Loading...
Searching...
No Matches
fvMeshPrimitiveLduAddressing Class Reference

Variant of fvMeshLduAddressing that contains addressing instead of slices. More...

#include <fvMeshPrimitiveLduAddressing.H>

Inheritance diagram for fvMeshPrimitiveLduAddressing:
Collaboration diagram for fvMeshPrimitiveLduAddressing:

Public Member Functions

 fvMeshPrimitiveLduAddressing (const fvMesh &mesh)
 Construct from mesh.
 fvMeshPrimitiveLduAddressing (const label nCells, labelList &&lowerAddr, labelList &&upperAddr, const UPtrList< const labelUList > &patchAddr, const lduSchedule &ps)
 Construct from components.
virtual ~fvMeshPrimitiveLduAddressing ()=default
 Destructor.
virtual const labelUListlowerAddr () const noexcept
 Return lower addressing (i.e. lower label = upper triangle).
virtual const labelUListupperAddr () const noexcept
 Return upper addressing (i.e. upper label).
virtual const labelUListpatchAddr (const label patchi) const
 Return patch addressing for given patch.
virtual const lduSchedulepatchSchedule () const noexcept
 Return patch field evaluation schedule.
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 labelUListlosortAddr () const
 Return losort addressing.
const labelUListownerStartAddr () const
 Return owner start addressing.
const labelUListlosortStartAddr () const
 Return losort start addressing.
const labelUListlowerCSRAddr () 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 labelList addAddressing (const lduAddressing &addr, const labelListList &nbrCells, label &nExtraFaces, labelList &lower, labelList &upper, labelListList &nbrCellFaces, const globalIndex &, const labelList &globalCellIDs, labelListList &localFaceCells, labelListList &remoteFaceCells)
 Given additional addressing (in the form of additional neighbour cells, i.e. like cellCells).
static label triIndex (const lduAddressing &, const label, const label)
 Return off-diagonal index given owner and neighbour label.

Detailed Description

Variant of fvMeshLduAddressing that contains addressing instead of slices.

Alternatively use lduPrimitiveMesh but that assumes there are only lduInterfaces and not also generic patches.

Source files

Definition at line 53 of file fvMeshPrimitiveLduAddressing.H.

Constructor & Destructor Documentation

◆ fvMeshPrimitiveLduAddressing() [1/2]

fvMeshPrimitiveLduAddressing ( const fvMesh & mesh)
explicit

Construct from mesh.

Definition at line 28 of file fvMeshPrimitiveLduAddressing.C.

References boundary, lduAddressing::lduAddressing(), mesh, and patchSchedule().

Here is the call graph for this function:

◆ fvMeshPrimitiveLduAddressing() [2/2]

fvMeshPrimitiveLduAddressing ( const label nCells,
labelList && lowerAddr,
labelList && upperAddr,
const UPtrList< const labelUList > & patchAddr,
const lduSchedule & ps )

Construct from components.

Definition at line 48 of file fvMeshPrimitiveLduAddressing.C.

References lduAddressing::lduAddressing(), lowerAddr(), patchAddr(), and upperAddr().

Here is the call graph for this function:

◆ ~fvMeshPrimitiveLduAddressing()

virtual ~fvMeshPrimitiveLduAddressing ( )
virtualdefault

Destructor.

Member Function Documentation

◆ lowerAddr()

virtual const labelUList & lowerAddr ( ) const
inlinevirtualnoexcept

Return lower addressing (i.e. lower label = upper triangle).

Implements lduAddressing.

Definition at line 129 of file fvMeshPrimitiveLduAddressing.H.

References Foam::noexcept.

Referenced by oversetFvMeshBase::active(), and fvMeshPrimitiveLduAddressing().

Here is the caller graph for this function:

◆ upperAddr()

virtual const labelUList & upperAddr ( ) const
inlinevirtualnoexcept

Return upper addressing (i.e. upper label).

Implements lduAddressing.

Definition at line 137 of file fvMeshPrimitiveLduAddressing.H.

References Foam::noexcept.

Referenced by fvMeshPrimitiveLduAddressing().

Here is the caller graph for this function:

◆ patchAddr()

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

Return patch addressing for given patch.

Implements lduAddressing.

Definition at line 145 of file fvMeshPrimitiveLduAddressing.H.

Referenced by fvMeshPrimitiveLduAddressing().

Here is the caller graph for this function:

◆ patchSchedule()

virtual const lduSchedule & patchSchedule ( ) const
inlinevirtualnoexcept

Return patch field evaluation schedule.

Implements lduAddressing.

Definition at line 153 of file fvMeshPrimitiveLduAddressing.H.

References Foam::noexcept.

Referenced by fvMeshPrimitiveLduAddressing().

Here is the caller graph for this function:

◆ addAddressing()

Foam::labelList addAddressing ( const lduAddressing & addr,
const labelListList & nbrCells,
label & nExtraFaces,
labelList & lower,
labelList & upper,
labelListList & nbrCellFaces,
const globalIndex & globalNumbering,
const labelList & globalCellIDs,
labelListList & localFaceCells,
labelListList & remoteFaceCells )
static

Given additional addressing (in the form of additional neighbour cells, i.e. like cellCells).

  • add any additional faces
  • sort in upper-triangular order
  • construct cell-faces equivalent of given nbrCells (so e.g. nbrCellFaces[cellI][0] is the face corresponding to the cell nbrCells[cellI][0]) (note: face in nbrCellFaces is -1 if the nbrCell is not local)
  • construct additional processor interface addressing: per processor the local and the remote cell.
  • return old-to-new face mapping

Definition at line 93 of file fvMeshPrimitiveLduAddressing.C.

References forAll, Foam::inplaceRenumber(), Foam::inplaceReorder(), lduAddressing::lduAddressing(), lduAddressing::lowerAddr(), Foam::max(), Foam::min(), UPstream::nProcs(), List< T >::setSize(), lduAddressing::size(), UList< T >::size(), globalIndex::toLocal(), triIndex(), lduAddressing::upperAddr(), lduPrimitiveMesh::upperTriOrder(), globalIndex::whichProcID(), and Foam::Zero.

Referenced by oversetFvMeshBase::updateAddressing().

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

◆ triIndex()

Foam::label triIndex ( const lduAddressing & addr,
const label a,
const label b )
static

Return off-diagonal index given owner and neighbour label.

Returns
-1 if not found

Definition at line 67 of file fvMeshPrimitiveLduAddressing.C.

References b, lduAddressing::lduAddressing(), Foam::max(), Foam::min(), lduAddressing::ownerStartAddr(), and lduAddressing::upperAddr().

Referenced by addAddressing().

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

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