32 bool Foam::meshTriangulation::isInternalFace
34 const primitiveMesh& mesh,
39 if (mesh.isInternalFace(facei))
41 label own = mesh.faceOwner()[facei];
42 label nei = mesh.faceNeighbour()[facei];
44 if (includedCell[own] && includedCell[nei])
62 void Foam::meshTriangulation::getFaces
64 const primitiveMesh& mesh,
72 faceIsCut.setSize(mesh.nFaces());
78 forAll(includedCell, celli)
81 if (includedCell[celli])
83 const labelList& cFaces = mesh.cells()[celli];
87 label facei = cFaces[i];
89 if (!faceIsCut[facei])
93 faceIsCut[facei] =
true;
96 if (isInternalFace(mesh, includedCell, facei))
105 Pout<<
"Subset consists of " << nFaces <<
" faces out of " << mesh.nFaces()
106 <<
" of which " << nInternalFaces <<
" are internal" <<
endl;
110 void Foam::meshTriangulation::insertTriangles
117 List<labelledTri>& triangles,
126 labelledTri& tri = triangles[triI];
141 tri.region() = regionI;
143 faceMap_[triI] = facei;
165 const label internalFacesPatch,
167 const bool faceCentreDecomposition
196 if (faceCentreDecomposition)
200 if (faceIsCut[facei])
210 if (faceIsCut[facei])
212 nTotTri +=
faces[facei].nTriangles();
216 Pout<<
"nTotTri : " << nTotTri <<
endl;
223 if (faceCentreDecomposition)
228 newPoints[pointi] = mesh.
points()[pointi];
243 if (faceCentreDecomposition)
251 if (faceIsCut[facei] && isInternalFace(mesh, includedCell, facei))
261 faceMap_[triI] = facei;
274 nInternalFaces_ = triI;
280 if (faceIsCut[facei] && !isInternalFace(mesh, includedCell, facei))
289 patchi = internalFacesPatch;
293 if (includedCell[mesh.
faceOwner()[facei]])
319 faceMap_[triI] = facei;
335 faceMap_[triI] = facei;
361 if (faceIsCut[facei] && isInternalFace(mesh, includedCell, facei))
363 triEngine.triangulate
379 nInternalFaces_ = triI;
385 if (faceIsCut[facei] && !isInternalFace(mesh, includedCell, facei))
394 patchi = internalFacesPatch;
398 if (includedCell[mesh.
faceOwner()[facei]])
416 triEngine.triangulate
438 Pout<<
"nInternalFaces_:" << nInternalFaces_ <<
endl;
456 if (faceCentreDecomposition)
459 triSurface globalSurf(triangles, surfPatches, newPoints);
#define forAll(list, i)
Loop across all elements in list.
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
const Field< PointType > & points() const
Return reference to global points.
const List< FaceType > & localFaces() const
Return patch faces addressing into local point list.
const Field< PointType > & localPoints() const
Return pointField of points in patch.
A List with indirect addressing.
friend Ostream & operator(Ostream &, const UList< T > &)
A face is a list of labels corresponding to mesh vertices.
The geometricSurfacePatch is like patchIdentifier but for surfaces. Holds type, name and index.
Triangle with additional region number.
label nInternalFaces() const
Number of triangles in *this which are internal to the surface.
meshTriangulation()
Construct null.
Mesh consisting of general polyhedral cells.
virtual const faceList & faces() const
Return raw faces.
virtual const labelList & faceOwner() const
Return face owner.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
virtual const pointField & points() const
Return raw points.
Triangulation of three-dimensional polygons.
const UList< triFace > & triPoints() const
Get the triangles' points.
const vectorField & faceCentres() const
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
Triangulated surface description with patch information.
triSurface()
Construct null.
const geometricSurfacePatchList & patches() const
faceList faces() const
Return the list of triangles as a faceList.
List< label > labelList
A List of labels.
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.
word name(const bool)
Return a word representation of a bool.
List< bool > boolList
Bool container classes.
void reverse(UList< T > &, const label n)
List< triFace > triFaceList
list of triFaces
prefixOSstream Pout(cout, "Pout")