44 const dictionary& initialPointsDict,
47 const conformationSurfaces& geometryToConformTo,
48 const cellShapeControl& cellShapeControls,
49 const autoPtr<backgroundMeshDecomposition>& decomposition
62 initialCellSize_(detailsDict().
get<scalar>(
"initialCellSize")),
63 randomiseInitialGrid_(detailsDict().
get<Switch>(
"randomiseInitialGrid")),
64 randomPerturbationCoeff_
66 detailsDict().
get<scalar>(
"randomPerturbationCoeff")
81 bb = decomposition().procBounds();
85 bb = geometryToConformTo().globalBounds();
88 scalar x0 = bb.min().x();
89 scalar xR = bb.max().x() - x0;
90 label ni = label(xR/initialCellSize_);
92 scalar
y0 = bb.min().y();
93 scalar yR = bb.max().y() -
y0;
94 label nj = label(yR/initialCellSize_);
96 scalar z0 = bb.min().z();
97 scalar zR = bb.max().z() - z0;
98 label nk = label(zR/initialCellSize_);
106 DynamicList<Vb::Point> initialPoints(ni*nj*nk/10);
108 for (label i = 0; i < ni; i++)
110 for (label j = 0; j < nj; j++)
120 for (label
k = 0;
k < nk;
k++)
131 if (randomiseInitialGrid_)
140 if (decomposition().positionOnThisProcessor(pA))
152 if (randomiseInitialGrid_)
161 if (decomposition().positionOnThisProcessor(pB))
177 geometryToConformTo().wellInside
180 minimumSurfaceDistanceCoeffSqr_
181 *
sqr(cellShapeControls().cellSize(
points))
196 return initialPoints.shrink();
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
virtual List< Vb::Point > initialPoints() const
Return the initial points for the conformalVoronoiMesh.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensionedSymmTensor sqr(const dimensionedVector &dv)
static bool & parRun() noexcept
Test if this a parallel run.
dimensionedScalar y0(const dimensionedScalar &ds)
label k
Boltzmann constant.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
bodyCentredCubic(const dictionary &initialPointsDict, const Time &runTime, Random &rndGen, const conformationSurfaces &geometryToConformTo, const cellShapeControl &cellShapeControls, const autoPtr< backgroundMeshDecomposition > &decomposition)
Construct from components.
vectorField pointField
pointField is a vectorField.
Type sample01()
Return a sample whose components lie in the range [0,1].
void setSize(const label n)
Alias for resize()
defineTypeNameAndDebug(combustionModel, 0)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
vector point
Point is a vector.
void cmptMin(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)