32template<
class Triangulation>
33bool Foam::conformalVoronoiMesh::distributeBackground(
const Triangulation&
mesh)
46 scalar previousLoadUnbalance = 0;
50 scalar maxLoadUnbalance =
mesh.calculateLoadUnbalance();
55 || maxLoadUnbalance <= previousLoadUnbalance
60 return iteration != 0;
63 previousLoadUnbalance = maxLoadUnbalance;
65 Info<<
" Total number of vertices before redistribution "
69 const fvMesh&
bMesh = decomposition_().mesh();
76 bMesh.time().timeName(),
92 typename Triangulation::Finite_vertices_iterator vit
93 =
mesh.finite_vertices_begin();
94 vit !=
mesh.finite_vertices_end();
99 if (vit->real() && !vit->featurePoint())
103 label celli = cellSearch.findCell(v);
115 celli = cellSearch.findNearestCell(v);
118 cellVertices[celli]++;
122 scalarField& cwi = cellWeights.primitiveFieldRef();
129 cwi[cI] =
max(cellVertices[cI], 1
e-2);
132 autoPtr<mapDistributePolyMesh> mapDist = decomposition_().distribute
137 cellShapeControl_.shapeControlMesh().distribute(decomposition_());
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
static bool & parRun() noexcept
Test if this a parallel run.
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
static const word null
An empty word.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const dimensionSet dimless
Dimensionless.
List< label > labelList
A List of labels.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
pointFromPoint topoint(const Point &P)
messageStream Info
Information stream (stdout output on master, null elsewhere).
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
T returnReduce(const T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0).
PrimitivePatch< List< face >, const pointField > bMesh
Holder of faceList and points. (v.s. e.g. primitivePatch which references points).
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
constexpr char nl
The newline '\n' character (0x0a).
Foam::point pointFromPoint
#define forAll(list, i)
Loop across all elements in list.