Go to the documentation of this file.
45 const dictionary& initialPointsDict,
48 const conformationSurfaces& geometryToConformTo,
49 const cellShapeControl& cellShapeControls,
50 const autoPtr<backgroundMeshDecomposition>& decomposition
63 pointFileName_(detailsDict().get<fileName>(
"pointFile")),
64 insideOutsideCheck_(detailsDict().get<Switch>(
"insideOutsideCheck")),
65 randomiseInitialGrid_(detailsDict().get<Switch>(
"randomiseInitialGrid")),
66 randomPerturbationCoeff_
68 detailsDict().get<scalar>(
"randomPerturbationCoeff")
71 Info<<
" Inside/Outside check is " << insideOutsideCheck_.c_str()
85 pointFileName_.name(),
92 Info<<
" Inserting points from file " << pointFileName_ <<
endl;
103 <<
"Point file contain no points"
112 decomposition().distributePoints(
points);
123 pointFileName_.name(),
124 time().caseConstant(),
134 <<
"Point file contain no points"
152 bool foundAlready =
false;
160 allProcPt[proci][ptI] =
false;
162 else if (allProcPt[proci][ptI])
176 <<
"Cannot find points file " << pointsIO.objectPath()
183 if (insideOutsideCheck_)
188 minimumSurfaceDistanceCoeffSqr_
189 *
sqr(cellShapeControls().cellSize(
points))
193 DynamicList<Vb::Point> initialPoints(
insidePoints.size()/10);
201 if (randomiseInitialGrid_)
204 randomPerturbationCoeff_
207 randomPerturbationCoeff_
210 randomPerturbationCoeff_
218 initialPoints.shrink();
220 label nPointsRejected =
points.size() - initialPoints.size();
224 reduce(nPointsRejected, sumOp<label>());
229 Info<<
" " << nPointsRejected <<
" points rejected from "
230 << pointFileName_.name() <<
endl;
233 return initialPoints;
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
vectorField pointField
pointField is a vectorField.
pointFile(const dictionary &initialPointsDict, const Time &runTime, Random &rndGen, const conformationSurfaces &geometryToConformTo, const cellShapeControl &cellShapeControls, const autoPtr< backgroundMeshDecomposition > &decomposition)
Construct from components.
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
Type sample01()
Return a sample whose components lie in the range [0,1].
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static bool & parRun()
Is this a parallel run?
List< bool > boolList
A List of bools.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual List< Vb::Point > initialPoints() const
Return the initial points for the conformalVoronoiMesh.
#define forAll(list, i)
Loop across all elements in list.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
vectorIOField pointIOField
pointIOField is a vectorIOField.
messageStream Info
Information stream (uses stdout - output is on the master only)
Macros for easy insertion into run-time selection tables.
void inplaceSubset(const BoolListType &select, ListType &input, const bool invert=false)
Inplace extract elements of the input list when select is true.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
vector point
Point is a vector.
defineTypeNameAndDebug(combustionModel, 0)