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)
79 dict.
found(
"insidePoints")
81 : dict.
found(
"insidePoint")
83 : dict.
found(
"locationInMesh")
89 dict.
found(
"outsidePoints")
91 : dict.
found(
"outsidePoint")
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()
156 label proci = globalCells.whichProcID(globalCelli);
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;
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
#define forAll(list, i)
Loop across all elements in list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const labelIOList & tetBasePtIs() const
Return the tetBasePtIs.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Unit conversion functions.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none/any.
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
labelList findCells(const polyMesh &) const
Checks that cells are in mesh. Returns cells they are in.
cellSelectionPoints(const dictionary &dict)
Constructor.
const List< point > & inside() const
Return the points inside the surface regions to selected cells.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
stressControl lookup("compactNormalStress") >> compactNormalStress
dimensionedScalar cos(const dimensionedScalar &ds)
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
refinementParameters(const dictionary &dict)
Construct from dictionary - new syntax.
const boundBox & bounds() const
Return mesh bounding box.
label findCell(const point &p, const cellDecomposition=CELL_TETS) const
Find cell enclosing this location and return index.
Mesh consisting of general polyhedral cells.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.