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_);
107 DynamicList<Vb::Point> initialPoints(scalar(ni)*nj*nk/10);
109 for (label i = 0; i < ni; i++)
111 for (label j = 0; j < nj; j++)
121 for (label
k = 0;
k < nk;
k++)
125 x0 + (i + 0.5)*
delta.x(),
130 if (randomiseInitialGrid_)
140 && !decomposition().positionOnThisProcessor(
p)
154 geometryToConformTo().wellInside
157 minimumSurfaceDistanceCoeffSqr_
160 cellShapeControls().cellSize(
points)
176 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.
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.
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)