Sends/receives parts of mesh+fvfields to neighbouring processors. Used in load balancing. More...
#include <fvMeshDistribute.H>
Public Member Functions | |
| ClassName ("fvMeshDistribute") | |
| fvMeshDistribute (fvMesh &mesh) | |
| Construct from mesh. | |
| autoPtr< mapDistributePolyMesh > | distribute (const labelList &dist) |
| Send cells to neighbours according to distribution. | |
Static Public Member Functions | |
| static labelList | countCells (const labelList &) |
| Helper function: count cells per processor in wanted distribution. | |
| static void | printCoupleInfo (const primitiveMesh &, const labelList &, const labelList &, const labelList &, const labelList &) |
| Print some info on coupling data. | |
| template<class GeoField> | |
| static void | printIntFieldInfo (const fvMesh &) |
| Print some field info. | |
| template<class GeoField> | |
| static void | printFieldInfo (const fvMesh &) |
| Print some field info. | |
| static void | printMeshInfo (const polyMesh &) |
| Print some info on mesh. | |
| static tmp< surfaceScalarField > | generateTestField (const fvMesh &) |
| Generate a test field on faces. | |
| static void | testField (const surfaceScalarField &) |
| Check whether field consistent with face orientation. | |
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 |
| ClassName | ( | "fvMeshDistribute" | ) |
References mesh.
|
static |
Helper function: count cells per processor in wanted distribution.
Definition at line 1849 of file fvMeshDistribute.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, UPstream::nProcs(), and Foam::Zero.
Referenced by meshRefinement::balance(), and distribute().


| 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 1873 of file fvMeshDistribute.C.
References Foam::abort(), fvMeshAdder::add(), UPstream::allToAll(), fvMeshSubset::cellMap(), PstreamBuffers::clear(), countCells(), doLocalCode, PtrList< T >::emplace_set(), 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::nProcs(), UPstream::parRun(), UPstream::parRun(), patches, fvMeshSubset::patchMap(), fvMeshSubset::pointMap(), Foam::Pout, printFieldInfo(), printIntFieldInfo(), printMeshInfo(), PstreamBuffers::recvDataCounts(), Foam::renumber(), List< T >::resize_nocopy(), PtrList< T >::set(), UPtrList< T >::set(), HashTable< T, Key, Hash >::size(), UPtrList< T >::size(), fvMeshSubset::subMesh(), List< T >::transfer(), FieldBase::typeName, and Foam::Zero.
Referenced by meshRefinement::balance().


|
static |
Print some info on coupling data.
Definition at line 262 of file fvMeshDistribute.C.
References Foam::endl(), forAll, mesh, Foam::nl, and Foam::Pout.

|
static |
Print some field info.
Definition at line 83 of file fvMeshDistributeTemplates.C.
References Foam::endl(), field(), Foam::isA(), mesh, and Foam::Pout.
Referenced by distribute().


|
static |
Print some field info.
Definition at line 105 of file fvMeshDistributeTemplates.C.
References Foam::endl(), field(), mesh, Foam::nl, and Foam::Pout.
Referenced by distribute().


|
static |
Print some info on mesh.
Definition at line 220 of file fvMeshDistribute.C.
References Foam::endl(), mesh, Foam::nl, Foam::Pout, and pp().
Referenced by distribute().


|
static |
Generate a test field on faces.
Definition at line 382 of file fvMeshDistribute.C.
References Foam::dimless, fld(), forAll, mesh, n, IOobjectOption::NO_READ, IOobjectOption::NO_WRITE, Foam::normalised(), VectorSpace< Form, Cmpt, Ncmpts >::one, tmp< T >::ref(), UList< T >::size(), and Foam::Zero.

|
static |
Check whether field consistent with face orientation.
Definition at line 433 of file fvMeshDistribute.C.
References Foam::cos(), e, Foam::endl(), fld(), forAll, Foam::mag(), mesh, n, fvPatch::name(), Foam::normalised(), VectorSpace< Form, Cmpt, Ncmpts >::one, fvsPatchFieldBase::patch(), fvPatch::start(), and WarningInFunction.
