faceAreaIntersect Class Reference

Face intersection class. More...

Collaboration diagram for faceAreaIntersect:
[legend]

Public Types

enum  triangulationMode { tmFan, tmMesh }
 

Public Member Functions

 faceAreaIntersect (const pointField &pointsA, const pointField &pointsB, const DynamicList< face > &trisA, const DynamicList< face > &trisB, const bool reverseB=false, const bool cacheTriangulation=false)
 Construct from components. More...
 
bool cacheTriangulation () const
 Const access to the cacheTriangulation flag. More...
 
const DynamicList< triPointstriangles () const
 Const access to the triangulation. More...
 
DynamicList< triPoints > & triangles ()
 Non-const access to the triangulation. More...
 
void calc (const face &faceA, const face &faceB, const vector &n, scalar &area, vector &centroid) const
 
bool overlaps (const face &faceA, const face &faceB, const vector &n, const scalar threshold) const
 Return area of intersection of faceA with faceB. More...
 

Static Public Member Functions

static scalar & tolerance ()
 Fraction of local length scale to use as intersection tolerance. More...
 
static void triangulate (const face &f, const pointField &points, const triangulationMode &triMode, faceList &faceTris)
 Triangulate a face using the given triangulation mode. More...
 
static void triangleFan (const face &f, DynamicList< face > &faces)
 Decompose face into triangle fan. More...
 

Static Public Attributes

static const Enum< triangulationModetriangulationModeNames_
 

Detailed Description

Face intersection class.

- calculates intersection area by sub-dividing face into triangles and cutting

Source files

Definition at line 59 of file faceAreaIntersect.H.

Member Enumeration Documentation

◆ triangulationMode

Enumerator
tmFan 
tmMesh 

Definition at line 63 of file faceAreaIntersect.H.

Constructor & Destructor Documentation

◆ faceAreaIntersect()

faceAreaIntersect ( const pointField pointsA,
const pointField pointsB,
const DynamicList< face > &  trisA,
const DynamicList< face > &  trisB,
const bool  reverseB = false,
const bool  cacheTriangulation = false 
)

Construct from components.

Definition at line 386 of file faceAreaIntersect.C.

Member Function Documentation

◆ tolerance()

Foam::scalar & tolerance ( )
inlinestatic

Fraction of local length scale to use as intersection tolerance.

Definition at line 127 of file faceAreaIntersectI.H.

◆ triangulate()

void triangulate ( const face f,
const pointField points,
const triangulationMode triMode,
faceList faceTris 
)
static

Triangulate a face using the given triangulation mode.

Definition at line 408 of file faceAreaIntersect.C.

References Foam::exit(), f(), Foam::FatalError, FatalErrorInFunction, points, and List< T >::resize().

Here is the call graph for this function:

◆ cacheTriangulation()

bool cacheTriangulation ( ) const
inline

Const access to the cacheTriangulation flag.

Definition at line 133 of file faceAreaIntersectI.H.

◆ triangles() [1/2]

const Foam::DynamicList< Foam::triPoints > triangles ( ) const
inline

Const access to the triangulation.

Definition at line 140 of file faceAreaIntersectI.H.

Referenced by faceAreaWeightAMI::calcInterArea().

Here is the caller graph for this function:

◆ triangles() [2/2]

Foam::DynamicList< Foam::triPoints > & triangles ( )
inline

Non-const access to the triangulation.

Definition at line 146 of file faceAreaIntersectI.H.

◆ triangleFan()

void triangleFan ( const face f,
DynamicList< face > &  faces 
)
inlinestatic

Decompose face into triangle fan.

Definition at line 32 of file faceAreaIntersectI.H.

References DynamicList< T, SizeMin >::append(), and f().

Referenced by advancingFrontAMI::triangulatePatch().

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

◆ calc()

void calc ( const face faceA,
const face faceB,
const vector n,
scalar &  area,
vector centroid 
) const

Return area of intersection of faceA with faceB and effective face centre

Definition at line 451 of file faceAreaIntersect.C.

References Foam::fieldTypes::area, n, and VectorSpace< Vector< scalar >, scalar, 3 >::zero.

Referenced by faceAreaWeightAMI::calcInterArea().

Here is the caller graph for this function:

◆ overlaps()

bool overlaps ( const face faceA,
const face faceB,
const vector n,
const scalar  threshold 
) const

Return area of intersection of faceA with faceB.

Definition at line 512 of file faceAreaIntersect.C.

References Foam::fieldTypes::area, n, and Foam::Zero.

Referenced by faceAreaWeightAMI::overlaps().

Here is the caller graph for this function:

Member Data Documentation

◆ triangulationModeNames_

const Foam::Enum< Foam::faceAreaIntersect::triangulationMode > triangulationModeNames_
static

Definition at line 69 of file faceAreaIntersect.H.


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