35 maxGlobalCells_(
dict.lookup<
label>(
"maxGlobalCells")),
36 maxLocalCells_(
dict.lookup<
label>(
"maxLocalCells")),
37 minRefineCells_(
dict.lookup<
label>(
"minRefinementCells")),
43 dict.lookup<scalar>(
"resolveFeatureAngle")
46 nBufferLayers_(
dict.lookup<
label>(
"nCellsBetweenLevels")),
47 selectionPoints_(
dict),
48 allowFreeStandingZoneFaces_(
dict.lookup(
"allowFreeStandingZoneFaces")),
49 useTopologicalSnapDetection_
51 dict.lookupOrDefault<bool>(
"useTopologicalSnapDetection", true)
53 maxLoadUnbalance_(
dict.lookupOrDefault<scalar>(
"maxLoadUnbalance", 0)),
56 dict.lookupOrDefault<
Switch>(
"handleSnapProblems", true)
59 scalar featAngle(
dict.lookup<scalar>(
"resolveFeatureAngle"));
61 if (featAngle < 0 || featAngle > 180)
98 Info <<
"Cell selection insidePoints: " << inside_ <<
endl;
103 Info <<
"Cell selection outsidePoints: " << outside_ <<
endl;
106 if (!inside_.size() && !outside_.size())
109 <<
"Neither insidePoint/insidePoints nor "
110 "outsidePoint/outsidePoints specified: "
111 <<
"cannot select any cells."
133 const point& insidePoint = selectionPoints_.
inside()[i];
137 label globalCelli = -1;
139 if (localCelli != -1)
141 globalCelli = globalCells.
toGlobal(localCelli);
146 if (globalCelli == -1)
149 <<
"Point " << insidePoint
150 <<
" is not inside the mesh or on a face or edge." <<
nl
151 <<
"Bounding box of the mesh:" << mesh.
bounds()
157 label procCelli = globalCells.
toLocal(proci, globalCelli);
159 Info<<
"Found point " << insidePoint <<
" in cell " << procCelli
160 <<
" on processor " << proci <<
endl;
163 if (globalCells.
isLocal(globalCelli))
165 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)
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.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
dimensionedScalar cos(const dimensionedScalar &ds)
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
Unit conversion functions.