Go to the documentation of this file.
33 #include "triSurface.H"
36 #include "uindirectPrimitivePatch.H"
63 label edgeI = pEdges[pEdgeI];
85 label nbrEdgeI = pEdges[pEdgeI];
87 if (nbrEdgeI != edgeI)
89 label featI = edgeToFeature_[nbrEdgeI];
108 const label startEdgeI,
114 label edgeI = startEdgeI;
120 while (!isFeaturePoint[vertI])
124 edgeI = nextFeatureEdge(edgeI, vertI);
126 if ((edgeI == -1) || (edgeI == startEdgeI))
135 vertI =
e.otherVertex(vertI);
147 labelList featLabels(featureEdges_.size());
149 label featLabelI = 0;
151 label initEdgeI = edgeI;
156 label featI = edgeToFeature_[edgeI];
163 featLabels[featLabelI++] = featI;
165 featVisited[featI] =
true;
171 vertI =
e.otherVertex(vertI);
175 edgeI = nextFeatureEdge(edgeI, vertI);
177 if ((edgeI == -1) || (edgeI == initEdgeI))
182 while (!isFeaturePoint[vertI]);
186 featLabels.
setSize(featLabelI);
194 const label maxDistance,
205 if (minDistance[edgeI] == -1)
210 else if (minDistance[edgeI] <=
distance)
223 forAll(startEdges, pEdgeI)
256 const word& patchName
277 names[patchI] = patches_[patchI].name();
293 if ((faceI >= pp.
start()) && (faceI < (pp.
start() + pp.size())))
317 label faceI = changedFaces[i];
323 label edgeI = fEdges[fEdgeI];
325 if (!regionEdge[edgeI] && (edgeRegion[edgeI] == -1))
327 edgeRegion[edgeI] = region;
329 changedEdges[changedI++] = edgeI;
334 changedEdges.
setSize(changedI);
353 label edgeI = changedEdges[i];
359 label faceI = eFaces[eFaceI];
361 if (faceRegion[faceI] == -1)
363 faceRegion[faceI] = region;
365 changedFaces[changedI++] = faceI;
370 changedFaces.
setSize(changedI);
397 changedEdges = faceToEdge
407 Pout<<
"From changedFaces:" << changedFaces.
size()
408 <<
" to changedEdges:" << changedEdges.
size()
412 if (changedEdges.empty())
417 changedFaces = edgeToFace(currentZone, changedEdges,
faceZone);
421 Pout<<
"From changedEdges:" << changedEdges.
size()
422 <<
" to changedFaces:" << changedFaces.
size()
426 if (changedFaces.empty())
483 meshFace_.setSize(nBFaces);
508 meshFace_[bFaceI] = pp.
start() + patchFaceI;
510 bFaces[bFaceI] = pp[patchFaceI];
519 Pout<<
"read : patches now:" <<
endl;
552 const bMesh& msh = *meshPtr_;
554 Pout<<
"** Start of Faces **" <<
endl;
558 const face&
f = msh[faceI];
574 Pout<<
"** End of Faces **" <<
endl;
576 Pout<<
"** Start of Points **" <<
endl;
581 <<
" coord:" << msh.
points()[pointI]
585 Pout<<
"** End of Points **" <<
endl;
589 featurePoints_.setSize(0);
590 featureEdges_.setSize(0);
592 featureToEdge_.setSize(0);
593 edgeToFeature_.setSize(meshPtr_->nEdges());
596 featureSegments_.setSize(0);
598 extraEdges_.setSize(0);
616 regions[triI] = surf[triI].region();
623 label oldRegion = -1111;
624 label boundPatch = 0;
628 if (regions[i] != oldRegion)
630 regionToBoundaryPatch.insert(regions[i], boundPatch);
632 oldRegion = regions[i];
641 if (surfPatches.
size() == regionToBoundaryPatch.size())
646 patches_.setSize(surfPatches.
size());
649 forAll(surfPatches, patchI)
671 patches_.
setSize(regionToBoundaryPatch.size());
680 "patch" +
name(patchI),
698 meshFace_.setSize(surf.
size());
703 label surfRegion = regions[0];
704 label foamRegion = regionToBoundaryPatch[surfRegion];
706 Pout<<
"Surface region " << surfRegion <<
" becomes boundary patch "
707 << foamRegion <<
" with name " << patches_[foamRegion].
name() <<
endl;
711 label startFaceI = 0;
715 label triI = indices[indexI];
719 if (tri.
region() != surfRegion)
724 bp.
size() = bFaceI - startFaceI;
725 bp.
start() = startFaceI;
727 surfRegion = tri.
region();
728 foamRegion = regionToBoundaryPatch[surfRegion];
730 Pout<<
"Surface region " << surfRegion <<
" becomes boundary patch "
731 << foamRegion <<
" with name " << patches_[foamRegion].
name()
737 meshFace_[bFaceI] = triI;
739 bFaces[bFaceI++] =
face(tri);
745 bp.
size() = bFaceI - startFaceI;
746 bp.
start() = startFaceI;
758 featurePoints_.setSize(0);
759 featureEdges_.setSize(0);
761 featureToEdge_.setSize(0);
762 edgeToFeature_.setSize(meshPtr_->nEdges());
765 featureSegments_.setSize(0);
767 extraEdges_.setSize(0);
779 surfPatches[patchI] =
795 label totalNTris = getNTris(0,
mesh().size(), nTris);
804 startTri[faceI] = triI;
806 triI += nTris[faceI];
812 triangulate(0,
mesh().size(), totalNTris, triVerts);
828 label triVertI = 3*startTri[faceI];
830 for (
label faceTriI = 0; faceTriI < nTris[faceI]; faceTriI++)
832 label v0 = triVerts[triVertI++];
833 label v1 = triVerts[triVertI++];
834 label v2 = triVerts[triVertI++];
845 surf.
write(surfStream);
875 scalar
sign =
mesh().faceNormals()[bFaceI] & splitNormal_;
879 rightFaces.
append(bFaceI);
892 Pout<<
"getNearest :"
893 <<
" rightBin:" << rightFaces.size()
894 <<
" leftBin:" << leftFaces.size()
915 scalar tol = 1
e-6 * overallBb.
avgDim();
927 const scalar planarTol =
968 Pout<<
"getNearest : built trees" <<
endl;
983 const scalar searchDimSqr =
magSqr(searchSpan);
985 forAll(nearestBFaceI, patchFaceI)
991 if (debug && (patchFaceI % 1000) == 0)
993 Pout<<
"getNearest : patchFace:" << patchFaceI
994 <<
" meshFaceI:" << meshFaceI <<
" ctr:" << ctr <<
endl;
1000 scalar area =
mag(
n);
1003 scalar typDim = -GREAT;
1012 pointIndexHit rightInfo = rightTree.findNearest(ctr, searchDimSqr);
1016 pointIndexHit leftInfo = leftTree.findNearest(ctr, searchDimSqr);
1018 if (rightInfo.
hit())
1023 label rightFaceI = rightFaces[rightInfo.
index()];
1024 label leftFaceI = leftFaces[leftInfo.
index()];
1029 scalar rightSign =
n & ns[rightFaceI];
1030 scalar leftSign =
n & ns[leftFaceI];
1034 (rightSign > 0 && leftSign > 0)
1035 || (rightSign < 0 && leftSign < 0)
1039 if (rightDist < leftDist)
1041 nearestBFaceI[patchFaceI] = rightFaceI;
1045 nearestBFaceI[patchFaceI] = leftFaceI;
1057 typDim *= distanceTol_;
1059 if (rightDist < typDim && leftDist < typDim)
1064 nearestBFaceI[patchFaceI] = rightFaceI;
1068 nearestBFaceI[patchFaceI] = leftFaceI;
1074 if (rightDist < leftDist)
1076 nearestBFaceI[patchFaceI] = rightFaceI;
1080 nearestBFaceI[patchFaceI] = leftFaceI;
1089 label rightFaceI = rightFaces[rightInfo.
index()];
1090 nearestBFaceI[patchFaceI] = rightFaceI;
1101 nearestBFaceI[patchFaceI] = leftFaces[leftInfo.
index()];
1106 nearestBFaceI[patchFaceI] = -1;
1111 return nearestBFaceI;
1130 Map<word> indexToName(2*patches_.size());
1133 label nNewPatches = patches_.size();
1135 forAll(oldPatches, oldPatchI)
1137 const polyPatch& patch = oldPatches[oldPatchI];
1140 if (newPatchI != -1)
1143 indexToName.insert(newPatchI, patch.
name());
1149 forAll(patches_, bPatchI)
1156 indexToName.insert(bPatchI, bp.
name());
1173 forAll(patches_, bPatchI)
1177 const label newPatchI = nameToIndex[bp.
name()];
1182 if (oldPatchI == -1)
1187 Pout<<
"patchify : Creating new polyPatch:" << bp.
name()
1201 meshFaceI += facesToBeDone;
1209 const polyPatch& oldPatch = oldPatches[oldPatchI];
1213 Pout<<
"patchify : Cloning existing polyPatch:"
1217 newPatchPtrList[newPatchI] = oldPatch.
clone
1225 meshFaceI += facesToBeDone;
1235 Pout<<
"Patchify : new polyPatch list:" <<
endl;
1237 forAll(newPatchPtrList, patchI)
1239 const polyPatch& newPatch = *newPatchPtrList[patchI];
1244 <<
" type :" << newPatch.typeName <<
endl
1245 <<
" size :" << newPatch.size() <<
endl
1246 <<
" start:" << newPatch.
start() <<
endl
1247 <<
" index:" << patchI <<
endl;
1260 if (newPatchPtrList.
size())
1271 patchFaces[newPatchI].setCapacity(nAvgFaces);
1279 forAll(oldPatches, oldPatchI)
1281 const polyPatch& patch = oldPatches[oldPatchI];
1283 forAll(patch, patchFaceI)
1287 label meshFaceI = patch.
start() + patchFaceI;
1321 edgeToFeature_.setSize(
mesh().nEdges());
1323 edgeToFeature_ = -1;
1328 featureToEdge_.setSize(
mesh().nEdges());
1332 if (minCos >= 0.9999)
1337 edgeToFeature_[edgeI] = featureI;
1338 featureToEdge_[featureI++] = edgeI;
1347 if (eFaces.
size() == 2)
1349 label face0I = eFaces[0];
1351 label face1I = eFaces[1];
1362 const vector& n0 =
mesh().faceNormals()[face0I];
1364 const vector& n1 =
mesh().faceNormals()[face1I];
1366 float cosAng = n0 & n1;
1368 if (cosAng < minCos)
1370 edgeToFeature_[edgeI] = featureI;
1371 featureToEdge_[featureI++] = edgeI;
1378 edgeToFeature_[edgeI] = featureI;
1379 featureToEdge_[featureI++] = edgeI;
1385 featureToEdge_.setSize(featureI);
1391 featureEdges_.setSize(featureI);
1398 forAll(featureToEdge_, fEdgeI)
1400 label edgeI = featureToEdge_[fEdgeI];
1404 label start = featToMeshPoint[
e.start()];
1408 featToMeshPoint[
e.start()] = featPtI;
1410 featurePoints_[featPtI] =
mesh().
points()[
e.start()];
1417 label end = featToMeshPoint[
e.end()];
1421 featToMeshPoint[
e.end()] = featPtI;
1423 featurePoints_[featPtI] =
mesh().
points()[
e.end()];
1431 featureEdges_[fEdgeI] =
edge(start, end);
1435 featurePoints_.setSize(featPtI);
1447 forAll(featureToEdge_, featI)
1449 label edgeI = featureToEdge_[featI];
1453 if (nFeatureEdges(
e.start()) != 2)
1455 isFeaturePoint[
e.start()] =
true;
1458 if (nFeatureEdges(
e.end()) != 2)
1460 isFeaturePoint[
e.end()] =
true;
1473 boolList featVisited(featureToEdge_.size(),
false);
1477 label startFeatI = -1;
1479 forAll(featVisited, featI)
1481 if (!featVisited[featI])
1489 if (startFeatI == -1)
1500 featureToEdge_[startFeatI],
1511 featureSegments_.setSize(segments.size());
1513 forAll(featureSegments_, segmentI)
1515 featureSegments_[segmentI] = segments[segmentI];
1528 markEdges(8, edgeI, 0, minDistance, visitedEdges);
1531 extraEdges_.transfer(visitedEdges);
1548 <<
"Cannot find face " << faceI <<
" in list of boundaryPatches "
1560 if (patches_[patchI].
name() == patchName)
1572 patches_.setSize(patches_.size() + 1);
1576 label patchI = patches_.size()-1;
1587 patches_.set(patchI, bpPtr);
1591 Pout<<
"addPatch : patches now:" <<
endl;
1611 if (delPatchI == -1)
1614 <<
"Can't find patch named " << patchName
1618 if (patches_[delPatchI].size())
1621 <<
"Trying to delete non-empty patch " << patchName
1622 <<
endl <<
"Current size:" << patches_[delPatchI].size()
1628 for (
label patchI = 0; patchI < delPatchI; patchI++)
1630 newPatches.
set(patchI, patches_[patchI].clone());
1635 for (
label patchI = delPatchI + 1; patchI < patches_.size(); patchI++)
1637 newPatches.
set(patchI - 1, patches_[patchI].clone());
1642 patches_ = newPatches;
1646 Pout<<
"deletePatch : patches now:" <<
endl;
1664 const word& patchName,
1665 const word& patchType
1673 <<
"Can't find patch named " << patchName
1686 if (patchI == changeI)
1700 newPatches.
set(patchI, bpPtr);
1705 newPatches.
set(patchI, patches_[patchI].clone());
1709 patches_ = newPatches;
1719 if (patchIDs.
size() !=
mesh().size())
1722 <<
"List of patchIDs not equal to number of faces." <<
endl
1723 <<
"PatchIDs size:" << patchIDs.
size()
1734 label patchID = patchIDs[faceI];
1736 if (patchID < 0 || patchID >= patches_.size())
1739 <<
"PatchID " << patchID <<
" out of range"
1752 for (
label patchI = 1; patchI < patches_.size(); patchI++)
1754 startFace[patchI] = startFace[patchI-1] + nFaces[patchI-1];
1777 patches_ = newPatches;
1781 Pout<<
"changeFaces : patches now:" <<
endl;
1801 int patchID = patchIDs[faceI];
1803 oldToNew[faceI] = startFace[patchID]++;
1813 newFaces[oldToNew[faceI]] =
mesh()[faceI];
1814 newMeshFace[oldToNew[faceI]] = meshFace_[faceI];
1821 meshFace_.transfer(newMeshFace);
1828 meshPtr_ = newMeshPtr_;
1842 const label startFaceI,
1847 label totalNTris = 0;
1851 for (
label i = 0; i < nFaces; i++)
1853 label faceNTris = getNTris(startFaceI + i);
1855 nTris[i] = faceNTris;
1857 totalNTris += faceNTris;
1867 const label startFaceI,
1869 const label totalNTris,
1874 triVerts.
setSize(3*totalNTris);
1878 for (
label i = 0; i < nFaces; i++)
1880 label faceI = startFaceI + i;
1893 forAll(triFaces, triFaceI)
1895 const face& triF = triFaces[triFaceI];
1897 triVerts[vertI++] = triF[0];
1898 triVerts[vertI++] = triF[1];
1899 triVerts[vertI++] = triF[2];
1908 const label startFaceI,
1923 const label startFaceI,
1925 const label totalNTris,
1938 triVerts.
setSize(3*totalNTris);
1942 for (
label i = 0; i < nFaces; i++)
1956 forAll(triFaces, triFaceI)
1958 const face& triF = triFaces[triFaceI];
1960 triVerts[vertI++] = triF[0];
1961 triVerts[vertI++] = triF[1];
1962 triVerts[vertI++] = triF[2];
1971 const label seedFaceI,
1977 forAll(protectedEdges, i)
1979 protectedEdge[protectedEdges[i]] =
true;
1987 markZone(protectedEdge, seedFaceI, 0, currentZone);
1992 forAll(currentZone, faceI)
1994 if (currentZone[faceI] == 0)
1996 visited[faceI] =
true;
2000 visited[faceI] =
false;
const bMesh & mesh() const
virtual const pointField & points() const
Return raw points.
label index() const
Return index.
boundaryMesh()
Construct null.
void triangulateLocal(const label startFaceI, const label nFaces, const label totalNTris, labelList &triVerts, labelList &localToGlobal) const
Same as triangulate but in local vertex numbering.
const Field< PointType > & points() const
Return reference to global points.
A class for handling words, derived from string.
A class for handling file names.
~boundaryMesh()
Destructor.
const point & max() const
Maximum describing the bounding box.
virtual const pointField & points() const =0
Return mesh points.
label whichPatch(const polyPatchList &, const label) const
Get index of patch for face.
void sort()
(stable) sort the list (if changed after construction time)
#define forAll(list, i)
Loop across all elements in list.
virtual const faceList & faces() const =0
Return faces.
const Field< PointType > & localPoints() const
Return pointField of points in patch.
const labelListList & edgeFaces() const
A List obtained as a section of another List.
The geometricSurfacePatch is like patchIdentifier but for surfaces. Holds type, name and index.
static const scalar distanceTol_
Distance to face tolerance for getNearest. Triangles are considered.
Standard boundBox + extra functionality for use in octree.
label nFeatureEdges(label pointI) const
Number of connected feature edges.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
bool hit() const
Is there a hit.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
dimensioned< scalar > mag(const dimensioned< Type > &)
const labelListList & pointEdges() const
labelList edgeToFace(const label region, const labelList &changedEdges, labelList &faceRegion) const
Reverse of faceToEdge: gets edges and returns faces.
wordList patchNames() const
Get names of patches.
dimensionedScalar sign(const dimensionedScalar &ds)
const geometricSurfacePatchList & patches() const
labelList patchFaces(const polyBoundaryMesh &patches, const wordList &names)
Mesh consisting of general polyhedral cells.
void changeFaces(const labelList &patchIDs, labelList &oldToNew)
Recalculate face ordering and patches. Return old to new.
Info<< "Finished reading KIVA file"<< endl;cellShapeList cellShapes(nPoints);labelList cellZoning(nPoints, -1);const cellModel &hex=*(cellModeller::lookup("hex"));labelList hexLabels(8);label activeCells=0;labelList pointMap(nPoints);forAll(pointMap, i){ pointMap[i]=i;}for(label i=0;i< nPoints;i++){ if(f[i] > 0.0) { hexLabels[0]=i;hexLabels[1]=i1tab[i];hexLabels[2]=i3tab[i1tab[i]];hexLabels[3]=i3tab[i];hexLabels[4]=i8tab[i];hexLabels[5]=i1tab[i8tab[i]];hexLabels[6]=i3tab[i1tab[i8tab[i]]];hexLabels[7]=i3tab[i8tab[i]];cellShapes[activeCells]=cellShape(hex, hexLabels);edgeList edges=cellShapes[activeCells].edges();forAll(edges, ei) { if(edges[ei].mag(points)< SMALL) { label start=pointMap[edges[ei].start()];while(start !=pointMap[start]) { start=pointMap[start];} label end=pointMap[edges[ei].end()];while(end !=pointMap[end]) { end=pointMap[end];} label minLabel=min(start, end);pointMap[start]=pointMap[end]=minLabel;} } cellZoning[activeCells]=idreg[i];activeCells++;}}cellShapes.setSize(activeCells);cellZoning.setSize(activeCells);forAll(cellShapes, celli){ cellShape &cs=cellShapes[celli];forAll(cs, i) { cs[i]=pointMap[cs[i]];} cs.collapse();}label bcIDs[11]={-1, 0, 2, 4, -1, 5, -1, 6, 7, 8, 9};const label nBCs=12;const word *kivaPatchTypes[nBCs]={ &wallPolyPatch::typeName, &wallPolyPatch::typeName, &wallPolyPatch::typeName, &wallPolyPatch::typeName, &symmetryPolyPatch::typeName, &wedgePolyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &symmetryPolyPatch::typeName, &oldCyclicPolyPatch::typeName};enum patchTypeNames{ PISTON, VALVE, LINER, CYLINDERHEAD, AXIS, WEDGE, INFLOW, OUTFLOW, PRESIN, PRESOUT, SYMMETRYPLANE, CYCLIC};const char *kivaPatchNames[nBCs]={ "piston", "valve", "liner", "cylinderHead", "axis", "wedge", "inflow", "outflow", "presin", "presout", "symmetryPlane", "cyclic"};List< SLList< face > > pFaces[nBCs]
Like polyPatch but without reference to mesh. patchIdentifier::index is not used. Used in boundaryMes...
label getNPoints(const label startFaceI, const label nFaces) const
Number of points used in face subset.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
bool set(const label) const
Is element set.
A mesh which allows changes in the patch distribution of the boundary faces. The change in patching i...
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
const word & geometricType() const
Return the type of the patch.
Triangulated surface description with patch information.
A subset of mesh faces organised as a primitive patch.
void append(const T &)
Append an element at the end of the list.
const Point & hitPoint() const
Return hit point.
A patch is a list of labels that address the faces in the global face list.
virtual const fileName & name() const
Return the name of the stream.
PrimitivePatch< face, List, const pointField > bMesh
Holder of faceList and points. (v.s. e.g. primitivePatch which references points)
void writeTriSurface(const fileName &) const
Write to file.
const labelListList & pointEdges() const
Return point-edge addressing.
const labelListList & faceEdges() const
void markFaces(const labelList &protectedEdges, const label faceI, boolList &visited) const
Non-pointer based hierarchical recursive searching.
const word & physicalType() const
Return the optional physical type of the patch.
void addPatch(const word &patchName)
Add to back of patch list.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
void read(const polyMesh &)
Read from boundaryMesh of polyMesh.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
const point & min() const
Minimum describing the bounding box.
label findPatchID(const polyBoundaryMesh &patches, const word &name)
label nPoints() const
Return number of points supporting patch faces.
label size() const
Return number of elements in table.
label nInternalFaces() const
static autoPtr< polyPatch > New(const word &patchType, const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm)
Return a pointer to a new patch created on freestore from.
label nextFeatureEdge(const label edgeI, const label vertI) const
Step to next feature edge.
A list that is sorted upon construction or when explicitly requested with the sort() method.
void changePatches(const List< polyPatch * > &patches)
Change patches.
bool found(const Key &) const
Return true if hashedEntry is found in table.
errorManip< error > abort(error &err)
const double e
Elementary charge.
Vector< scalar > vector
A scalar version of the templated Vector.
label start() const
Return start label of this patch in the polyMesh face list.
static const vector splitNormal_
Normal along which to divide faces into categories.
void readTriSurface(const fileName &)
Read from triSurface.
scalar distance(const vector &p1, const vector &p2)
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
labelList getNearest(const primitiveMesh &pMesh, const vector &searchSpan) const
Get bMesh index of nearest face for every boundary face in.
void setFeatureEdges(const scalar minCos)
Set featureEdges, edgeToFeature, featureSegments according.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
void setSize(const label)
Reset size of List.
label getNTris(const label faceI) const
Simple triangulation of face subset. Returns number of triangles.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void patchify(const labelList &nearest, const polyBoundaryMesh &oldPatches, polyMesh &newMesh) const
Take over patches onto polyMesh from nearest face in *this.
label region() const
Return region label.
prefixOSstream Pout(cout, "Pout")
Encapsulation of data needed to search on PrimitivePatches.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const vectorField & faceCentres() const
scalar avgDim() const
Average length/height/width dimension.
void clear()
Clear the list, i.e. set size to zero.
label size() const
Return the number of elements in the PtrList.
const labelList & indices() const
Return the list of sorted indices. Updated every sort.
Triangle with additional region number.
const List< Face > & localFaces() const
Return patch faces addressing into local point list.
A List with indirect addressing.
A face is a list of labels corresponding to mesh vertices.
labelList collectSegment(const boolList &isFeaturePoint, const label startEdgeI, boolList &featVisited) const
Return connected list of feature edges.
label findPatchID(const polyPatchList &, const word &) const
Get index of polypatch by name.
void repatch()
Re-patch the mesh.
void setExtraEdges(const label edgeI)
Set extraEdges to edges 'near' to edgeI. Uses point-edge walk.
void triangulate(const label startFaceI, const label nFaces, const label totalNTris, labelList &triVerts) const
Simple triangulation of face subset. TotalNTris is total number.
void size(const label)
Override size to be inconsistent with allocated storage.
void deletePatch(const word &patchName)
Delete from patch list.
void changePatchID(const label faceID, const label patchID)
Change patch ID for a boundary face. Note: patchID should be in new.
const labelList & meshPoints() const
Return labelList of mesh points in patch.
void write(const fileName &, const word &ext, const bool sort) const
Generic write routine. Chooses writer based on extension.
defineTypeNameAndDebug(combustionModel, 0)
void markEdges(const label maxDistance, const label edgeI, const label distance, labelList &minDistance, DynamicList< label > &visited) const
Do point-edge walk to determine nearest (to edgeI). Stops if.
const word & name() const
Return name.
const word & name() const
Return name.
label index() const
Return the index of this patch in the boundaryMesh.
labelList faceToEdge(const boolList ®ionEdge, const label region, const labelList &changedFaces, labelList &edgeRegion) const
Gets labels of changed faces and propagates them to the edges.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
void changePatchType(const word &patchName, const word &type)
Change patch.
word name(const complex &)
Return a string representation of a complex.
A list of faces which address into the list of points.
void markZone(const boolList &borderEdge, label faceI, label currentZone, labelList &faceZone) const
Finds area, starting at faceI, delimited by borderEdge. Marks all.
labelList edgeToFeature_
From mesh edges to featureEdges_;.
const vectorField & faceAreas() const
Cell-face mesh analysis engine.