FEDEM Solver  R8.0
Source code of the dynamics solver
Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
FaFace Class Reference

#include <FFaBody.H>

Collaboration diagram for FaFace:
Collaboration graph
[legend]

Public Member Functions

 FaFace ()
 
 FaFace (FFaBody *body, size_t i1, size_t i2, size_t i3, int i4=-1)
 
int intersect (const FaVec3 &normal, double z0, double zeroTol=1.0e-16)
 
bool isIntersected () const
 
bool isBelow () const
 
size_t size () const
 
size_t operator[] (int i) const
 
const FaVec3vertex (int i) const
 
double accumulateArea (const FaVec3 &vn, const FaVec3 &v0, FaVec3 &X) const
 
double accumulateVolume (const FaVec3 &v0, FaVec3 &X, FFaTensor3 *I) const
 
const std::vector< FaFace > & getSubFaces () const
 
FaEdge getIntEdge () const
 
FaVec3 getIntEdgeCoord () const
 
FFaBodygetBody () const
 

Protected Member Functions

int quad2Quads (const char *status, const double *dist)
 
int quad2QuadTria (const char *status, const double *dist, bool oneAbove)
 

Private Attributes

std::vector< size_t > myVertices
 Indices to the vertices defining the face. More...
 
FaEdge iEdge
 Vertices of the intersection edge, if any. More...
 
std::vector< FaFacemySubFaces
 2 or 3 sub-triangles of intersected face More...
 
bool IAmBelow
 Is face below current intersection plane? More...
 
FFaBodyowner
 Pointer to the body object containing this face. More...
 

Friends

std::ostream & operator<< (std::ostream &s, const FaFace &f)
 

Constructor & Destructor Documentation

◆ FaFace() [1/2]

FaFace::FaFace ( )

Default face constructor.

◆ FaFace() [2/2]

FaFace::FaFace ( FFaBody body,
size_t  i1,
size_t  i2,
size_t  i3,
int  i4 = -1 
)

Constructor defining a face spanned by three or four vertices.

Member Function Documentation

◆ accumulateArea()

double FaFace::accumulateArea ( const FaVec3 vn,
const FaVec3 v0,
FaVec3 Xac 
) const

Accumulates area and centroid with contributions from a triangle defined by the two internal vertices of this face, the center vertex v0, and the normal vector vn of the face.

◆ accumulateVolume()

double FaFace::accumulateVolume ( const FaVec3 v0,
FaVec3 Xc,
FFaTensor3 I 
) const

Accumulates volume, volume centroid, and optionally volume inertia with contributions from a tetrahedron defined by this face and the center vertex v0.

◆ getBody()

FFaBody* FaFace::getBody ( ) const
inline

◆ getIntEdge()

FaEdge FaFace::getIntEdge ( ) const
inline

◆ getIntEdgeCoord()

FaVec3 FaFace::getIntEdgeCoord ( ) const

◆ getSubFaces()

const std::vector<FaFace>& FaFace::getSubFaces ( ) const
inline

◆ intersect()

int FaFace::intersect ( const FaVec3 normal,
double  z0,
double  zeroTol = 1.0e-16 
)

This method determines the intersection between a triangular face and a plane defined by a normal vector and the distance z0 from the origin along the global z-axis. If the face is intersected, it is subdivided into two or three sub-faces with one or two new vertices.

Returns
{-4: Intersection of quadrilateral not implemented}
{-1: The triangle is entirely below the plane}
{ 1: The triangle is entirely above the plane}
{ 0: The triangle lies in the plane}
{ 2: The triangle is intersected and divided in two sub-triangles}
{ 3: The triangle is intersected and divided in three sub-triangles}

◆ isBelow()

bool FaFace::isBelow ( ) const
inline

◆ isIntersected()

bool FaFace::isIntersected ( ) const
inline

◆ operator[]()

size_t FaFace::operator[] ( int  i) const
inline

◆ quad2Quads()

int FaFace::quad2Quads ( const char *  status,
const double *  dist 
)
protected

◆ quad2QuadTria()

int FaFace::quad2QuadTria ( const char *  status,
const double *  dist,
bool  oneAbove 
)
protected

◆ size()

size_t FaFace::size ( ) const
inline

◆ vertex()

const FaVec3& FaFace::vertex ( int  i) const
inline

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  s,
const FaFace f 
)
friend

Global stream operator printing the face definition.

Member Data Documentation

◆ IAmBelow

bool FaFace::IAmBelow
private

Is face below current intersection plane?

◆ iEdge

FaEdge FaFace::iEdge
private

Vertices of the intersection edge, if any.

◆ mySubFaces

std::vector<FaFace> FaFace::mySubFaces
private

2 or 3 sub-triangles of intersected face

◆ myVertices

std::vector<size_t> FaFace::myVertices
private

Indices to the vertices defining the face.

◆ owner

FFaBody* FaFace::owner
private

Pointer to the body object containing this face.


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