Go to the documentation of this file.
53 "locationsOutsideMesh",
57 faceZoneControls_(
dict.subOrEmptyDict(
"faceZoneControls")),
58 allowFreeStandingZoneFaces_(
dict.
lookup(
"allowFreeStandingZoneFaces")),
59 useTopologicalSnapDetection_
61 dict.lookupOrDefault<bool>(
"useTopologicalSnapDetection", true)
63 maxLoadUnbalance_(
dict.lookupOrDefault<scalar>(
"maxLoadUnbalance", 0)),
66 dict.lookupOrDefault<
Switch>(
"handleSnapProblems", true)
70 dict.lookupOrDefault<
Switch>(
"interfaceRefine", true)
74 if (
dict.readIfPresent(
"locationInMesh", locationInMesh))
79 if (
dict.found(
"locationsInMesh"))
82 <<
"Cannot both specify 'locationInMesh' and 'locationsInMesh'"
88 if (
dict.readIfPresent(
"locationsInMesh", pointsToZone))
109 if (featAngle < 0 || featAngle > 180)
129 patchInfo.
add(
"type", wallPolyPatch::typeName);
132 if (faceZoneControls_.found(fzName))
136 if (fzDict.
found(
"patchInfo"))
138 patchInfo = fzDict.
subDict(
"patchInfo");
156 labelList zoneIDs(zonesInMesh_.size(), -1);
159 if (zonesInMesh_[i] !=
word::null && zonesInMesh_[i] !=
"none")
175 const bool checkInsideMesh,
191 const point& location = locations[i];
195 label globalCellI = -1;
197 if (localCellI != -1)
199 globalCellI = globalCells.
toGlobal(localCellI);
204 if (checkInsideMesh && globalCellI == -1)
207 <<
"Point " << location
208 <<
" is not inside the mesh or on a face or edge." <<
nl
209 <<
"Bounding box of the mesh:" <<
mesh.
bounds()
215 label procCellI = globalCells.
toLocal(procI, globalCellI);
217 Info<<
"Found point " << location <<
" in cell " << procCellI
218 <<
" on processor " << procI <<
endl;
220 if (globalCells.
isLocal(globalCellI))
222 cellLabels[i] = localCellI;
245 && zonesInMesh[i] !=
"none"
267 || zonesInMesh[i] ==
"none"
static labelList zonedLocations(const wordList &zonesInMesh)
Extract indices of named locations (so excludes 'keepPoints')
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
faceZoneType
What to do with faceZone faces.
A class for handling words, derived from string.
List< label > labelList
A List of labels.
#define forAll(list, i)
Loop across all elements in list.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
const labelList & tetBasePtIs() const
Return the tetBasePtIs.
Unit conversion functions.
static labelList findCells(const bool checkInsideMesh, const polyMesh &, const pointField &locations)
Checks that cells are in mesh. Returns cells (or -1) they.
bool isLocal(const label i) const
Is on local processor.
Ostream & endl(Ostream &os)
Add newline and flush stream.
scalar curvature_
Curvature.
wordList zonesInMesh_
Region for location.
Mesh consisting of general polyhedral cells.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
Pre-declare SubField and related Field type.
void append(const T &)
Append an element at the end of the list.
refinementParameters(const refinementParameters &)
Disallow default bitwise copy construct.
static labelList unzonedLocations(const wordList &zonesInMesh)
Extract indices of unnamed locations ('keepPoints')
A list of keyword definitions, which are a keyword followed by any number of values (e....
static const NamedEnum< faceZoneType, 3 > faceZoneTypeNames
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const boundBox & bounds() const
Return mesh bounding box.
pointField locationsInMesh_
Areas to keep.
void setSize(const label)
Reset size of List.
label toLocal(const label i) const
From global to local on current processor.
label findCell(const point &p, const cellDecomposition=CELL_TETS) const
Find cell enclosing this location and return index.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
dictionary getZoneInfo(const word &fzName, surfaceZonesInfo::faceZoneType &faceType) const
Get patchInfo and faceType for faceZone.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label whichProcID(const label i) const
Which processor does global come from? Binary search.
static const word null
An empty word.
label readLabel(Istream &is)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
void size(const label)
Override size to be inconsistent with allocated storage.
labelList addCellZonesToMesh(polyMesh &) const
Add cellZones to mesh. Return indices of cellZones (or -1)
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
label toGlobal(const label i) const
From local to global.
stressControl lookup("compactNormalStress") >> compactNormalStress
static label addCellZone(const word &name, const labelList &addressing, polyMesh &mesh)
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
dimensionedScalar cos(const dimensionedScalar &ds)