Face intersection class. More...
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 pointField & | pointsA_ |
Reference to the points of sideA. More... | |
const pointField & | pointsB_ |
Reference to the points of sideB. More... | |
const bool | reverseB_ |
Flag to reverse B faces. More... | |
Static Private Attributes | |
static scalar | tol = 1e-6 |
Face intersection class.
- calculates intersection area by sub-dividing face into triangles and cutting
Definition at line 55 of file faceAreaIntersect.H.
enum triangulationMode |
Enumerator | |
---|---|
tmFan | |
tmMesh |
Definition at line 59 of file faceAreaIntersect.H.
faceAreaIntersect | ( | const pointField & | pointsA, |
const pointField & | pointsB, | ||
const bool | reverseB = false |
||
) |
Construct from components.
Definition at line 314 of file faceAreaIntersect.C.
|
inlineprivate |
Get triPoints from face.
Definition at line 45 of file faceAreaIntersectI.H.
References f(), points, and Foam::reverse().
|
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().
|
inlineprivate |
Decompose face into triangle fan.
Definition at line 71 of file faceAreaIntersectI.H.
References DynamicList::append(), and f().
|
inlineprivate |
Return point of intersection between plane and triangle edge.
Definition at line 94 of file faceAreaIntersectI.H.
|
inlineprivate |
Return triangle area.
Definition at line 105 of file faceAreaIntersectI.H.
References Foam::mag().
|
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.
|
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().
|
inlinestatic |
Fraction of local length scale to use as intersection tolerance.
Definition at line 113 of file faceAreaIntersectI.H.
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().
|
static |
Definition at line 65 of file faceAreaIntersect.H.
|
private |
Reference to the points of sideA.
Definition at line 73 of file faceAreaIntersect.H.
|
private |
Reference to the points of sideB.
Definition at line 76 of file faceAreaIntersect.H.
|
private |
Flag to reverse B faces.
Definition at line 79 of file faceAreaIntersect.H.
|
staticprivate |
Definition at line 84 of file faceAreaIntersect.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.