36 namespace fvMeshDistributors
90 redistributionInterval_(
dict.lookupOrDefault(
"redistributionInterval", 10)),
91 maxImbalance_(
dict.lookupOrDefault<scalar>(
"maxImbalance", 0.1)),
108 bool redistributed =
false;
120 const scalar idealNCells =
129 if (imbalance > maxImbalance_)
131 Info<<
"Redistributing mesh with imbalance " << imbalance <<
endl;
141 redistributed =
true;
145 return redistributed;
Macros for easy insertion into run-time selection tables.
label timeIndex() const
Return current time index.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Abstract base class for decomposition.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Base class for statistical distributions.
Sends/receives parts of mesh+fvfields to neighbouring processors. Used in load balancing.
Abstract base class for fvMesh movers.
fvMesh & mesh()
Return the fvMesh.
Dynamic mesh redistribution using the distributor specified in decomposeParDict.
distributor(fvMesh &mesh, const dictionary &dict)
Construct from fvMesh and dictionary.
virtual ~distributor()
Destructor.
void distribute(const labelList &distribution)
Distribute the mesh and mesh data.
virtual void topoChange(const polyTopoChangeMap &)
Update corresponding to the given map.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
virtual bool write(const bool write=true) const
Write using given format, version and compression.
virtual bool update()
Distribute the.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
void preChange()
Prepare for a mesh change.
virtual void distribute(const polyDistributionMap &map)
Redistribute or update using the given distribution map.
label nTotalCells() const
Return total number of cells in decomposed mesh.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
const globalMeshData & globalData() const
Return parallel info.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
defineTypeNameAndDebug(none, 0)
addToRunTimeSelectionTable(fvMeshDistributor, none, fvMesh)
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)