Go to the documentation of this file.
32 template<
class Triangulation>
33 bool 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(),
83 zeroGradientFvPatchScalarField::typeName
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
List< label > labelList
A List of labels.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
static constexpr const zero Zero
Global zero (0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
cellShapeControlMesh & shapeControlMesh()
pointFromPoint topoint(const Point &P)
#define forAll(list, i)
Loop across all elements in list.
messageStream Info
Information stream (stdout output on master, null elsewhere)
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.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
void distribute(const backgroundMeshDecomposition &decomposition)
static bool & parRun() noexcept
Test if this a parallel run.
const dimensionedScalar e
Elementary charge.
const dimensionSet dimless
Dimensionless.