30 template<
class Triangulation>
31 bool Foam::conformalVoronoiMesh::distributeBackground(
const Triangulation& mesh)
44 scalar previousLoadUnbalance = 0;
48 scalar maxLoadUnbalance = mesh.calculateLoadUnbalance();
53 || maxLoadUnbalance <= previousLoadUnbalance
58 return iteration != 0;
61 previousLoadUnbalance = maxLoadUnbalance;
63 Info<<
" Total number of vertices before redistribution " 67 const fvMesh& bMesh = decomposition_().mesh();
74 bMesh.time().timeName(),
81 zeroGradientFvPatchScalarField::typeName
90 typename Triangulation::Finite_vertices_iterator vit
91 = mesh.finite_vertices_begin();
92 vit != mesh.finite_vertices_end();
97 if (vit->real() && !vit->featurePoint())
101 label celli = cellSearch.findCell(v);
113 celli = cellSearch.findNearestCell(v);
116 cellVertices[celli]++;
120 scalarField& cwi = cellWeights.primitiveFieldRef();
127 cwi[cI] =
max(cellVertices[cI], 1
e-2);
130 autoPtr<polyDistributionMap> mapDist = decomposition_().distribute
#define forAll(list, i)
Loop across all elements in list.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
pointFromPoint topoint(const Point &P)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimless
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
List< label > labelList
A List of labels.
void distribute(const backgroundMeshDecomposition &decomposition)
static bool & parRun()
Is this a parallel run?
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const polyBoundaryMesh & bMesh
cellShapeControlMesh & shapeControlMesh()
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
const doubleScalar e
Elementary charge.