Go to the documentation of this file.
79 Info<<
"Writing " << msg <<
" (" <<
cells.size() <<
") to cellSet "
105 const bool selectCut,
106 const bool selectInside,
107 const bool selectOutside,
108 const scalar nearDist,
126 writeSet(inside,
"inside cells");
130 writeSet(outside,
"outside cells");
134 writeSet(cutCells,
"cells cut by surface");
183 <<
"Multiple mesh regions in original mesh" <<
endl
184 <<
"Please use splitMeshRegions to separate these"
192 Info<<
"Removing cells with points closer than " << nearDist
193 <<
" to the surface ..." <<
nl <<
endl;
202 const point& pt = pts[pointi];
243 Info<<
"Removed " << nRemoved <<
" cells since too close to surface"
252 label selectOutsideCells
266 labelHashSet outsideFacesMap(outsidePts.size() * 6 * 2);
274 forAll(outsidePts, outsidePtI)
277 label celli = queryMesh.
findCell(outsidePts[outsidePtI], -1,
false);
279 if (celli != -1 &&
cellType[celli] == MESH)
281 Info<<
"Marking cell " << celli <<
" containing outside point "
282 << outsidePts[outsidePtI] <<
" with type " <<
cellType[celli]
293 label facei = cFaces[i];
295 if (outsideFacesMap.insert(facei))
297 outsideFaces.
append(facei);
298 outsideFacesInfo.append(meshInfo);
308 outsideFaces.shrink(),
309 outsideFacesInfo.shrink(),
319 forAll(allCellInfo, celli)
325 if (allCellInfo[celli].
type() != MESH)
338 int main(
int argc,
char *argv[])
342 "Select cells in relation to surface"
368 pointField outsidePts(refineDict.lookup(
"outsidePoints"));
369 const bool useSurface(refineDict.get<
bool>(
"useSurface"));
370 const bool selectCut(refineDict.get<
bool>(
"selectCut"));
371 const bool selectInside(refineDict.get<
bool>(
"selectInside"));
372 const bool selectOutside(refineDict.get<
bool>(
"selectOutside"));
373 const scalar nearDist(refineDict.get<scalar>(
"nearDistance"));
378 Info<<
"Cells to be used for meshing (0=false, 1=true):" <<
nl
379 <<
" cells cut by surface : " << selectCut <<
nl
380 <<
" cells inside of surface : " << selectInside <<
nl
381 <<
" cells outside of surface : " << selectOutside <<
nl
382 <<
" cells with points further than : " << nearDist <<
nl
387 Info<<
"Cells to be used for meshing (0=false, 1=true):" <<
nl
388 <<
" cells reachable from outsidePoints:" << selectOutside <<
nl
393 (void)edgeCalc.minLen(
Info);
399 forAll(outsidePts, outsideI)
401 const point& outsidePoint = outsidePts[outsideI];
403 label celli = queryMesh.
findCell(outsidePoint, -1,
false);
407 <<
"outsidePoint " << outsidePoint
408 <<
" is not inside any cell"
431 surf.writeStats(
Info);
456 label nHanging, nRegionEdges, nRegionPoints, nOutside;
460 Info<<
"Removing cells which after subsetting would have all points"
461 <<
" on outside ..." <<
nl <<
endl;
463 nHanging =
cellType.fillHangingCells
471 Info<<
"Removing edges connecting cells unconnected by faces ..."
474 nRegionEdges =
cellType.fillRegionEdges
482 Info<<
"Removing points connecting cells unconnected by faces ..."
485 nRegionPoints =
cellType.fillRegionPoints
498 nOutside = selectOutsideCells
510 || nRegionPoints != 0
515 getType(
cellType, MESH, selectedCells);
517 writeSet(selectedCells,
"cells selected for meshing");
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
virtual const pointField & points() const
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Helper class to calculate minimum edge length on mesh.
void set(List< bool > &bools, const labelRange &range)
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search.
A class for handling file names.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
const cellList & cells() const
static void addNote(const string ¬e)
void append(const T &val)
Ostream & endl(Ostream &os)
label findCell(const point &location, const label seedCelli=-1, const bool useTreeSearch=true) const
A HashTable with keys but without contents that is similar to std::unordered_set.
Helper class to search on triSurface.
Mesh consisting of general polyhedral cells.
label nCells() const noexcept
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
bool hit() const noexcept
Generic templated field type.
Triangulated surface description with patch information.
const indexedOctree< treeDataTriSurface > & tree() const
Non-pointer based hierarchical recursive searching.
A collection of cell labels.
'Cuts' a mesh with a surface.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Holds information regarding type of cell. Used in inside/outside determination in cellClassification.
const word & system() const
#define FatalErrorInFunction
dimensionedSymmTensor sqr(const dimensionedVector &dv)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
fileName::Type type(const fileName &name, const bool followLink=true)
const labelListList & pointCells() const
label nTotalCells() const noexcept
const globalMeshData & globalData() const