Abstract base class for decomposition. More...
Public Member Functions | |
TypeName ("decompositionMethod") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, decompositionMethod, decomposer,(const dictionary &decompositionDict),(decompositionDict)) | |
declareRunTimeSelectionTable (autoPtr, decompositionMethod, distributor,(const dictionary &decompositionDict),(decompositionDict)) | |
decompositionMethod (const dictionary &decompositionDict) | |
Construct given the decomposition dictionary. More... | |
decompositionMethod (const decompositionMethod &)=delete | |
Disallow default bitwise copy construction. More... | |
virtual | ~decompositionMethod () |
Destructor. More... | |
label | nDomains () const |
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 ®ionPoints, const scalarField ®ionWeights) |
Return for every coordinate the wanted processor number. Gets. More... | |
virtual labelList | decompose (const polyMesh &mesh, const labelList &cellToRegion, const pointField ®ionPoints) |
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... | |
void | operator= (const decompositionMethod &)=delete |
Disallow default bitwise assignment. More... | |
Static Public Member Functions | |
static autoPtr< decompositionMethod > | NewDecomposer (const dictionary &decompositionDict) |
Return a reference to the selected decomposition method. More... | |
static autoPtr< decompositionMethod > | NewDistributor (const dictionary &decompositionDict) |
Return a reference to the selected decomposition method. More... | |
static dictionary | decomposeParDict (const Time &time) |
Read and return the decomposeParDict. 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 | |
dictionary | decompositionDict_ |
label | nProcessors_ |
PtrList< decompositionConstraint > | constraints_ |
Optional constraints. More... | |
Abstract base class for decomposition.
Definition at line 48 of file decompositionMethod.H.
decompositionMethod | ( | const dictionary & | decompositionDict | ) |
Construct given the decomposition dictionary.
Definition at line 55 of file decompositionMethod.C.
References List< T >::append(), dict, forAllConstIter, UList< T >::last(), dictionary::lookup(), decompositionConstraint::New(), decompositionMethod::NewDecomposer(), and dictionary::subDict().
|
delete |
Disallow default bitwise copy construction.
|
inlinevirtual |
Destructor.
Definition at line 117 of file decompositionMethod.H.
TypeName | ( | "decompositionMethod" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
decompositionMethod | , | ||
decomposer | , | ||
(const dictionary &decompositionDict) | , | ||
(decompositionDict) | |||
) |
declareRunTimeSelectionTable | ( | autoPtr | , |
decompositionMethod | , | ||
distributor | , | ||
(const dictionary &decompositionDict) | , | ||
(decompositionDict) | |||
) |
|
static |
Return a reference to the selected decomposition method.
Definition at line 97 of file decompositionMethod.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::Info, Foam::libs, dictionary::lookupBackwardsCompatible(), decompositionMethod::NewDistributor(), Foam::nl, and dlLibraryTable::open().
Referenced by decompositionMethod::decompositionMethod(), multiLevelDecomp::multiLevelDecomp(), and structuredDecomp::structuredDecomp().
|
static |
Return a reference to the selected decomposition method.
Definition at line 137 of file decompositionMethod.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::Info, Foam::libs, dictionary::lookupBackwardsCompatible(), Foam::nl, and dlLibraryTable::open().
Referenced by NamedEnum< compressibleField, 8 >::names(), and decompositionMethod::NewDecomposer().
|
inline |
Definition at line 123 of file decompositionMethod.H.
References decompositionMethod::decompose(), decompositionMethod::decomposeParDict(), and decompositionMethod::nProcessors_.
Referenced by multiLevelDecomp::multiLevelDecomp(), and structuredDecomp::structuredDecomp().
|
static |
Read and return the decomposeParDict.
Definition at line 175 of file decompositionMethod.C.
References decompositionMethod::decompose(), IOobject::MUST_READ, IOobject::NO_WRITE, and TimePaths::system().
Referenced by NamedEnum< compressibleField, 8 >::names(), and decompositionMethod::nDomains().
|
inlinevirtual |
Return for every coordinate the wanted processor number.
Reimplemented in hierarchGeomDecomp, simpleGeomDecomp, and geomDecomp.
Definition at line 136 of file decompositionMethod.H.
References NotImplemented.
Referenced by decompositionMethod::applyConstraints(), meshRefinement::balance(), decompositionMethod::calcCellCells(), decompositionMethod::decompose(), decompositionMethod::decomposeParDict(), decompositionMethod::nDomains(), metisDecomp::~metisDecomp(), multiLevelDecomp::~multiLevelDecomp(), ptscotchDecomp::~ptscotchDecomp(), scotchDecomp::~scotchDecomp(), and zoltanDecomp::~zoltanDecomp().
|
inlinevirtual |
Like decompose but with uniform weights on the points.
Reimplemented in hierarchGeomDecomp, simpleGeomDecomp, and geomDecomp.
Definition at line 146 of file decompositionMethod.H.
References decompositionMethod::applyConstraints(), decompositionMethod::calcCellCells(), decompositionMethod::decompose(), mesh, NotImplemented, decompositionMethod::operator=(), and decompositionMethod::setConstraints().
|
pure virtual |
Return for every coordinate the wanted processor number. Use the.
mesh connectivity (if needed)
Implemented in scotchDecomp, hierarchGeomDecomp, zoltanDecomp, ptscotchDecomp, multiLevelDecomp, simpleGeomDecomp, metisDecomp, structuredDecomp, manualDecomp, and noDecomp.
|
virtual |
Like decompose but with uniform weights on the points.
Reimplemented in hierarchGeomDecomp, and simpleGeomDecomp.
Definition at line 193 of file decompositionMethod.C.
References decompositionMethod::decompose(), and List< T >::size().
|
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, zoltanDecomp, ptscotchDecomp, and metisDecomp.
Definition at line 205 of file decompositionMethod.C.
References decompositionMethod::decompose(), forAll, UCompactListList< T >::list(), and List< T >::size().
|
virtual |
Like decompose but with uniform weights on the regions.
Definition at line 246 of file decompositionMethod.C.
References decompositionMethod::decompose(), and List< T >::size().
|
pure virtual |
Return for every coordinate the wanted processor number.
The connectivity is equal to mesh.cellCells() except for
Implemented in scotchDecomp, hierarchGeomDecomp, zoltanDecomp, ptscotchDecomp, multiLevelDecomp, metisDecomp, simpleGeomDecomp, manualDecomp, structuredDecomp, and noDecomp.
|
virtual |
Like decompose but with uniform weights on the cells.
Reimplemented in hierarchGeomDecomp.
Definition at line 265 of file decompositionMethod.C.
References decompositionMethod::calcCellCells(), and List< T >::size().
|
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 277 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(), UCompactListList< T >::m(), UPstream::msgType(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), UCompactListList< T >::offsets(), patches, patchi, CompactListList< T >::setSize(), UCompactListList< T >::size(), polyPatch::start(), syncTools::swapBoundaryFaceList(), globalIndex::toGlobal(), globalIndex::toLocal(), and UPstream::worldComm.
Referenced by multiLevelDecomp::decompose(), zoltanDecomp::decompose(), decompositionMethod::decompose(), CuthillMcKeeRenumber::renumber(), springRenumber::renumber(), and renumberMethod::renumber().
|
static |
Helper: determine (local or global) cellCells and face weights.
from mesh agglomeration. Uses mag of faceArea as weights
Definition at line 467 of file decompositionMethod.C.
References polyMesh::boundaryMesh(), HashTable< T, Key, Hash >::clear(), polyPatch::coupled(), decompositionMethod::decompose(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), forAll, HashSet< Key, Hash >::insert(), globalIndex::isLocal(), UCompactListList< T >::m(), primitiveMesh::magFaceAreas(), UPstream::msgType(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), UCompactListList< T >::offsets(), patches, patchi, CompactListList< T >::setSize(), UCompactListList< T >::size(), polyPatch::start(), syncTools::swapBoundaryFaceList(), globalIndex::toGlobal(), globalIndex::toLocal(), and UPstream::worldComm.
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 1009 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().
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 1038 of file decompositionMethod.C.
References decompositionMethod::decompose(), and forAll.
Referenced by decompositionMethod::decompose(), and decompositionMethod::setConstraints().
|
virtual |
blockedFace | Whether owner and neighbour should be on same processor (takes priority over explicitConnections) |
specifiedProcessorFaces | Whether whole sets of faces (and point neighbours) need to be kept on single processor |
explicitConnections | Additional connections between boundary faces |
Definition at line 671 of file decompositionMethod.C.
References polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), polyPatch::coupled(), UList< T >::data(), Foam::endl(), Foam::exit(), f(), f1, primitiveMesh::faceCentres(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, Pair< Type >::first(), forAll, polyMesh::globalData(), Foam::Info, primitiveMesh::isInternalFace(), VectorSpace< Vector< scalar >, scalar, 3 >::max, patchIdentifier::name(), primitiveMesh::nCells(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), regionSplit::nLocalRegions(), globalMeshData::nTotalCells(), UPstream::parRun(), patches, patchi, pFaces, primitiveMesh::pointFaces(), Foam::reduce(), Foam::returnReduce(), Pair< Type >::second(), decompositionMethod::setConstraints(), UPtrList< T >::size(), List< T >::size(), polyPatch::start(), and syncTools::swapBoundaryCellList().
Foam::labelList decompose | ( | const polyMesh & | mesh, |
const scalarField & | cWeights | ||
) |
Decompose a mesh. Apply all constraints from decomposeParDict.
('preserveFaceZones' etc). Calls either
Definition at line 1063 of file decompositionMethod.C.
|
delete |
Disallow default bitwise assignment.
Referenced by decompositionMethod::decompose().
|
protected |
Definition at line 54 of file decompositionMethod.H.
|
protected |
Definition at line 55 of file decompositionMethod.H.
Referenced by manualDecomp::decompose(), and decompositionMethod::nDomains().
|
protected |
Optional constraints.
Definition at line 58 of file decompositionMethod.H.