49 selectionPoints_(
dict),
50 allowFreeStandingZoneFaces_(
dict.
lookup(
"allowFreeStandingZoneFaces")),
51 useTopologicalSnapDetection_
53 dict.lookupOrDefault<bool>(
"useTopologicalSnapDetection", true)
55 maxLoadUnbalance_(
dict.lookupOrDefault<scalar>(
"maxLoadUnbalance", 0)),
58 dict.lookupOrDefault<
Switch>(
"handleSnapProblems", true)
61 const scalar featAngle
66 if (featAngle < 0 || featAngle >
degToRad(180))
103 Info <<
"Cell selection insidePoints: " << inside_ <<
endl;
108 Info <<
"Cell selection outsidePoints: " << outside_ <<
endl;
111 if (!inside_.size() && !outside_.size())
114 <<
"Neither insidePoint/insidePoints nor "
115 "outsidePoint/outsidePoints specified: "
116 <<
"cannot select any cells."
139 const point& insidePoint = selectionPoints_.
inside()[i];
143 label globalCelli = -1;
145 if (localCelli != -1)
147 globalCelli = globalCells.
toGlobal(localCelli);
152 if (globalCelli == -1)
155 <<
"Point " << insidePoint
156 <<
" is not inside the mesh or on a face or edge." <<
nl
157 <<
"Bounding box of the mesh:" <<
mesh.
bounds()
163 label procCelli = globalCells.
toLocal(proci, globalCelli);
165 Info<<
"Found point " << insidePoint <<
" in cell " << procCelli
166 <<
" on processor " << proci <<
endl;
169 if (globalCells.
isLocal(globalCelli))
171 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 keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
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 object that implements searches within the local cells and faces.
label findCell(const point &p, const pointInCellShapes=pointInCellShapes::tets) const
Find the cell containing the given point.
static const meshSearch & New(const polyMesh &mesh, const pointInCellShapes=pointInCellShapes::tets)
Lookup or construct from mesh and cell decomposition option.
Mesh consisting of general polyhedral cells.
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.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
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)