polyMeshTetDecomposition Class Reference

Tools for performing the minimum decomposition of faces of the mesh into triangles so that the cells may be tet decomposed. Includes functions for finding variable face starting (base) points on each face to avoid the decomposition of cells into tets that have negative or zero volume. More...

Static Public Member Functions

static scalar minQuality (const polyMesh &mesh, const point &cC, const label fI, const bool isOwner, const label faceBasePtI)
 
static scalar minQuality (const polyMesh &mesh, const label facei, const label faceBasePtI)
 
static label findSharedBasePoint (const polyMesh &mesh, label fI, const point &nCc, scalar tol, bool report=false)
 Find the first suitable base point to use for a minimum. More...
 
static label findSharedBasePoint (const polyMesh &mesh, label fI, scalar tol, bool report=false)
 As for findSharedBasePoint, but using neighbour cell. More...
 
static label findBasePoint (const polyMesh &mesh, label fI, scalar tol, bool report=false)
 Find the base point to use for a minimum triangle. More...
 
static labelList findFaceBasePts (const polyMesh &mesh, scalar tol=minTetQuality, bool report=false)
 
static bool checkFaceTets (const polyMesh &mesh, scalar tol=minTetQuality, const bool report=false, labelHashSet *setPtr=nullptr)
 Check face-decomposition tet volume. More...
 
static List< tetIndicesfaceTetIndices (const polyMesh &mesh, label fI, label cI)
 Return the tet decomposition of the given face, with. More...
 
static List< tetIndicescellTetIndices (const polyMesh &mesh, label cI)
 Return the tet decomposition of the given cell, see. More...
 
static tetIndices findTet (const polyMesh &mesh, label cI, const point &pt)
 Find the tet decomposition of the cell containing the given point. More...
 
static labelList adjustTetBasePtIs (const polyMesh &mesh, const bool report=false)
 Return an adjusted list of tet base points. More...
 

Static Public Attributes

static const scalar minTetQuality = sqr(SMALL)
 Minimum tetrahedron quality. More...
 

Detailed Description

Tools for performing the minimum decomposition of faces of the mesh into triangles so that the cells may be tet decomposed. Includes functions for finding variable face starting (base) points on each face to avoid the decomposition of cells into tets that have negative or zero volume.

Source files

Definition at line 59 of file polyMeshTetDecomposition.H.

Member Function Documentation

◆ minQuality() [1/2]

Foam::scalar minQuality ( const polyMesh mesh,
const point cC,
const label  fI,
const bool  isOwner,
const label  faceBasePtI 
)
static

Given a face and cc and starting index for triangulation determine the worst tet quality.

Definition at line 41 of file polyMeshTetDecomposition.C.

References f(), polyMesh::faces(), UList< T >::fcIndex(), mesh, polyMesh::points(), tetrahedron< Point, PointRef >::quality(), and UList< T >::size().

Here is the call graph for this function:

◆ minQuality() [2/2]

Foam::scalar minQuality ( const polyMesh mesh,
const label  facei,
const label  faceBasePtI 
)
static

Given a face and starting index for triangulation determine the worst tet quality (owner or neighbour)

Definition at line 94 of file polyMeshTetDecomposition.C.

References primitiveMesh::cellCentres(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), primitiveMesh::isInternalFace(), and mesh.

Here is the call graph for this function:

◆ findSharedBasePoint() [1/2]

Foam::label findSharedBasePoint ( const polyMesh mesh,
label  fI,
const point nCc,
scalar  tol,
bool  report = false 
)
static

Find the first suitable base point to use for a minimum.

triangle decomposition of the face, suiting owner and neighbour cells. Finds the first base point on the face whose worst quality tet from either cell is better than tolerance. Neighbour cell centre supplied. For coupled patches.

Definition at line 133 of file polyMeshTetDecomposition.C.

References primitiveMesh::cellCentres(), f(), polyMesh::faceOwner(), polyMesh::faces(), forAll, mesh, Foam::min(), and pFaces.

Referenced by polyMeshGeometry::checkFaceTets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findSharedBasePoint() [2/2]

Foam::label findSharedBasePoint ( const polyMesh mesh,
label  fI,
scalar  tol,
bool  report = false 
)
static

As for findSharedBasePoint, but using neighbour cell.

centre from the mesh. For internal faces.

Definition at line 169 of file polyMeshTetDecomposition.C.

References primitiveMesh::cellCentres(), polyMesh::faceNeighbour(), and mesh.

Here is the call graph for this function:

◆ findBasePoint()

Foam::label findBasePoint ( const polyMesh mesh,
label  fI,
scalar  tol,
bool  report = false 
)
static

Find the base point to use for a minimum triangle.

decomposition of the face, using only the owner information. For non-coupled boundary faces.

Definition at line 188 of file polyMeshTetDecomposition.C.

References primitiveMesh::cellCentres(), f(), polyMesh::faceOwner(), polyMesh::faces(), forAll, mesh, and pFaces.

Referenced by polyMeshGeometry::checkFaceTets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findFaceBasePts()

Foam::labelList findFaceBasePts ( const polyMesh mesh,
scalar  tol = minTetQuality,
bool  report = false 
)
static

Find a suitable base point for each face for decomposition into tets

Definition at line 224 of file polyMeshTetDecomposition.C.

References Foam::abort(), polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), coupled(), primitiveMesh::faceCentres(), polyMesh::faceOwner(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, mesh, primitiveMesh::nBoundaryFaces(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), coupledPolyPatch::owner(), patches, polyBoundaryMesh::patchID(), UList< T >::size(), syncTools::swapBoundaryFacePositions(), and syncTools::syncBoundaryFaceList().

Referenced by polyMesh::tetBasePtIs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkFaceTets()

bool checkFaceTets ( const polyMesh mesh,
scalar  tol = minTetQuality,
const bool  report = false,
labelHashSet setPtr = nullptr 
)
static

Check face-decomposition tet volume.

Definition at line 383 of file polyMeshTetDecomposition.C.

References polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), coupled(), Foam::endl(), f(), primitiveMesh::faceCentres(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), mesh, primitiveMesh::nBoundaryFaces(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), p, patches, polyBoundaryMesh::patchID(), polyMesh::points(), Foam::reduce(), and syncTools::swapBoundaryFacePositions().

Referenced by wallBoundedStreamLine::read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ faceTetIndices()

Foam::List< Foam::tetIndices > faceTetIndices ( const polyMesh mesh,
label  fI,
label  cI 
)
static

Return the tet decomposition of the given face, with.

respect to the given cell

Definition at line 541 of file polyMeshTetDecomposition.C.

References f(), polyMesh::faces(), mesh, pFaces, and UList< T >::size().

Referenced by cellPointWeight::findTriangle(), and FreeStream< CloudType >::inflow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cellTetIndices()

Foam::List< Foam::tetIndices > cellTetIndices ( const polyMesh mesh,
label  cI 
)
static

Return the tet decomposition of the given cell, see.

findFacePt for the meaning of the indices

Definition at line 565 of file polyMeshTetDecomposition.C.

References DynamicList< T, SizeMin >::append(), primitiveMesh::cells(), polyMesh::faces(), mesh, and pFaces.

Referenced by Dual< Type >::Dual(), cellPointWeight::findTetrahedron(), momentOfInertia::meshInertia(), Moment< Type >::Moment(), and patchInjectionBase::setPositionAndCell().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findTet()

Foam::tetIndices findTet ( const polyMesh mesh,
label  cI,
const point pt 
)
static

Find the tet decomposition of the cell containing the given point.

Definition at line 594 of file polyMeshTetDecomposition.C.

References tetIndices::cell(), primitiveMesh::cells(), f(), polyMesh::faces(), tetrahedron< Point, PointRef >::inside(), mesh, pFaces, UList< T >::size(), and tetIndices::tet().

Referenced by polyMesh::findTetFacePt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ adjustTetBasePtIs()

Foam::labelList adjustTetBasePtIs ( const polyMesh mesh,
const bool  report = false 
)
static

Return an adjusted list of tet base points.

Definition at line 636 of file polyMeshTetDecomposition.C.

References cells, primitiveMesh::cells(), HashTable< T, Key, Hash >::clear(), Foam::endl(), Foam::exit(), f(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, UList< T >::fcValue(), forAll, forAllConstIters, primitiveMesh::isInternalFace(), mesh, Foam::nl, polyMesh::points(), Foam::Pout, UList< T >::rcValue(), Foam::returnReduce(), bitSet::set(), UList< T >::size(), syncTools::syncFaceList(), bitSet::test(), and polyMesh::tetBasePtIs().

Referenced by isoSurfaceTopo::isoSurfaceTopo().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ minTetQuality

const Foam::scalar minTetQuality = sqr(SMALL)
static

Minimum tetrahedron quality.

Definition at line 66 of file polyMeshTetDecomposition.H.

Referenced by wallBoundedStreamLine::read().


The documentation for this class was generated from the following files: