48 const conformationSurfaces& geometryToConformTo,
49 const cellShapeControl& cellShapeControls,
50 const autoPtr<backgroundMeshDecomposition>& decomposition
63 pointFileName_(detailsDict().
get<fileName>(
"pointFile").
expand()),
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"
123 pointFileName_.name(),
124 time().caseConstant(),
134 <<
"Point file contain no points"
149 bool foundAlready =
false;
157 allProcPt[proci][ptI] =
false;
159 else if (allProcPt[proci][ptI])
173 <<
"Cannot find points file " << pointsIO.objectPath()
180 if (insideOutsideCheck_)
198 if (randomiseInitialGrid_)
201 randomPerturbationCoeff_
204 randomPerturbationCoeff_
207 randomPerturbationCoeff_
221 reduce(nPointsRejected, sumOp<label>());
226 Info<<
" " << nPointsRejected <<
" points rejected from "
227 << pointFileName_.name() <<
endl;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
CGAL::Triangulation_vertex_base_2< K >::Point Point
@ MUST_READ
Reading required.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static void allGatherList(UList< T > &values, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Gather data, but keep individual values separate. Uses MPI_Allgather or manual communication.
Type sample01()
Return a sample whose components lie in the range [0,1].
static int myProcNo(const label communicator=worldComm)
Rank of this process in the communicator (starting from masterNo()). Negative if the process is not a...
static label nProcs(const label communicator=worldComm)
Number of ranks in parallel run (for given communicator). It is 1 for serial run.
static bool & parRun() noexcept
Test if this a parallel run.
autoPtr< mapDistribute > distributePoints(List< PointType > &points) const
Distribute supplied the points to the appropriate processor.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base class for generating initial points for a conformalVoronoiMesh.
const Time & time() const
scalar minimumSurfaceDistanceCoeffSqr_
Only allow the placement of initial points that are within the.
const conformationSurfaces & geometryToConformTo() const
const cellShapeControl & cellShapeControls() const
const backgroundMeshDecomposition & decomposition() const
Inserts points at locations specified in a pointFile into the surfaces to be conformed to of the conf...
pointFile(const dictionary &initialPointsDict, const Time &runTime, Random &rndGen, const conformationSurfaces &geometryToConformTo, const cellShapeControl &cellShapeControls, const autoPtr< backgroundMeshDecomposition > &decomposition)
Construct from components.
virtual List< Vb::Point > initialPoints() const
Return the initial points for the conformalVoronoiMesh.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
string expand(const std::string &s, const HashTable< string > &mapping, const char sigil='$')
Expand occurrences of variables according to the mapping and return the expanded string.
void inplaceSubset(const BoolListType &select, ListType &input, const bool invert=false)
Inplace extract elements of the input list when select is true.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
messageStream Info
Information stream (stdout output on master, null elsewhere).
vectorIOField pointIOField
pointIOField is a vectorIOField.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void reduce(T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce).
vector point
Point is a vector.
List< bool > boolList
A List of bools.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
vectorField pointField
pointField is a vectorField.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define forAll(list, i)
Loop across all elements in list.