35 maxGlobalCells_(
dict.lookup<
label>(
"maxGlobalCells")),
36 maxLocalCells_(
dict.lookup<
label>(
"maxLocalCells")),
37 minRefineCells_(
dict.lookup<
label>(
"minRefinementCells")),
47 nBufferLayers_(
dict.lookup<
label>(
"nCellsBetweenLevels")),
48 selectionPoints_(
dict),
49 allowFreeStandingZoneFaces_(
dict.lookup(
"allowFreeStandingZoneFaces")),
50 useTopologicalSnapDetection_
52 dict.lookupOrDefault<bool>(
"useTopologicalSnapDetection", true)
54 maxLoadUnbalance_(
dict.lookupOrDefault<scalar>(
"maxLoadUnbalance", 0)),
57 dict.lookupOrDefault<
Switch>(
"handleSnapProblems", true)
60 scalar featAngle(
dict.lookup<scalar>(
"resolveFeatureAngle",
unitDegrees));
62 if (featAngle < 0 || featAngle >
degToRad(180))
99 Info <<
"Cell selection insidePoints: " << inside_ <<
endl;
104 Info <<
"Cell selection outsidePoints: " << outside_ <<
endl;
107 if (!inside_.size() && !outside_.size())
110 <<
"Neither insidePoint/insidePoints nor "
111 "outsidePoint/outsidePoints specified: "
112 <<
"cannot select any cells."
134 const point& insidePoint = selectionPoints_.
inside()[i];
138 label globalCelli = -1;
140 if (localCelli != -1)
142 globalCelli = globalCells.
toGlobal(localCelli);
147 if (globalCelli == -1)
150 <<
"Point " << insidePoint
151 <<
" is not inside the mesh or on a face or edge." <<
nl
152 <<
"Bounding box of the mesh:" << mesh.
bounds()
158 label procCelli = globalCells.
toLocal(proci, globalCelli);
160 Info<<
"Found point " << insidePoint <<
" in cell " << procCelli
161 <<
" on processor " << proci <<
endl;
164 if (globalCells.
isLocal(globalCelli))
166 cellLabels[i] = localCelli;
#define forAll(list, i)
Loop across all elements in list.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
A list of keyword definitions, which are a keyword followed by any number of values (e....
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
label whichProcID(const label i) const
Which processor does global come from? Binary search.
label toGlobal(const label i) const
From local to global.
label toLocal(const label i) const
From global to local on current processor.
bool isLocal(const label i) const
Is on local processor.
Mesh consisting of general polyhedral cells.
label findCell(const point &p, const cellDecomposition=CELL_TETS) const
Find cell enclosing this location and return index.
const labelIOList & tetBasePtIs() const
Return the tetBasePtIs.
const boundBox & bounds() const
Return mesh bounding box.
cellSelectionPoints(const dictionary &dict)
Constructor.
const List< point > & inside() const
Return the points inside the surface regions to selected cells.
refinementParameters(const dictionary &dict)
Construct from dictionary - new syntax.
labelList findCells(const polyMesh &) const
Checks that cells are in mesh. Returns cells they are in.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
scalar degToRad(const scalar deg)
Convert degrees to radians.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimLength
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
dimensionedScalar cos(const dimensionedScalar &ds)
const unitConversion unitDegrees