Sends/receives parts of mesh+fvfields to neighbouring processors. Used in load balancing. More...
Public Member Functions | |
ClassName ("fvMeshDistribute") | |
fvMeshDistribute (fvMesh &mesh) | |
Construct from mesh. 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 | ) |
Construct from mesh.
Definition at line 1743 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 1752 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 1776 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(), MeshZones< ZoneType, MeshType >::names(), objectRegistry::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(), and Field< Type >::typeName.
Referenced by meshRefinement::balance(), and fvMeshDistribute::countCells().
|
static |
Print some info on coupling data.
Definition at line 328 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(), f(), polyPatch::faceCells(), primitiveMesh::faceCentres(), Foam::faceMap(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), polyMesh::faceZones(), Foam::FatalError, FatalErrorInFunction, HashTable< T, Key, Hash >::find(), Foam::findIndex(), MeshZones< ZoneType, MeshType >::findZoneID(), faceZone::flipMap(), forAll, forAllReverse, found, removeCells::getExposedFaces(), Foam::identity(), HashTable< T, Key, Hash >::insert(), lessProcPatches::lessProcPatches(), PrimitivePatch< FaceList, PointField >::meshPoints(), UPstream::myProcNo(), patchIdentifier::name(), IOobject::name(), polyBoundaryMesh::names(), cyclicPolyPatch::nbrPatchID(), 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(), and faceZone::whichFace().
Referenced by fvMeshDistribute::printMeshInfo().
|
static |
Print some field info.
Definition at line 32 of file fvMeshDistributeTemplates.C.
References Foam::abort(), IOobject::AUTO_WRITE, fvMeshSubset::baseMesh(), token::BEGIN_BLOCK, UPstream::blocking, UPstream::defaultCommsType, 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(), polyMesh::globalData(), fvMeshSubset::interpolate(), Foam::isFlux(), objectRegistry::lookupObject(), mesh, token::NL, IOobject::NO_READ, UPstream::nonBlocking, UPstream::nRequests(), mapPolyMesh::oldPatchStarts(), UPstream::parRun(), fvsPatchField< Type >::patch(), patchi, ProcessorTopology< Container, ProcPatch >::patchSchedule(), Foam::Pout, UPstream::scheduled, PtrList< T >::set(), PtrList< T >::setSize(), List< T >::size(), HashTable< T, Key, Hash >::size(), dictionary::subDict(), and UPstream::waitRequests().
|
static |
Print some info on mesh.
Definition at line 268 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.