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< polyDistributionMap > | 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 1720 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 1729 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::polyDistributionMap > distribute | ( | const labelList & | dist | ) |
Send cells to neighbours according to distribution.
(for every cell the new proc)
Definition at line 1753 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(), polyBoundaryMesh::names(), objectRegistry::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(), fvMeshDistribute::countCells(), and distributor::distribute().
|
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(), distributionMapBase::constructSize(), polyPatch::coupled(), UCompactListList< T >::deepCopy(), polyMesh::defaultRegion, dict, HashTableCore::end(), Foam::endl(), Foam::exit(), 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(), distributionMap::reverseDistribute(), polyTopoChange::setAction(), removeCells::setRefinement(), CompactListList< T >::setSize(), List< T >::setSize(), UPtrList< T >::size(), List< T >::size(), HashTable< T, Key, Hash >::size(), Foam::sortedOrder(), polyPatch::start(), syncTools::swapBoundaryFaceList(), Time::timeName(), polyBoundaryMesh::types(), 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(), polyTopoChangeMap::faceMap(), Foam::FatalError, FatalErrorIn, FatalErrorInFunction, fieldNames, fields, fld(), polyTopoChangeMap::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(), polyTopoChangeMap::oldPatchStarts(), UPstream::parRun(), fvsPatchField< Type >::patch(), patchi, globalMeshData::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.