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... | |
autoPtr< mapDistributePolyMesh > | distribute (const labelList &dist) |
Send cells to neighbours according to distribution. 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 | printIntFieldInfo (const fvMesh &) |
Print some field info. 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... | |
static tmp< surfaceScalarField > | generateTestField (const fvMesh &) |
Generate a test field on faces. More... | |
static void | testField (const surfaceScalarField &) |
Check whether field consistent with face orientation. 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 66 of file fvMeshDistribute.H.
|
explicit |
Construct from mesh.
Definition at line 1858 of file fvMeshDistribute.C.
ClassName | ( | "fvMeshDistribute" | ) |
|
static |
Helper function: count cells per processor in wanted distribution.
Definition at line 1867 of file fvMeshDistribute.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, UPstream::nProcs(), and Foam::Zero.
Referenced by meshRefinement::balance().
Foam::autoPtr< Foam::mapDistributePolyMesh > distribute | ( | const labelList & | dist | ) |
Send cells to neighbours according to distribution.
(for every cell the new proc)
Combine sourceProc, sourcePatch, sourceFace
Definition at line 1891 of file fvMeshDistribute.C.
References Foam::abort(), fvMeshAdder::add(), UPstream::allToAll(), fvMeshSubset::cellMap(), polyBoundaryMesh::checkParallelSync(), PstreamBuffers::clear(), Foam::ensightOutput::debug, Foam::endl(), fvMeshSubset::faceFlipMap(), Foam::faceMap(), fvMeshSubset::faceMap(), Foam::FatalError, FatalErrorInFunction, PstreamBuffers::finishedSends(), Foam::flatOutput(), forAll, Foam::identity(), Foam::inplaceReorder(), meshes(), UPstream::myProcNo(), autoPtr< T >::New(), Foam::nl, UPstream::nonBlocking, UPstream::nProcs(), UPstream::parRun(), patches, fvMeshSubset::patchMap(), fvMeshSubset::pointMap(), Foam::Pout, autoPtr< T >::ptr(), Foam::renumber(), Foam::BitOps::select(), PtrList< T >::set(), HashTable< T, Key, Hash >::set(), List< T >::setSize(), UPtrList< T >::size(), HashTable< T, Key, Hash >::size(), polyBoundaryMesh::start(), fvMeshSubset::subMesh(), List< T >::transfer(), DimensionedField< Type, GeoMesh >::typeName(), and Foam::Zero.
Referenced by meshRefinement::balance().
|
static |
Print some info on coupling data.
Definition at line 280 of file fvMeshDistribute.C.
References Foam::endl(), primitiveMesh::faceCentres(), forAll, mesh, primitiveMesh::nInternalFaces(), Foam::nl, and Foam::Pout.
|
static |
Print some field info.
Definition at line 74 of file fvMeshDistributeTemplates.C.
References Foam::endl(), fld, forAllConstIters(), mesh, and Foam::Pout.
|
static |
Print some field info.
Definition at line 102 of file fvMeshDistributeTemplates.C.
References Foam::endl(), fld, forAllConstIters(), mesh, OSstream::name(), Foam::nl, Foam::Pout, and fileName::type().
|
static |
Print some info on mesh.
Definition at line 220 of file fvMeshDistribute.C.
References fvMesh::boundary(), polyMesh::cellZones(), Foam::endl(), polyMesh::faceZones(), forAll, mesh, zoneIdentifier::name(), patchIdentifier::name(), primitiveMesh::nCells(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::nl, primitiveMesh::nPoints(), patches, polyMesh::points(), polyMesh::pointZones(), Foam::Pout, UList< T >::size(), UPtrList< T >::size(), and polyPatch::start().
|
static |
Generate a test field on faces.
Definition at line 400 of file fvMeshDistribute.C.
References Foam::dimless, fld, forAll, fvMesh::magSf(), mesh, n, IOobjectOption::NO_READ, IOobjectOption::NO_WRITE, Foam::normalised(), tmp< T >::ref(), fvMesh::Sf(), UList< T >::size(), fvMesh::time(), Time::timeName(), and Foam::Zero.
|
static |
Check whether field consistent with face orientation.
Definition at line 450 of file fvMeshDistribute.C.
References Foam::cos(), Foam::constant::electromagnetic::e, Foam::endl(), primitiveMesh::faceCentres(), fld, forAll, Foam::mag(), fvMesh::magSf(), mesh, n, fvPatch::name(), Foam::normalised(), fvsPatchFieldBase::patch(), fvMesh::Sf(), fvPatch::start(), and WarningInFunction.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.