43 const dictionary& initialPointsDict,
46 const conformationSurfaces& geometryToConformTo,
47 const cellShapeControl& cellShapeControls,
48 const autoPtr<backgroundMeshDecomposition>& decomposition
61 pointFileName_(detailsDict().
lookup(
"pointFile")),
62 insideOutsideCheck_(detailsDict().
lookup(
"insideOutsideCheck")),
63 randomiseInitialGrid_(detailsDict().
lookup(
"randomiseInitialGrid")),
64 randomPerturbationCoeff_
69 Info<<
" Inside/Outside check is " << insideOutsideCheck_.asText()
82 pointFileName_.name(),
90 Info<<
" Inserting points from file " << pointFileName_ <<
endl;
95 <<
"Point file contain no points" 106 const bool isParentFile = (
points.objectPath() !=
points.filePath());
128 bool foundAlready =
false;
136 allProcPt[proci][ptI] =
false;
138 else if (allProcPt[proci][ptI])
153 if (insideOutsideCheck_)
171 if (randomiseInitialGrid_)
188 reduce(nPointsRejected, sumOp<label>());
193 Info<<
" " << nPointsRejected <<
" points rejected from " 194 << pointFileName_.name() <<
endl;
void inplaceSubset(const UList< T > &select, const T &value, ListType &)
Inplace extract elements of List when select is a certain value.
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
#define forAll(list, i)
Loop across all elements in list.
const cellShapeControl & cellShapeControls() const
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual List< Vb::Point > initialPoints() const
Return the initial points for the conformalVoronoiMesh.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
vectorIOField pointIOField
pointIOField is a vectorIOField.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
Macros for easy insertion into run-time selection tables.
List< bool > boolList
Bool container classes.
pointFile(const dictionary &initialPointsDict, const Time &runTime, Random &rndGen, const conformationSurfaces &geometryToConformTo, const cellShapeControl &cellShapeControls, const autoPtr< backgroundMeshDecomposition > &decomposition)
Construct from components.
stressControl lookup("compactNormalStress") >> compactNormalStress
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
static bool & parRun()
Is this a parallel run?
static label nProcs(const label communicator=0)
Number of processes in parallel run.
vector point
Point is a vector.
virtual List< Vb::Point > initialPoints() const =0
Return the initial points for the conformalVoronoiMesh.
const conformationSurfaces & geometryToConformTo() const
const Time & time() const
autoPtr< mapDistribute > distributePoints(List< PointType > &points) const
Distribute supplied the points to the appropriate processor.
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
const backgroundMeshDecomposition & decomposition() const
scalar scalar01()
Scalar [0..1] (so including 0,1)
scalar minimumSurfaceDistanceCoeffSqr_
Only allow the placement of initial points that are within the.