Abstract base class for decomposition. More...
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 ®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... | |
Static Public Member Functions | |
static autoPtr< decompositionMethod > | New (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 dictionary & | decompositionDict_ |
label | nProcessors_ |
PtrList< decompositionConstraint > | constraints_ |
Optional constraints. More... | |
Private Member Functions | |
decompositionMethod (const decompositionMethod &) | |
Disallow default bitwise copy construct and assignment. More... | |
void | operator= (const decompositionMethod &) |
Abstract base class for decomposition.
Definition at line 48 of file decompositionMethod.H.
|
private |
Disallow default bitwise copy construct and assignment.
decompositionMethod | ( | const dictionary & | decompositionDict | ) |
Construct given the decomposition dictionary.
Definition at line 55 of file decompositionMethod.C.
References List::append(), dict, Foam::findIndex(), forAllConstIter(), Foam::compressible::New(), and dictionary::subDict().
|
inlinevirtual |
Destructor.
Definition at line 106 of file decompositionMethod.H.
|
private |
TypeName | ( | "decompositionMethod" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
decompositionMethod | , | ||
dictionary | , | ||
(const dictionary &decompositionDict) | , | ||
(decompositionDict) | |||
) |
|
static |
Return a reference to the selected decomposition method.
Definition at line 179 of file decompositionMethod.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::Info, dictionary::lookup(), and Foam::nl.
Referenced by decompositionModel::decomposer(), distributedTriSurfaceMesh::independentlyDistributedBbs(), main(), multiLevelDecomp::multiLevelDecomp(), and structuredDecomp::structuredDecomp().
|
inline |
Definition at line 112 of file decompositionMethod.H.
References decompositionMethod::nProcessors_.
Referenced by determineDecomposition(), multiLevelDecomp::multiLevelDecomp(), and structuredDecomp::structuredDecomp().
|
pure virtual |
Is method parallel aware (i.e. does it synchronize domains across.
proc boundaries)
Implemented in hierarchGeomDecomp, multiLevelDecomp, ptscotchDecomp, scotchDecomp, simpleGeomDecomp, structuredDecomp, metisDecomp, manualDecomp, and noDecomp.
Referenced by determineDecomposition(), and main().
|
inlinevirtual |
Return for every coordinate the wanted processor number.
Reimplemented in geomDecomp, hierarchGeomDecomp, and simpleGeomDecomp.
Definition at line 126 of file decompositionMethod.H.
References NotImplemented.
Referenced by meshRefinement::balance(), determineDecomposition(), and domainDecomposition::distributeCells().
|
inlinevirtual |
Like decompose but with uniform weights on the points.
Reimplemented in geomDecomp, hierarchGeomDecomp, and simpleGeomDecomp.
Definition at line 136 of file decompositionMethod.H.
References NotImplemented.
|
pure virtual |
Return for every coordinate the wanted processor number. Use the.
mesh connectivity (if needed)
Implemented in ptscotchDecomp, multiLevelDecomp, scotchDecomp, metisDecomp, structuredDecomp, hierarchGeomDecomp, manualDecomp, noDecomp, and simpleGeomDecomp.
|
virtual |
Like decompose but with uniform weights on the points.
Reimplemented in hierarchGeomDecomp, and simpleGeomDecomp.
Definition at line 205 of file decompositionMethod.C.
|
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 ptscotchDecomp, scotchDecomp, and metisDecomp.
Definition at line 217 of file decompositionMethod.C.
References forAll, mesh, and List::size().
|
virtual |
Like decompose but with uniform weights on the regions.
Definition at line 258 of file decompositionMethod.C.
References mesh.
|
pure virtual |
Return for every coordinate the wanted processor number.
The connectivity is equal to mesh.cellCells() except for
Implemented in hierarchGeomDecomp, ptscotchDecomp, scotchDecomp, metisDecomp, multiLevelDecomp, simpleGeomDecomp, manualDecomp, noDecomp, and structuredDecomp.
|
virtual |
Like decompose but with uniform weights on the cells.
Reimplemented in hierarchGeomDecomp.
Definition at line 277 of file decompositionMethod.C.
|
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 289 of file decompositionMethod.C.
References HashTable::clear(), polyPatch::coupled(), forAll, HashSet< Key, Hash >::insert(), globalIndex::isLocal(), CompactListList::m(), mesh, CompactListList::offsets(), patches, CompactListList::setSize(), List::setSize(), CompactListList::size(), polyPatch::start(), globalIndex::toGlobal(), and globalIndex::toLocal().
Referenced by CuthillMcKeeRenumber::renumber(), and springRenumber::renumber().
|
static |
Helper: determine (local or global) cellCells and face weights.
from mesh agglomeration. Uses mag of faceArea as weights
Definition at line 494 of file decompositionMethod.C.
References HashTable::clear(), polyPatch::coupled(), forAll, HashSet< Key, Hash >::insert(), globalIndex::isLocal(), CompactListList::m(), Foam::mag(), mesh, CompactListList::offsets(), patches, CompactListList::setSize(), List::setSize(), CompactListList::size(), polyPatch::start(), globalIndex::toGlobal(), globalIndex::toLocal(), and w().
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 1421 of file decompositionMethod.C.
References List::clear(), PtrList::clear(), forAll, mesh, and List::setSize().
Referenced by meshRefinement::balance().
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 1450 of file decompositionMethod.C.
|
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 1073 of file decompositionMethod.C.
References polyPatch::coupled(), FaceCellWave< Type, TrackingData >::data(), Foam::endl(), Foam::exit(), f(), f1, Foam::FatalError, FatalErrorInFunction, Pair::first(), forAll, Foam::Info, Foam::max(), mesh, patchIdentifier::name(), regionSplit::nLocalRegions(), patches, pFaces, Foam::reduce(), Foam::returnReduce(), Pair::second(), List::size(), PtrList::size(), and polyPatch::start().
Foam::labelList decompose | ( | const polyMesh & | mesh, |
const scalarField & | cWeights | ||
) |
Decompose a mesh. Apply all constraints from decomposeParDict.
('preserveFaceZones' etc). Calls either
Definition at line 1475 of file decompositionMethod.C.
References mesh.
|
protected |
Definition at line 55 of file decompositionMethod.H.
Referenced by hierarchGeomDecomp::setDecompOrder().
|
protected |
Definition at line 56 of file decompositionMethod.H.
Referenced by decompositionMethod::nDomains().
|
protected |
Optional constraints.
Definition at line 59 of file decompositionMethod.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.