Sends/receives parts of mesh+fvfields to neighbouring processors. Used in load balancing. More...
Public Member Functions | |
ClassName ("fvMeshDistribute") | |
fvMeshDistribute (fvMesh &mesh, const scalar mergeTol) | |
Construct from mesh and absolute merge tolerance. More... | |
fvMeshDistribute (const fvMeshDistribute &)=delete | |
Disallow default bitwise copy construction. More... | |
autoPtr< mapDistributePolyMesh > | distribute (const labelList &dist) |
Send cells to neighbours according to distribution. More... | |
void | operator= (const fvMeshDistribute &)=delete |
Disallow default bitwise assignment. More... | |
Static Public Member Functions | |
static labelList | countCells (const labelList &) |
Helper function: count cells per processor in wanted distribution. More... | |
static void | printCoupleInfo (const primitiveMesh &, const labelList &, const labelList &, const labelList &, const labelList &) |
Print some info on coupling data. More... | |
template<class GeoField > | |
static void | printFieldInfo (const fvMesh &) |
Print some field info. More... | |
static void | printMeshInfo (const fvMesh &) |
Print some info on mesh. More... | |
Sends/receives parts of mesh+fvfields to neighbouring processors. Used in load balancing.
Input is per local cell the processor it should move to. Moves meshes and volFields/surfaceFields and returns map which can be used to distribute other.
Notes:
Definition at line 70 of file fvMeshDistribute.H.
fvMeshDistribute | ( | fvMesh & | mesh, |
const scalar | mergeTol | ||
) |
Construct from mesh and absolute merge tolerance.
Definition at line 1580 of file fvMeshDistribute.C.
References fvMeshDistribute::countCells().
|
delete |
Disallow default bitwise copy construction.
ClassName | ( | "fvMeshDistribute" | ) |
|
static |
Helper function: count cells per processor in wanted distribution.
Definition at line 1590 of file fvMeshDistribute.C.
References Foam::abort(), fvMeshDistribute::distribute(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, and UPstream::nProcs().
Referenced by meshRefinement::balance(), fvMeshDistribute::distribute(), and fvMeshDistribute::fvMeshDistribute().
Foam::autoPtr< Foam::mapDistributePolyMesh > distribute | ( | const labelList & | dist | ) |
Send cells to neighbours according to distribution.
(for every cell the new proc)
Definition at line 1614 of file fvMeshDistribute.C.
References Foam::abort(), fvMeshAdder::add(), polyMesh::boundaryMesh(), fvMeshSubset::cellMap(), polyMesh::cellZones(), polyBoundaryMesh::checkParallelSync(), fvMeshDistribute::countCells(), Foam::endl(), fvMeshSubset::faceFlipMap(), Foam::faceMap(), fvMeshSubset::faceMap(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faceZones(), Foam::FatalError, FatalErrorInFunction, PstreamBuffers::finishedSends(), forAll, forAllConstIter(), Pstream::gatherList(), Foam::identity(), Foam::inplaceRenumber(), Foam::inplaceReorder(), HashSet< Key, Hash >::insert(), UPstream::myProcNo(), objectRegistry::names(), ZoneMesh< ZoneType, MeshType >::names(), polyBoundaryMesh::names(), primitiveMesh::nCells(), MeshObject< polyMesh, PatchMeshObject, pointMesh >::New(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::nl, UPstream::nonBlocking, primitiveMesh::nPoints(), UPstream::nProcs(), UPstream::parRun(), patches, patchi, fvMeshSubset::patchMap(), fvMeshSubset::pointMap(), polyMesh::pointZones(), Foam::Pout, fvMeshDistribute::printMeshInfo(), Foam::renumber(), polyMesh::resetMotion(), HashTable< T, Key, Hash >::resize(), Pstream::scatterList(), polyMesh::setInstance(), fvMeshSubset::setLargeCellSubset(), UPtrList< T >::size(), List< T >::size(), dictionary::subDict(), fvMeshSubset::subMesh(), fvMesh::time(), Time::timeName(), List< T >::transfer(), Field< Type >::typeName, and Foam::Zero.
Referenced by meshRefinement::balance(), and fvMeshDistribute::countCells().
|
static |
Print some info on coupling data.
Definition at line 302 of file fvMeshDistribute.C.
References Foam::abort(), mapAddedPolyMesh::addedFaceMap(), mapAddedPolyMesh::addedPointMap(), fvMesh::addFvPatches(), fvMeshTools::addPatch(), polyMesh::addZones(), polyPatch::boundaryMesh(), polyMesh::boundaryMesh(), polyMesh::cellZones(), polyTopoChange::changeMesh(), mapDistributeBase::constructSize(), polyPatch::coupled(), polyMesh::defaultRegion, dict, HashTableCore::end(), Foam::endl(), polyPatch::faceCells(), primitiveMesh::faceCentres(), Foam::faceMap(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), polyMesh::faceZones(), Foam::FatalError, FatalErrorInFunction, HashTable< T, Key, Hash >::find(), Foam::findIndex(), ZoneMesh< ZoneType, MeshType >::findZoneID(), faceZone::flipMap(), forAll, forAllReverse, found, removeCells::getExposedFaces(), Foam::identity(), HashTable< T, Key, Hash >::insert(), lessProcPatches::lessProcPatches(), polyMeshAdder::mergePoints(), PrimitivePatch< FaceList, PointField >::meshPoints(), UPstream::myProcNo(), patchIdentifier::name(), IOobject::name(), polyBoundaryMesh::names(), primitiveMesh::nCells(), processorPolyPatch::neighbProcNo(), polyPatch::New(), newPointi, primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::nl, IOobject::NO_READ, mapAddedPolyMesh::nOldInternalFaces(), primitiveMesh::nPoints(), UPstream::nProcs(), mapAddedPolyMesh::oldFaceMap(), mapAddedPolyMesh::oldPointMap(), processorPolyPatch::owner(), cyclicPolyPatch::owner(), patches, patchi, polyMesh::points(), polyMesh::pointZones(), Foam::Pout, fvMeshTools::reorderPatches(), Foam::returnReduce(), mapDistribute::reverseDistribute(), runTime, polyTopoChange::setAction(), removeCells::setRefinement(), CompactListList< T, Container >::setSize(), List< T >::setSize(), UPtrList< T >::size(), List< T >::size(), HashTable< T, Key, Hash >::size(), Foam::sortedOrder(), polyPatch::start(), syncTools::swapBoundaryFaceList(), Time::timeName(), coupledPolyPatch::transform(), and faceZone::whichFace().
Referenced by fvMeshDistribute::printMeshInfo().
|
static |
Print some field info.
Definition at line 31 of file fvMeshDistributeTemplates.C.
References Foam::abort(), IOobject::AUTO_WRITE, fvMeshSubset::baseMesh(), token::BEGIN_BLOCK, token::END_BLOCK, Foam::endl(), Foam::faceMap(), mapPolyMesh::faceMap(), Foam::FatalError, FatalErrorIn, FatalErrorInFunction, fieldNames, fields, fld(), mapPolyMesh::flipFaceFlux(), forAll, forAllConstIter(), forAllIter, HashTable< T, Key, Hash >::found(), fvMeshSubset::interpolate(), objectRegistry::lookupObject(), mesh, token::NL, IOobject::NO_READ, mapPolyMesh::oldPatchStarts(), fvsPatchField< Type >::patch(), patchi, Foam::Pout, PtrList< T >::set(), PtrList< T >::setSize(), List< T >::size(), HashTable< T, Key, Hash >::size(), and dictionary::subDict().
|
static |
Print some info on mesh.
Definition at line 242 of file fvMeshDistribute.C.
References fvMesh::boundary(), polyMesh::cellZones(), Foam::endl(), polyMesh::faceZones(), forAll, patchIdentifier::name(), zone::name(), primitiveMesh::nCells(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::nl, primitiveMesh::nPoints(), patches, patchi, polyMesh::points(), polyMesh::pointZones(), Foam::Pout, fvMeshDistribute::printCoupleInfo(), UPtrList< T >::size(), List< T >::size(), and polyPatch::start().
Referenced by fvMeshDistribute::distribute().
|
delete |
Disallow default bitwise assignment.