fvMeshDistribute Class Reference

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< mapDistributePolyMeshdistribute (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...
 

Detailed Description

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:

  • does not handle cyclics. Will probably handle separated proc patches.
  • if all cells move off processor also all its processor patches will get deleted so comms might be screwed up (since e.g. globalMeshData expects procPatches on all)
  • initial mesh has to have procPatches last and all normal patches common to all processors and in the same order. This is checked.
  • faces are matched topologically but points on the faces are not. So expect problems -on separated patches (cyclics?) -on zero sized processor edges.
Source files

Definition at line 70 of file fvMeshDistribute.H.

Constructor & Destructor Documentation

◆ fvMeshDistribute() [1/2]

fvMeshDistribute ( fvMesh mesh)

Construct from mesh.

Definition at line 1743 of file fvMeshDistribute.C.

References fvMeshDistribute::countCells().

Here is the call graph for this function:

◆ fvMeshDistribute() [2/2]

fvMeshDistribute ( const fvMeshDistribute )
delete

Disallow default bitwise copy construction.

Member Function Documentation

◆ ClassName()

ClassName ( "fvMeshDistribute"  )

◆ countCells()

Foam::labelList countCells ( const labelList distribution)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ distribute()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printCoupleInfo()

void printCoupleInfo ( const primitiveMesh mesh,
const labelList sourceFace,
const labelList sourceProc,
const labelList sourcePatch,
const labelList sourceNewNbrProc 
)
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().

Here is the caller graph for this function:

◆ printFieldInfo()

◆ printMeshInfo()

◆ operator=()

void operator= ( const fvMeshDistribute )
delete

Disallow default bitwise assignment.


The documentation for this class was generated from the following files: