Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
decompositionMethod Class Referenceabstract

Abstract base class for decomposition. More...

Inheritance diagram for decompositionMethod:
Inheritance graph
[legend]
Collaboration diagram for decompositionMethod:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("decompositionMethod")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, decompositionMethod, dictionary,(const dictionary &decompositionDict),(decompositionDict))
 
 decompositionMethod (const dictionary &decompositionDict)
 Construct given the decomposition dictionary. More...
 
virtual ~decompositionMethod ()
 Destructor. More...
 
label nDomains () const
 
virtual bool parallelAware () const =0
 Is method parallel aware (i.e. does it synchronize domains across. More...
 
virtual labelList decompose (const pointField &points, const scalarField &pointWeights)
 Return for every coordinate the wanted processor number. More...
 
virtual labelList decompose (const pointField &)
 Like decompose but with uniform weights on the points. More...
 
virtual labelList decompose (const polyMesh &mesh, const pointField &points, const scalarField &pointWeights)=0
 Return for every coordinate the wanted processor number. Use the. More...
 
virtual labelList decompose (const polyMesh &, const pointField &)
 Like decompose but with uniform weights on the points. More...
 
virtual labelList decompose (const polyMesh &mesh, const labelList &cellToRegion, const pointField &regionPoints, const scalarField &regionWeights)
 Return for every coordinate the wanted processor number. Gets. More...
 
virtual labelList decompose (const polyMesh &mesh, const labelList &cellToRegion, const pointField &regionPoints)
 Like decompose but with uniform weights on the regions. More...
 
virtual labelList decompose (const labelListList &globalCellCells, const pointField &cc, const scalarField &cWeights)=0
 Return for every coordinate the wanted processor number. More...
 
virtual labelList decompose (const labelListList &globalCellCells, const pointField &cc)
 Like decompose but with uniform weights on the cells. More...
 
void setConstraints (const polyMesh &mesh, boolList &blockedFace, PtrList< labelList > &specifiedProcessorFaces, labelList &specifiedProcessor, List< labelPair > &explicitConnections)
 Helper: extract constraints: More...
 
void applyConstraints (const polyMesh &mesh, const boolList &blockedFace, const PtrList< labelList > &specifiedProcessorFaces, const labelList &specifiedProcessor, const List< labelPair > &explicitConnections, labelList &finalDecomp)
 Helper: apply constraints to a decomposition. This gives. More...
 
virtual labelList decompose (const polyMesh &mesh, const scalarField &cellWeights, const boolList &blockedFace, const PtrList< labelList > &specifiedProcessorFaces, const labelList &specifiedProcessor, const List< labelPair > &explicitConnections)
 
labelList decompose (const polyMesh &mesh, const scalarField &cWeights)
 Decompose a mesh. Apply all constraints from decomposeParDict. More...
 

Static Public Member Functions

static autoPtr< decompositionMethodNew (const dictionary &decompositionDict)
 Return a reference to the selected decomposition method. More...
 
static void calcCellCells (const polyMesh &mesh, const labelList &agglom, const label nLocalCoarse, const bool global, CompactListList< label > &cellCells)
 Helper: determine (local or global) cellCells from mesh. More...
 
static void calcCellCells (const polyMesh &mesh, const labelList &agglom, const label nLocalCoarse, const bool parallel, CompactListList< label > &cellCells, CompactListList< scalar > &cellCellWeights)
 Helper: determine (local or global) cellCells and face weights. More...
 

Protected Attributes

const dictionarydecompositionDict_
 
label nProcessors_
 
PtrList< decompositionConstraintconstraints_
 Optional constraints. More...
 

Detailed Description

Abstract base class for decomposition.

Source files

Definition at line 48 of file decompositionMethod.H.

Constructor & Destructor Documentation

◆ decompositionMethod()

decompositionMethod ( const dictionary decompositionDict)

Construct given the decomposition dictionary.

Definition at line 55 of file decompositionMethod.C.

References List< T >::append(), dict, Foam::findIndex(), forAllConstIter(), UList< T >::last(), dictionary::lookup(), decompositionMethod::New(), decompositionConstraint::New(), and dictionary::subDict().

Here is the call graph for this function:

◆ ~decompositionMethod()

virtual ~decompositionMethod ( )
inlinevirtual

Destructor.

Definition at line 106 of file decompositionMethod.H.

Member Function Documentation

◆ TypeName()

TypeName ( "decompositionMethod"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
decompositionMethod  ,
dictionary  ,
(const dictionary &decompositionDict)  ,
(decompositionDict)   
)

◆ New()

Foam::autoPtr< Foam::decompositionMethod > New ( const dictionary decompositionDict)
static

Return a reference to the selected decomposition method.

Definition at line 178 of file decompositionMethod.C.

References decompositionMethod::decompose(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::Info, dictionary::lookup(), and Foam::nl.

Referenced by decompositionModel::decomposer(), decompositionMethod::decompositionMethod(), multiLevelDecomp::multiLevelDecomp(), NamedEnum< directionType, 3 >::names(), and structuredDecomp::structuredDecomp().

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

◆ nDomains()

label nDomains ( ) const
inline

Definition at line 112 of file decompositionMethod.H.

References decompositionMethod::decompose(), decompositionMethod::nProcessors_, and decompositionMethod::parallelAware().

Referenced by multiLevelDecomp::multiLevelDecomp(), and structuredDecomp::structuredDecomp().

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

◆ parallelAware()

virtual bool parallelAware ( ) const
pure virtual

Is method parallel aware (i.e. does it synchronize domains across.

proc boundaries)

Implemented in scotchDecomp, hierarchGeomDecomp, ptscotchDecomp, multiLevelDecomp, simpleGeomDecomp, structuredDecomp, metisDecomp, manualDecomp, and noDecomp.

Referenced by decompositionMethod::nDomains().

Here is the caller graph for this function:

◆ decompose() [1/10]

virtual labelList decompose ( const pointField points,
const scalarField pointWeights 
)
inlinevirtual

◆ decompose() [2/10]

virtual labelList decompose ( const pointField )
inlinevirtual

Like decompose but with uniform weights on the points.

Reimplemented in hierarchGeomDecomp, simpleGeomDecomp, and geomDecomp.

Definition at line 136 of file decompositionMethod.H.

References decompositionMethod::applyConstraints(), decompositionMethod::calcCellCells(), decompositionMethod::decompose(), mesh, NotImplemented, and decompositionMethod::setConstraints().

Here is the call graph for this function:

◆ decompose() [3/10]

virtual labelList decompose ( const polyMesh mesh,
const pointField points,
const scalarField pointWeights 
)
pure virtual

Return for every coordinate the wanted processor number. Use the.

mesh connectivity (if needed)

Implemented in scotchDecomp, hierarchGeomDecomp, ptscotchDecomp, multiLevelDecomp, simpleGeomDecomp, metisDecomp, structuredDecomp, manualDecomp, and noDecomp.

◆ decompose() [4/10]

Foam::labelList decompose ( const polyMesh mesh,
const pointField points 
)
virtual

Like decompose but with uniform weights on the points.

Reimplemented in hierarchGeomDecomp, and simpleGeomDecomp.

Definition at line 204 of file decompositionMethod.C.

References decompositionMethod::decompose(), and List< T >::size().

Here is the call graph for this function:

◆ decompose() [5/10]

Foam::labelList decompose ( const polyMesh mesh,
const labelList cellToRegion,
const pointField regionPoints,
const scalarField regionWeights 
)
virtual

Return for every coordinate the wanted processor number. Gets.

passed agglomeration map (from fine to coarse cells) and coarse cell location. Can be overridden by decomposers that provide this functionality natively. Coarse cells are local to the processor (if in parallel). If you want to have coarse cells spanning processors use the globalCellCells instead.

Reimplemented in scotchDecomp, ptscotchDecomp, and metisDecomp.

Definition at line 216 of file decompositionMethod.C.

References decompositionMethod::decompose(), forAll, and List< T >::size().

Here is the call graph for this function:

◆ decompose() [6/10]

Foam::labelList decompose ( const polyMesh mesh,
const labelList cellToRegion,
const pointField regionPoints 
)
virtual

Like decompose but with uniform weights on the regions.

Definition at line 257 of file decompositionMethod.C.

References decompositionMethod::decompose(), and List< T >::size().

Here is the call graph for this function:

◆ decompose() [7/10]

virtual labelList decompose ( const labelListList globalCellCells,
const pointField cc,
const scalarField cWeights 
)
pure virtual

Return for every coordinate the wanted processor number.

The connectivity is equal to mesh.cellCells() except for

  • in parallel the cell numbers are global cell numbers (starting from 0 at processor0 and then incrementing all through the processors)
  • the connections are across coupled patches

Implemented in scotchDecomp, hierarchGeomDecomp, ptscotchDecomp, metisDecomp, multiLevelDecomp, simpleGeomDecomp, manualDecomp, noDecomp, and structuredDecomp.

◆ decompose() [8/10]

Foam::labelList decompose ( const labelListList globalCellCells,
const pointField cc 
)
virtual

Like decompose but with uniform weights on the cells.

Reimplemented in hierarchGeomDecomp.

Definition at line 276 of file decompositionMethod.C.

References decompositionMethod::calcCellCells(), and List< T >::size().

Here is the call graph for this function:

◆ calcCellCells() [1/2]

void calcCellCells ( const polyMesh mesh,
const labelList agglom,
const label  nLocalCoarse,
const bool  global,
CompactListList< label > &  cellCells 
)
static

Helper: determine (local or global) cellCells from mesh.

agglomeration. Agglomeration is local to the processor. local : connections are in local indices. Coupled across cyclics but not processor patches. global : connections are in global indices. Coupled across cyclics and processor patches.

Definition at line 288 of file decompositionMethod.C.

References polyMesh::boundaryMesh(), HashTable< T, Key, Hash >::clear(), polyPatch::coupled(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), forAll, HashSet< Key, Hash >::insert(), globalIndex::isLocal(), CompactListList< T, Container >::m(), UPstream::msgType(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), CompactListList< T, Container >::offsets(), patches, patchi, CompactListList< T, Container >::setSize(), List< T >::setSize(), CompactListList< T, Container >::size(), polyPatch::start(), syncTools::swapBoundaryFaceList(), globalIndex::toGlobal(), globalIndex::toLocal(), and UPstream::worldComm.

Referenced by multiLevelDecomp::decompose(), decompositionMethod::decompose(), CuthillMcKeeRenumber::renumber(), springRenumber::renumber(), and renumberMethod::renumber().

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

◆ calcCellCells() [2/2]

void calcCellCells ( const polyMesh mesh,
const labelList agglom,
const label  nLocalCoarse,
const bool  parallel,
CompactListList< label > &  cellCells,
CompactListList< scalar > &  cellCellWeights 
)
static

◆ setConstraints()

void setConstraints ( const polyMesh mesh,
boolList blockedFace,
PtrList< labelList > &  specifiedProcessorFaces,
labelList specifiedProcessor,
List< labelPair > &  explicitConnections 
)

Helper: extract constraints:

blockedface: existing faces where owner and neighbour on same proc explicitConnections: sets of boundary faces ,, ,, specifiedProcessorFaces: groups of faces with all cells on same processor.

Definition at line 1420 of file decompositionMethod.C.

References decompositionMethod::applyConstraints(), PtrList< T >::clear(), List< T >::clear(), forAll, primitiveMesh::nFaces(), and List< T >::setSize().

Referenced by meshRefinement::balance(), and decompositionMethod::decompose().

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

◆ applyConstraints()

void applyConstraints ( const polyMesh mesh,
const boolList blockedFace,
const PtrList< labelList > &  specifiedProcessorFaces,
const labelList specifiedProcessor,
const List< labelPair > &  explicitConnections,
labelList finalDecomp 
)

Helper: apply constraints to a decomposition. This gives.

constraints opportunity to modify decomposition in case the native decomposition method has not obeyed all constraints

Definition at line 1449 of file decompositionMethod.C.

References decompositionMethod::decompose(), and forAll.

Referenced by decompositionMethod::decompose(), and decompositionMethod::setConstraints().

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

◆ decompose() [9/10]

Foam::labelList decompose ( const polyMesh mesh,
const scalarField cellWeights,
const boolList blockedFace,
const PtrList< labelList > &  specifiedProcessorFaces,
const labelList specifiedProcessor,
const List< labelPair > &  explicitConnections 
)
virtual

◆ decompose() [10/10]

Foam::labelList decompose ( const polyMesh mesh,
const scalarField cWeights 
)

Decompose a mesh. Apply all constraints from decomposeParDict.

('preserveFaceZones' etc). Calls either

  • no constraints, empty weights: decompose(mesh, cellCentres())
  • no constraints, set weights: decompose(mesh, cellCentres(), cellWeights)
  • valid constraints: decompose(mesh, cellToRegion, regionPoints, regionWeights)

Definition at line 1474 of file decompositionMethod.C.

Member Data Documentation

◆ decompositionDict_

const dictionary& decompositionDict_
protected

Definition at line 55 of file decompositionMethod.H.

◆ nProcessors_

label nProcessors_
protected

Definition at line 56 of file decompositionMethod.H.

Referenced by manualDecomp::decompose(), and decompositionMethod::nDomains().

◆ constraints_

PtrList<decompositionConstraint> constraints_
protected

Optional constraints.

Definition at line 59 of file decompositionMethod.H.


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