Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes
faceAreaIntersect Class Reference

Face intersection class. More...

Collaboration diagram for faceAreaIntersect:
Collaboration graph
[legend]

Public Types

enum  triangulationMode { tmFan, tmMesh }
 

Public Member Functions

 faceAreaIntersect (const pointField &pointsA, const pointField &pointsB, const bool reverseB=false)
 Construct from components. More...
 
scalar calc (const face &faceA, const face &faceB, const vector &n, const triangulationMode &triMode)
 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 Public Attributes

static const NamedEnum< triangulationMode, 2 > triangulationModeNames_
 

Private Member Functions

triPoints getTriPoints (const pointField &points, const face &f, const bool reverse) const
 Get triPoints from face. More...
 
void setTriPoints (const point &a, const point &b, const point &c, label &count, FixedList< triPoints, 10 > &tris) const
 Set triPoints into tri list. More...
 
void triangleFan (const face &f, DynamicList< face > &faces) const
 Decompose face into triangle fan. More...
 
point planeIntersection (const FixedList< scalar, 3 > &d, const triPoints &t, const label negI, const label posI) const
 Return point of intersection between plane and triangle edge. More...
 
scalar triArea (const triPoints &t) const
 Return triangle area. More...
 
void triSliceWithPlane (const triPoints &tri, const plane &p, FixedList< triPoints, 10 > &tris, label &nTris, const scalar len)
 Slice triangle with plane and generate new cut sub-triangles. More...
 
scalar triangleIntersect (const triPoints &src, const triPoints &tgt, const vector &n)
 Return area of intersection of triangles src and tgt. More...
 

Private Attributes

const pointFieldpointsA_
 Reference to the points of sideA. More...
 
const pointFieldpointsB_
 Reference to the points of sideB. More...
 
const bool reverseB_
 Flag to reverse B faces. More...
 

Static Private Attributes

static scalar tol = 1e-6
 

Detailed Description

Face intersection class.

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

Source files

Definition at line 55 of file faceAreaIntersect.H.

Member Enumeration Documentation

◆ triangulationMode

Enumerator
tmFan 
tmMesh 

Definition at line 59 of file faceAreaIntersect.H.

Constructor & Destructor Documentation

◆ faceAreaIntersect()

faceAreaIntersect ( const pointField pointsA,
const pointField pointsB,
const bool  reverseB = false 
)

Construct from components.

Definition at line 314 of file faceAreaIntersect.C.

Member Function Documentation

◆ getTriPoints()

Foam::triPoints getTriPoints ( const pointField points,
const face f,
const bool  reverse 
) const
inlineprivate

Get triPoints from face.

Definition at line 45 of file faceAreaIntersectI.H.

References f(), points, and Foam::reverse().

Here is the call graph for this function:

◆ setTriPoints()

void setTriPoints ( const point a,
const point b,
const point c,
label count,
FixedList< triPoints, 10 > &  tris 
) const
inlineprivate

Set triPoints into tri list.

Definition at line 29 of file faceAreaIntersectI.H.

References Foam::constant::physicoChemical::b, Foam::constant::universal::c, and tp().

Here is the call graph for this function:

◆ triangleFan()

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

Decompose face into triangle fan.

Definition at line 71 of file faceAreaIntersectI.H.

References DynamicList::append(), and f().

Here is the call graph for this function:

◆ planeIntersection()

Foam::point planeIntersection ( const FixedList< scalar, 3 > &  d,
const triPoints t,
const label  negI,
const label  posI 
) const
inlineprivate

Return point of intersection between plane and triangle edge.

Definition at line 94 of file faceAreaIntersectI.H.

◆ triArea()

Foam::scalar triArea ( const triPoints t) const
inlineprivate

Return triangle area.

Definition at line 105 of file faceAreaIntersectI.H.

References Foam::mag().

Here is the call graph for this function:

◆ triSliceWithPlane()

void triSliceWithPlane ( const triPoints tri,
const plane p,
FixedList< triPoints, 10 > &  tris,
label nTris,
const scalar  len 
)
private

Slice triangle with plane and generate new cut sub-triangles.

Definition at line 48 of file faceAreaIntersect.C.

References FixedList::fcIndex(), forAll, Foam::mag(), and p.

Here is the call graph for this function:

◆ triangleIntersect()

Foam::scalar triangleIntersect ( const triPoints src,
const triPoints tgt,
const vector n 
)
private

Return area of intersection of triangles src and tgt.

Definition at line 223 of file faceAreaIntersect.C.

References Foam::mag(), n, s(), and Foam::sqrt().

Here is the call graph for this function:

◆ tolerance()

Foam::scalar & tolerance ( )
inlinestatic

Fraction of local length scale to use as intersection tolerance.

Definition at line 113 of file faceAreaIntersectI.H.

◆ calc()

Foam::scalar calc ( const face faceA,
const face faceB,
const vector n,
const triangulationMode triMode 
)

Return area of intersection of faceA with faceB.

Definition at line 329 of file faceAreaIntersect.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, n, and face::triangles().

Referenced by faceAreaWeightAMI< SourcePatch, TargetPatch >::interArea().

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

Field Documentation

◆ triangulationModeNames_

const Foam::NamedEnum< Foam::faceAreaIntersect::triangulationMode, 2 > triangulationModeNames_
static

Definition at line 65 of file faceAreaIntersect.H.

◆ pointsA_

const pointField& pointsA_
private

Reference to the points of sideA.

Definition at line 73 of file faceAreaIntersect.H.

◆ pointsB_

const pointField& pointsB_
private

Reference to the points of sideB.

Definition at line 76 of file faceAreaIntersect.H.

◆ reverseB_

const bool reverseB_
private

Flag to reverse B faces.

Definition at line 79 of file faceAreaIntersect.H.

◆ tol

Foam::scalar tol = 1e-6
staticprivate

Definition at line 84 of file faceAreaIntersect.H.


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