The class contains the addressing required by the lduMatrix: upper, lower and losort. More...
#include <lduAddressing.H>

Public Member Functions | |
| 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. | |
| virtual const labelUList & | lowerAddr () const =0 |
| Return lower addressing. | |
| virtual const labelUList & | upperAddr () const =0 |
| Return upper addressing. | |
| virtual const labelUList & | patchAddr (const label patchNo) const =0 |
| Return patch to internal addressing given patch number. | |
| virtual const lduSchedule & | patchSchedule () const =0 |
| Return patch field evaluation schedule. | |
| 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. | |
The class contains the addressing required by the lduMatrix: upper, lower and losort.
The addressing can be created in two ways: either with references to upper and lower in which case it stores references or from labelLists, in which case it stores the addressing itself. Additionally, the losort addressing belongs to the class is as on lazy evaluation.
The ordering of owner addresses is such that the labels are in increasing order, with groups of identical labels for edges "owned" by the same point. The neighbour labels are also ordered in ascending order but only for groups of edges belonging to each point. An example is given below:
owner neighbour
0 1
0 20
1 2
1 21
2 3
2 22
3 4
3 23
4 5
4 24
5 6
5 25
6 7
6 26
7 8
7 27
8 9
8 28
9 10
9 29
There exists an alternative way of addressing the owner list: instead of repeating the same label in the owner list, it is possible to address the start of each point neighbours in the neighbour list. This reduces the size of owner addressing from a list over all edges to a list over all points + 1:
Owner start list: 0 2 4 6 8 10 12 14 16 18
We shall use the second form of the addressing for fast lookup of edge label from the known owner and neighbour, using the following algorithm:
While owner start addressing allows us to find the edge owned by the points, it is also necessary to find the edges for which the point is a neighbour. Losort addressing lists the edges neighboured by the point and we shall use the same trick as above to address into this list. Thus, for every point the losort start gives the address of the first face to neighbour this point.
Instead of using losort to lookup the face and then using the lowerAddr to find the neighbour cell one can also directly lookup the neighbour cell using the lowerCSRAddr (upperAddr is already in CSR order).
Definition at line 114 of file lduAddressing.H.
|
delete |
No copy construct.
References lduAddressing().
Referenced by fvMeshPrimitiveLduAddressing::addAddressing(), faMeshLduAddressing::faMeshLduAddressing(), fvMeshLduAddressing::fvMeshLduAddressing(), fvMeshPrimitiveLduAddressing::fvMeshPrimitiveLduAddressing(), fvMeshPrimitiveLduAddressing::fvMeshPrimitiveLduAddressing(), lduPrimitiveMesh::gather(), lduPrimitiveMesh::globalCellCells(), lduPrimitiveMesh::lduAddr(), lduPrimitiveMesh::lduAddr(), lduAddressing(), lduPrimitiveMesh::lduPrimitiveMesh(), lduPrimitiveMesh::lduPrimitiveMesh(), lduPrimitiveMesh::lduPrimitiveMesh(), lduPrimitiveMesh::lduPrimitiveMesh(), operator=(), and fvMeshPrimitiveLduAddressing::triIndex().


|
inlineexplicitnoexcept |
Construct with size (number of equations).
Definition at line 192 of file lduAddressing.H.
References Foam::noexcept.
|
virtualdefault |
Destructor.
|
delete |
|
inlinenoexcept |
Return number of equations.
Definition at line 209 of file lduAddressing.H.
References Foam::noexcept.
Referenced by fvMeshPrimitiveLduAddressing::addAddressing(), decompositionGAMGAgglomeration::agglomerate(), MGridGenGAMGAgglomeration::agglomerate(), pairGAMGAgglomeration::agglomerate(), GAMGAgglomeration::agglomerateLduAddressing(), band(), processorColour::cellColour(), GAMGAgglomeration::checkRestriction(), lduPrimitiveMesh::checkUpperTriangular(), lduPrimitiveMesh::gather(), GAMGProcAgglomeration::globalCellCells(), lduPrimitiveMesh::globalCellCells(), lduPrimitiveMesh::lduPrimitiveMesh(), lduPrimitiveMeshAssembly::lduPrimitiveMeshAssembly(), decompositionGAMGAgglomeration::localCellCells(), decompositionGAMGAgglomeration::localCellCells(), lduPrimitiveMesh::nonBlockingSchedule(), Foam::operator<<(), GAMGAgglomeration::printLevels(), lduPrimitiveMeshAssembly::update(), oversetFvMeshBase::updateAddressing(), lduPrimitiveMeshAssembly::updateMaps(), and oversetFvMeshBase::write().

|
pure virtual |
Return lower addressing.
Implemented in faMeshLduAddressing, fvMeshLduAddressing, fvMeshPrimitiveLduAddressing, and lduPrimitiveMesh.
Referenced by fvMeshPrimitiveLduAddressing::addAddressing(), oversetFvMeshBase::addInterpolation(), pairGAMGAgglomeration::agglomerate(), GAMGAgglomeration::agglomerateLduAddressing(), band(), TDILUPreconditioner< Type, DType, LUType >::calcInvD(), DICPreconditioner::calcReciprocalD(), DILUPreconditioner::calcReciprocalD(), GAMGAgglomeration::checkRestriction(), lduPrimitiveMesh::gather(), GAMGProcAgglomeration::globalCellCells(), lduPrimitiveMesh::globalCellCells(), lduMatrix::H(), lduPrimitiveMesh::lduPrimitiveMesh(), decompositionGAMGAgglomeration::localCellCells(), decompositionGAMGAgglomeration::localCellCells(), cyclicACMIFvPatchField< Type >::manipulateMatrix(), cyclicAMIFvPatchField< Type >::manipulateMatrix(), cyclicFvPatchField< Type >::manipulateMatrix(), oversetFvPatchField< Type >::manipulateMatrix(), Foam::operator<<(), faMesh::owner(), fvMesh::owner(), GAMGAgglomeration::printLevels(), lduMatrix::sumDiag(), oversetFvMeshBase::updateAddressing(), processorColour::walkFront(), and oversetFvMeshBase::write().

|
pure virtual |
Return upper addressing.
Implemented in faMeshLduAddressing, fvMeshLduAddressing, fvMeshPrimitiveLduAddressing, and lduPrimitiveMesh.
Referenced by fvMeshPrimitiveLduAddressing::addAddressing(), oversetFvMeshBase::addInterpolation(), pairGAMGAgglomeration::agglomerate(), GAMGAgglomeration::agglomerateLduAddressing(), band(), TDILUPreconditioner< Type, DType, LUType >::calcInvD(), DICPreconditioner::calcReciprocalD(), DILUPreconditioner::calcReciprocalD(), GAMGAgglomeration::checkRestriction(), lduPrimitiveMesh::gather(), GAMGProcAgglomeration::globalCellCells(), lduPrimitiveMesh::globalCellCells(), lduMatrix::H(), lduPrimitiveMesh::lduPrimitiveMesh(), decompositionGAMGAgglomeration::localCellCells(), decompositionGAMGAgglomeration::localCellCells(), cyclicACMIFvPatchField< Type >::manipulateMatrix(), cyclicAMIFvPatchField< Type >::manipulateMatrix(), cyclicFvPatchField< Type >::manipulateMatrix(), oversetFvPatchField< Type >::manipulateMatrix(), faMesh::neighbour(), fvMesh::neighbour(), Foam::operator<<(), lduMatrix::sumDiag(), fvMeshPrimitiveLduAddressing::triIndex(), triIndex(), oversetFvMeshBase::updateAddressing(), processorColour::walkFront(), and oversetFvMeshBase::write().

|
pure virtual |
Return patch to internal addressing given patch number.
Implemented in faMeshLduAddressing, fvMeshLduAddressing, fvMeshPrimitiveLduAddressing, lduPrimitiveMesh, and lduPrimitiveMeshAssembly.
Referenced by oversetFvMeshBase::addInterpolation(), GAMGAgglomeration::agglomerateLduAddressing(), calculatedProcessorFvPatchField< Type >::initInterfaceMatrixUpdate(), cyclicACMIFvPatchField< Type >::initInterfaceMatrixUpdate(), cyclicACMIFvPatchField< Type >::initInterfaceMatrixUpdate(), cyclicACMIGAMGInterfaceField::initInterfaceMatrixUpdate(), cyclicAMIFvPatchField< Type >::initInterfaceMatrixUpdate(), cyclicAMIFvPatchField< Type >::initInterfaceMatrixUpdate(), cyclicAMIGAMGInterfaceField::initInterfaceMatrixUpdate(), lduCalculatedProcessorField< Type >::initInterfaceMatrixUpdate(), processorFaPatchField< Type >::initInterfaceMatrixUpdate(), processorFaPatchField< Type >::initInterfaceMatrixUpdate(), processorFvPatchField< Type >::initInterfaceMatrixUpdate(), processorFvPatchField< Type >::initInterfaceMatrixUpdate(), oversetFvPatchField< Type >::manipulateMatrix(), faceAreaPairGAMGAgglomeration::movePoints(), Foam::operator<<(), oversetFvMeshBase::updateAddressing(), calculatedProcessorGAMGInterfaceField::updateInterfaceMatrix(), cyclicACMIFvPatchField< Type >::updateInterfaceMatrix(), cyclicACMIFvPatchField< Type >::updateInterfaceMatrix(), cyclicACMIGAMGInterfaceField::updateInterfaceMatrix(), cyclicAMIFvPatchField< Type >::updateInterfaceMatrix(), cyclicAMIFvPatchField< Type >::updateInterfaceMatrix(), cyclicAMIGAMGInterfaceField::updateInterfaceMatrix(), cyclicFvPatchField< Type >::updateInterfaceMatrix(), cyclicGAMGInterfaceField::updateInterfaceMatrix(), jumpCyclicAMIFvPatchField< Type >::updateInterfaceMatrix(), jumpCyclicAMIFvPatchField< scalar >::updateInterfaceMatrix(), jumpCyclicFvPatchField< Type >::updateInterfaceMatrix(), jumpCyclicFvPatchField< scalar >::updateInterfaceMatrix(), processorFvPatchField< Type >::updateInterfaceMatrix(), processorFvPatchField< Type >::updateInterfaceMatrix(), processorGAMGInterfaceField::updateInterfaceMatrix(), and oversetFvMeshBase::write().

|
pure virtual |
Return patch field evaluation schedule.
Implemented in faMeshLduAddressing, fvMeshLduAddressing, fvMeshPrimitiveLduAddressing, and lduPrimitiveMesh.
References b.
Referenced by lduMatrix::patchSchedule().

| void clearOut | ( | ) |
Clear additional addressing.
Definition at line 224 of file lduAddressing.C.
Referenced by fvMatrix< Type >::createOrUpdateLduPrimitiveAssembly().

| const Foam::labelUList & losortAddr | ( | ) | const |
Return losort addressing.
Definition at line 180 of file lduAddressing.C.
Referenced by map(), processorColour::walkFront(), and oversetFvMeshBase::write().

| const Foam::labelUList & ownerStartAddr | ( | ) | const |
Return owner start addressing.
Definition at line 191 of file lduAddressing.C.
Referenced by fvMeshPrimitiveLduAddressing::triIndex(), triIndex(), processorColour::walkFront(), and oversetFvMeshBase::write().

| const Foam::labelUList & losortStartAddr | ( | ) | const |
Return losort start addressing.
Definition at line 202 of file lduAddressing.C.
Referenced by map(), processorColour::walkFront(), and oversetFvMeshBase::write().

| const Foam::labelUList & lowerCSRAddr | ( | ) | const |
Return CSR addressing.
Definition at line 213 of file lduAddressing.C.
| Foam::label triIndex | ( | const label | a, |
| const label | b ) const |
Return off-diagonal index given owner and neighbour label.
Definition at line 233 of file lduAddressing.C.
References Foam::abort(), b, Foam::FatalError, FatalErrorInFunction, Foam::max(), Foam::min(), ownerStartAddr(), and upperAddr().

| Foam::Tuple2< Foam::label, Foam::scalar > band | ( | ) | const |
Calculate bandwidth and profile of addressing.
Definition at line 264 of file lduAddressing.C.
References Foam::diff(), forAll, lowerAddr(), Foam::max(), size(), and upperAddr().
Referenced by GAMGAgglomeration::printLevels().


Helper to convert lower addressing & data into CSR format.
Definition at line 26 of file lduAddressingTemplates.C.
References losortAddr(), losortStartAddr(), n, List< T >::resize_nocopy(), and UList< T >::size().
Referenced by lduPrimitiveMesh::lduPrimitiveMesh().

