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,
124 const triFace& f = faceTris[i];
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])
202 nTotTri += faces[facei].
size();
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))
257 const face& f = faces[facei];
261 faceMap_[triI] = facei;
274 nInternalFaces_ = triI;
280 if (faceIsCut[facei] && !isInternalFace(mesh, includedCell, facei))
285 bool reverse =
false;
289 patchi = internalFacesPatch;
293 if (includedCell[mesh.
faceOwner()[facei]])
313 const face& f = faces[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))
390 bool reverse =
false;
394 patchi = internalFacesPatch;
398 if (includedCell[mesh.
faceOwner()[facei]])
416 triEngine.triangulate
438 Pout<<
"nInternalFaces_:" << nInternalFaces_ <<
endl;
449 patches[
patchi].physicalType(),
456 if (faceCentreDecomposition)
459 triSurface globalSurf(triangles, surfPatches, newPoints);
482 globalSurf.localFaces(),
484 globalSurf.localPoints()
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
#define forAll(list, i)
Loop across all elements in list.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
friend Ostream & operator(Ostream &, const UList< T > &)
A face is a list of labels corresponding to mesh vertices.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label nextLabel(const label i) const
Next vertex on face.
const Field< PointType > & localPoints() const
Return pointField of points in patch.
virtual const pointField & points() const
Return raw points.
List< bool > boolList
Bool container classes.
List< triFace > triFaceList
list of triFaces
virtual const labelList & faceOwner() const
Return face owner.
const Field< PointType > & points() const
Return reference to global points.
List< label > labelList
A List of labels.
Triangle with additional region number.
virtual const faceList & faces() const
Return raw faces.
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
void reverse(UList< T > &, const label n)
word name(const complex &)
Return a string representation of a complex.
meshTriangulation()
Construct null.
label size() const
Return the number of elements in the UPtrList.
const vectorField & faceCentres() const
void setSize(const label)
Reset size of List.
const geometricSurfacePatchList & patches() const
triSurface()
Construct null.
Triangulation of three-dimensional polygons.
prefixOSstream Pout(cout, "Pout")
const List< FaceType > & localFaces() const
Return patch faces addressing into local point list.
A List with indirect addressing.
The geometricSurfacePatch is like patchIdentifier but for surfaces. Holds type, name and index...
faceList faces() const
Return the list of triangles as a faceList.
Mesh consisting of general polyhedral cells.
Triangulated surface description with patch information.
label nInternalFaces() const
Number of triangles in *this which are internal to the surface.
const UList< triFace > & triPoints() const
Get the triangles' points.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.