lduAddressing Class Referenceabstract

The class contains the addressing required by the lduMatrix: upper, lower and losort. More...

Inheritance diagram for lduAddressing:

Public Member Functions

 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...
 
virtual const labelUListlowerAddr () const =0
 Return lower addressing. More...
 
virtual const labelUListupperAddr () const =0
 Return upper addressing. More...
 
virtual const labelUListpatchAddr (const label patchNo) const =0
 Return patch to internal addressing given patch number. More...
 
virtual const lduSchedulepatchSchedule () const =0
 
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...
 

Detailed Description

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:

  1. take the owner label and position the start of lookup using the owner start list
  2. loop through all neighbours of this owner (ending at the start of lookup of owner + 1) until the match with current neighbour is found. The index used on the neighbour list for the match is the edge index.

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.

Source files

Definition at line 111 of file lduAddressing.H.

Constructor & Destructor Documentation

◆ lduAddressing() [1/2]

lduAddressing ( const label  nEqns)
inline

Definition at line 147 of file lduAddressing.H.

References lduAddressing::~lduAddressing().

Here is the call graph for this function:

◆ lduAddressing() [2/2]

lduAddressing ( const lduAddressing )
delete

Disallow default bitwise copy construction.

◆ ~lduAddressing()

~lduAddressing ( )
virtual

Destructor.

Definition at line 175 of file lduAddressing.C.

References Foam::deleteDemandDrivenData().

Referenced by lduAddressing::lduAddressing().

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

Member Function Documentation

◆ size()

◆ lowerAddr()

◆ upperAddr()

◆ patchAddr()

virtual const labelUList& patchAddr ( const label  patchNo) const
pure virtual

Return patch to internal addressing given patch number.

Implemented in lduPrimitiveMesh, and fvMeshLduAddressing.

Referenced by Foam::operator<<(), fvMatrix< Type >::relax(), and lduAddressing::size().

Here is the caller graph for this function:

◆ patchSchedule()

virtual const lduSchedule& patchSchedule ( ) const
pure virtual

◆ losortAddr()

const Foam::labelUList & losortAddr ( ) const

Return losort addressing.

Definition at line 185 of file lduAddressing.C.

Referenced by lduAddressing::size().

Here is the caller graph for this function:

◆ ownerStartAddr()

const Foam::labelUList & ownerStartAddr ( ) const

Return owner start addressing.

Definition at line 196 of file lduAddressing.C.

Referenced by lduAddressing::size(), symGaussSeidelSmoother::smooth(), GaussSeidelSmoother::smooth(), nonBlockingGaussSeidelSmoother::smooth(), and lduAddressing::triIndex().

Here is the caller graph for this function:

◆ losortStartAddr()

const Foam::labelUList & losortStartAddr ( ) const

Return losort start addressing.

Definition at line 207 of file lduAddressing.C.

Referenced by lduAddressing::size().

Here is the caller graph for this function:

◆ triIndex()

Foam::label triIndex ( const label  a,
const label  b 
) const

Return off-diagonal index given owner and neighbour label.

Definition at line 218 of file lduAddressing.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, Foam::max(), Foam::min(), lduAddressing::ownerStartAddr(), and lduAddressing::upperAddr().

Referenced by lduAddressing::size().

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

◆ band()

Foam::Tuple2< Foam::label, Foam::scalar > band ( ) const

Calculate bandwidth and profile of addressing.

Definition at line 249 of file lduAddressing.C.

References Foam::diff(), forAll, lduAddressing::lowerAddr(), Foam::max(), lduAddressing::size(), and lduAddressing::upperAddr().

Referenced by GAMGAgglomeration::compactLevels(), and lduAddressing::size().

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

◆ operator=()

void operator= ( const lduAddressing )
delete

Disallow default bitwise assignment.

Referenced by lduAddressing::size().

Here is the caller graph for this function:

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