Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

ToolsElmT4n3D Class Reference

efficient finite element programming for ElmT4n3D elements. More...

#include <ElmTtools.h>

List of all members.

Public Methods

 ToolsElmT4n3D ()
 ToolsElmT4n3D (GridFE *grid)
 ~ToolsElmT4n3D ()
void attach (GridFE *grid)
void refill (int elm_no)
bool checkGrid ()
bool checkGrid (int e)
GridFEgrid ()
int getElmNo ()
real x1 ()
real y1 ()
real z1 ()
real x2 ()
real y2 ()
real z2 ()
real x3 ()
real y3 ()
real z3 ()
real x4 ()
real y4 ()
real z4 ()
real det ()
real dN1x ()
real dN1y ()
real dN1z ()
real dN2x ()
real dN2y ()
real dN2z ()
real dN3x ()
real dN3y ()
real dN3z ()
real dN4x ()
real dN4y ()
real dN4z ()
int n1 ()
int n2 ()
int n3 ()
int n4 ()
real volume ()
real area (int i)
real area1 ()
real area2 ()
real area3 ()
real area4 ()
real maxArea ()
real maxSolidAngle ()
real minSolidAngle ()
void minMaxSolidAngle (real &minsa, real &maxsa)
real solidAngle (int i)
real solidAngle1 ()
real solidAngle2 ()
real solidAngle3 ()
real solidAngle4 ()
real dihedralAngle (int i)
real dihedralAngle1 ()
real dihedralAngle2 ()
real dihedralAngle3 ()
real dihedralAngle4 ()
real dihedralAngle5 ()
real dihedralAngle6 ()
real inRadius ()
Ptv(real) inCenter ()
void inCenter (real &cx, real &cy, real &cz)
real circumRadius ()
Ptv(real) circumCenter ()
void circumCenter (real &cx, real &cy, real &cz)
Ptv(real) centroid ()
void centroid (real &cx, real &cy, real &cz)
real centroidx ()
real centroidy ()
real centroidz ()
real midptface1x ()
real midptface1y ()
real midptface1z ()
real midptface2x ()
real midptface2y ()
real midptface2z ()
real midptface3x ()
real midptface3y ()
real midptface3z ()
real midptface4x ()
real midptface4y ()
real midptface4z ()
real midpt1x ()
real midpt1y ()
real midpt1z ()
real midpt2x ()
real midpt2y ()
real midpt2z ()
real midpt3x ()
real midpt3y ()
real midpt3z ()
real midpt4x ()
real midpt4y ()
real midpt4z ()
real midpt5x ()
real midpt5y ()
real midpt5z ()
real midpt6x ()
real midpt6y ()
real midpt6z ()
Ptv(real) normal (int i)
Ptv(real) normal1 ()
Ptv(real) normal2 ()
Ptv(real) normal3 ()
Ptv(real) normal4 ()
void normal1 (real &nx, real &ny, real &nz)
void normal2 (real &nx, real &ny, real &nz)
void normal3 (real &nx, real &ny, real &nz)
void normal4 (real &nx, real &ny, real &nz)
real h ()
real H ()
real maxLength ()
real minLength ()
real edgeLength (int i)
real l1 ()
real l2 ()
real l3 ()
real l4 ()
real l5 ()
real l6 ()
real l1sq ()
real l2sq ()
real l3sq ()
real l4sq ()
real l5sq ()
real l6sq ()
real xmax ()
real xmin ()
real ymax ()
real ymin ()
real zmax ()
real zmin ()
real a11 ()
real a12 ()
real a13 ()
real a21 ()
real a22 ()
real a23 ()
real a24 ()
real a31 ()
real a32 ()
real a33 ()
real a34 ()
real a14 ()
real a41 ()
real a42 ()
real a43 ()
real a44 ()
Ptv(real) localCoordinates (real x, real y, real z)
real barycentric1 (real x, real y, real z)
real barycentric2 (real x, real y, real z)
real barycentric3 (real x, real y, real z)
real barycentric4 (real x, real y, real z)
void barycentric (real x, real y, real z, NUMT &phi1, NUMT &phi2, NUMT &phi3, NUMT &phi4)
bool inSide (real x, real y, real z)
bool outSide (real x, real y, real z)
bool onTetra (real x, real y, real z)
real qualityMeasure (int i)
real eta ()
real etaincirc ()
real etaMinSolidAngle ()
real etaMaxSolidAngle ()
real etahH ()
void testComputations ()
bool ok () const
void print (Os os) const
bool areQuadNodesAtMidPoints ()
void quadShape (real r, real s, real t, real u, real &psi1, real &psi2, real &psi3, real &psi4, real &psi5, real &psi6, real &psi7, real &psi8, real &psi9, real &psi10)
void dNq1234 (real r, real s, real t, real u, real &psi1x, real &psi1y, real &psi1z, real &psi2x, real &psi2y, real &psi2z, real &psi3x, real &psi3y, real &psi3z, real &psi4x, real &psi4y, real &psi4z)
void dNq5678910 (real r, real s, real t, real u, real &psi5x, real &psi5y, real &psi5z, real &psi6x, real &psi6y, real &psi6z, real &psi7x, real &psi7y, real &psi7z, real &psi8x, real &psi8y, real &psi8z, real &psi9x, real &psi9y, real &psi9z, real &psi10x, real &psi10y, real &psi10z)
 COPY_CONSTRUCTOR (ToolsElmT4n3D)
 ASSIGNMENT_OPERATOR (ToolsElmT4n3D)


Detailed Description

efficient finite element programming for ElmT4n3D elements.

NAME: ToolsElmT4n3D - efficient finite element programming for ElmT4n3D elements

DESCRIPTION:

The purpose of this class is to collect all the computations involving the geometry of a tetrahedron in one place. A major consideration is efficiency. This motivates the use of inlining where possible, and in some cases a delibarete omission of functionality that would be too much of a bootleneck.

Applications of the class include programming of finite element assembly, mesh generation, interpolation and more. The class is mainly meant for elements of type "ElmT4n3D". However, if there are nodes at midpoints of edges it may also be used for "ElmT10n3D" computations.


Constructor & Destructor Documentation

ToolsElmT4n3D::ToolsElmT4n3D ( )
 

There is one empty constructor and one where the grid can be attached. The function "checkGrid" is used to examine if all elements of the attached grid are of correct type. Prior to using the member functions in this class, data for the element in question must be loaded by a call to "refill".

ToolsElmT4n3D::ToolsElmT4n3D ( GridFE * grid )
 

See documentation of one of the overloaded constructor.

ToolsElmT4n3D::~ToolsElmT4n3D ( )
 


Member Function Documentation

ToolsElmT4n3D::ASSIGNMENT_OPERATOR ( ToolsElmT4n3D )
 

ToolsElmT4n3D::COPY_CONSTRUCTOR ( ToolsElmT4n3D )
 

real ToolsElmT4n3D::H ( ) [inline]
 

real ToolsElmT4n3D::a11 ( ) [inline]
 

real ToolsElmT4n3D::a12 ( ) [inline]
 

real ToolsElmT4n3D::a13 ( ) [inline]
 

real ToolsElmT4n3D::a14 ( ) [inline]
 

real ToolsElmT4n3D::a21 ( ) [inline]
 

real ToolsElmT4n3D::a22 ( ) [inline]
 

real ToolsElmT4n3D::a23 ( ) [inline]
 

real ToolsElmT4n3D::a24 ( ) [inline]
 

real ToolsElmT4n3D::a31 ( ) [inline]
 

real ToolsElmT4n3D::a32 ( ) [inline]
 

real ToolsElmT4n3D::a33 ( ) [inline]
 

real ToolsElmT4n3D::a34 ( ) [inline]
 

real ToolsElmT4n3D::a41 ( ) [inline]
 

real ToolsElmT4n3D::a42 ( ) [inline]
 

real ToolsElmT4n3D::a43 ( ) [inline]
 

real ToolsElmT4n3D::a44 ( ) [inline]
 

bool ToolsElmT4n3D::areQuadNodesAtMidPoints ( )
 

as for class "ToolsElmT3n2D", but deals with "ElmT10n3D" elements.

real ToolsElmT4n3D::area ( int i )
 

returns the area of face number "i".

real ToolsElmT4n3D::area1 ( ) [inline]
 

returns the area of face number 1, see above for numbering convention.

real ToolsElmT4n3D::area2 ( ) [inline]
 

returns the area of face number 2, see above for numbering convention.

real ToolsElmT4n3D::area3 ( ) [inline]
 

returns the area of face number 3, see above for numbering convention.

real ToolsElmT4n3D::area4 ( ) [inline]
 

returns the area of face number 4, see above for numbering convention.

void ToolsElmT4n3D::attach ( GridFE * grid )
 

void ToolsElmT4n3D::barycentric ( real x,
real y,
real z,
NUMT & phi1,
NUMT & phi2,
NUMT & phi3,
NUMT & phi4 ) [inline]
 

real ToolsElmT4n3D::barycentric1 ( real x,
real y,
real z ) [inline]
 

real ToolsElmT4n3D::barycentric2 ( real x,
real y,
real z ) [inline]
 

real ToolsElmT4n3D::barycentric3 ( real x,
real y,
real z ) [inline]
 

real ToolsElmT4n3D::barycentric4 ( real x,
real y,
real z ) [inline]
 

void ToolsElmT4n3D::centroid ( real & cx,
real & cy,
real & cz ) [inline]
 

Ptv(real) ToolsElmT4n3D::centroid ( ) [inline]
 

real ToolsElmT4n3D::centroidx ( ) [inline]
 

real ToolsElmT4n3D::centroidy ( ) [inline]
 

real ToolsElmT4n3D::centroidz ( ) [inline]
 

bool ToolsElmT4n3D::checkGrid ( int e )
 

See documentation of one of the overloaded functions.

bool ToolsElmT4n3D::checkGrid ( )
 

checks that (a) a grid is attached, and (b) the grid contains only "ElmT4n3D" elements.

void ToolsElmT4n3D::circumCenter ( real & cx,
real & cy,
real & cz )
 

Ptv(real) ToolsElmT4n3D::circumCenter ( )
 

real ToolsElmT4n3D::circumRadius ( )
 

real ToolsElmT4n3D::dN1x ( ) [inline]
 

real ToolsElmT4n3D::dN1y ( ) [inline]
 

real ToolsElmT4n3D::dN1z ( ) [inline]
 

returns the value in "z"-direction for the gradient of the linear shape function "N1" associated with node 1. Corresponding treatment of nodes 2, 3 and 4 is delivered by the functions "dN2z", "dN3z" and "dN4z".

real ToolsElmT4n3D::dN2x ( ) [inline]
 

real ToolsElmT4n3D::dN2y ( ) [inline]
 

real ToolsElmT4n3D::dN2z ( ) [inline]
 

real ToolsElmT4n3D::dN3x ( ) [inline]
 

real ToolsElmT4n3D::dN3y ( ) [inline]
 

real ToolsElmT4n3D::dN3z ( ) [inline]
 

real ToolsElmT4n3D::dN4x ( ) [inline]
 

returns the value in "x"-direction for the gradient of the linear shape function "N4" associated with node 4. See also class "ToolsElmT3n2D".

real ToolsElmT4n3D::dN4y ( ) [inline]
 

returns the value in "y"-direction for the gradient of the linear shape function "N4" associated with node 4. See also class "ToolsElmT3n2D".

real ToolsElmT4n3D::dN4z ( ) [inline]
 

void ToolsElmT4n3D::dNq1234 ( real r,
real s,
real t,
real u,
real & psi1x,
real & psi1y,
real & psi1z,
real & psi2x,
real & psi2y,
real & psi2z,
real & psi3x,
real & psi3y,
real & psi3z,
real & psi4x,
real & psi4y,
real & psi4z ) [inline]
 

as "ToolsElmT3n2D dNq123", but deals with "ElmT10n3D" elements (requires the extra nodes to located at the midpoints of the edges).

void ToolsElmT4n3D::dNq5678910 ( real r,
real s,
real t,
real u,
real & psi5x,
real & psi5y,
real & psi5z,
real & psi6x,
real & psi6y,
real & psi6z,
real & psi7x,
real & psi7y,
real & psi7z,
real & psi8x,
real & psi8y,
real & psi8z,
real & psi9x,
real & psi9y,
real & psi9z,
real & psi10x,
real & psi10y,
real & psi10z ) [inline]
 

as "ToolsElmT3n2D dNq456", but deals with "ElmT10n3D" elements (requires the extra nodes to located at the midpoints of the edges).

real ToolsElmT4n3D::det ( ) [inline]
 

returns the Jacobi determinant (six times the volume of the tetrahedron).

real ToolsElmT4n3D::dihedralAngle ( int i )
 

real ToolsElmT4n3D::dihedralAngle1 ( ) [inline]
 

real ToolsElmT4n3D::dihedralAngle2 ( ) [inline]
 

real ToolsElmT4n3D::dihedralAngle3 ( ) [inline]
 

real ToolsElmT4n3D::dihedralAngle4 ( ) [inline]
 

real ToolsElmT4n3D::dihedralAngle5 ( ) [inline]
 

real ToolsElmT4n3D::dihedralAngle6 ( ) [inline]
 

real ToolsElmT4n3D::edgeLength ( int i )
 

real ToolsElmT4n3D::eta ( )
 

returns the quality measure used in the software package "GEOMPACK".

real ToolsElmT4n3D::etaMaxSolidAngle ( )
 

returns a measure based on the maximum solid angle.

real ToolsElmT4n3D::etaMinSolidAngle ( )
 

returns a measure based on the minimum solid angle.

real ToolsElmT4n3D::etahH ( )
 

returns the ratio between the small length scale "h" and the diameter.

real ToolsElmT4n3D::etaincirc ( )
 

returns the ratio between the radii of inscribed and circumscribed spheres.

int ToolsElmT4n3D::getElmNo ( ) [inline]
 

GridFE & ToolsElmT4n3D::grid ( ) [inline]
 

real ToolsElmT4n3D::h ( ) [inline]
 

returns a small length scale of triangle defined as volume=maxArea*h/3. Geometrically speaking, "h" is the height of the tetrahedron with the face with largest area as base.

void ToolsElmT4n3D::inCenter ( real & cx,
real & cy,
real & cz )
 

Ptv(real) ToolsElmT4n3D::inCenter ( )
 

real ToolsElmT4n3D::inRadius ( ) [inline]
 

bool ToolsElmT4n3D::inSide ( real x,
real y,
real z )
 

real ToolsElmT4n3D::l1 ( ) [inline]
 

real ToolsElmT4n3D::l1sq ( ) [inline]
 

real ToolsElmT4n3D::l2 ( ) [inline]
 

real ToolsElmT4n3D::l2sq ( ) [inline]
 

real ToolsElmT4n3D::l3 ( ) [inline]
 

real ToolsElmT4n3D::l3sq ( ) [inline]
 

real ToolsElmT4n3D::l4 ( ) [inline]
 

real ToolsElmT4n3D::l4sq ( ) [inline]
 

real ToolsElmT4n3D::l5 ( ) [inline]
 

real ToolsElmT4n3D::l5sq ( ) [inline]
 

real ToolsElmT4n3D::l6 ( ) [inline]
 

real ToolsElmT4n3D::l6sq ( ) [inline]
 

Ptv(real) ToolsElmT4n3D::localCoordinates ( real x,
real y,
real z )
 

real ToolsElmT4n3D::maxArea ( ) [inline]
 

returns the maximum face area.

real ToolsElmT4n3D::maxLength ( ) [inline]
 

real ToolsElmT4n3D::maxSolidAngle ( )
 

real ToolsElmT4n3D::midpt1x ( ) [inline]
 

returns the "x"-coordinate of the midpoint on edge number 1. There are corresponding functions for the remaining edges, and for the other two coordinate directions.

real ToolsElmT4n3D::midpt1y ( ) [inline]
 

real ToolsElmT4n3D::midpt1z ( ) [inline]
 

real ToolsElmT4n3D::midpt2x ( ) [inline]
 

real ToolsElmT4n3D::midpt2y ( ) [inline]
 

real ToolsElmT4n3D::midpt2z ( ) [inline]
 

real ToolsElmT4n3D::midpt3x ( ) [inline]
 

real ToolsElmT4n3D::midpt3y ( ) [inline]
 

real ToolsElmT4n3D::midpt3z ( ) [inline]
 

real ToolsElmT4n3D::midpt4x ( ) [inline]
 

real ToolsElmT4n3D::midpt4y ( ) [inline]
 

real ToolsElmT4n3D::midpt4z ( ) [inline]
 

real ToolsElmT4n3D::midpt5x ( ) [inline]
 

real ToolsElmT4n3D::midpt5y ( ) [inline]
 

real ToolsElmT4n3D::midpt5z ( ) [inline]
 

real ToolsElmT4n3D::midpt6x ( ) [inline]
 

real ToolsElmT4n3D::midpt6y ( ) [inline]
 

real ToolsElmT4n3D::midpt6z ( ) [inline]
 

real ToolsElmT4n3D::midptface1x ( ) [inline]
 

returns the "x"-coordinate of the midpoint (gravity point) on face number 1. There are corresponding functions for the remaining faces, and for the other two coordinate directions.

real ToolsElmT4n3D::midptface1y ( ) [inline]
 

real ToolsElmT4n3D::midptface1z ( ) [inline]
 

real ToolsElmT4n3D::midptface2x ( ) [inline]
 

real ToolsElmT4n3D::midptface2y ( ) [inline]
 

real ToolsElmT4n3D::midptface2z ( ) [inline]
 

real ToolsElmT4n3D::midptface3x ( ) [inline]
 

real ToolsElmT4n3D::midptface3y ( ) [inline]
 

real ToolsElmT4n3D::midptface3z ( ) [inline]
 

real ToolsElmT4n3D::midptface4x ( ) [inline]
 

real ToolsElmT4n3D::midptface4y ( ) [inline]
 

real ToolsElmT4n3D::midptface4z ( ) [inline]
 

real ToolsElmT4n3D::minLength ( ) [inline]
 

void ToolsElmT4n3D::minMaxSolidAngle ( real & minsa,
real & maxsa )
 

real ToolsElmT4n3D::minSolidAngle ( )
 

int ToolsElmT4n3D::n1 ( ) [inline]
 

int ToolsElmT4n3D::n2 ( ) [inline]
 

int ToolsElmT4n3D::n3 ( ) [inline]
 

int ToolsElmT4n3D::n4 ( ) [inline]
 

returns the global grid node number for the fourth vertex (node 4). See also class "ToolsElmT3n2D".

Ptv(real) ToolsElmT4n3D::normal ( int i )
 

returns the outer unit normal for face number "i". There are also versions with specific faces (such as "normal1").

void ToolsElmT4n3D::normal1 ( real & nx,
real & ny,
real & nz ) [inline]
 

Ptv(real) ToolsElmT4n3D::normal1 ( ) [inline]
 

void ToolsElmT4n3D::normal2 ( real & nx,
real & ny,
real & nz ) [inline]
 

Ptv(real) ToolsElmT4n3D::normal2 ( ) [inline]
 

void ToolsElmT4n3D::normal3 ( real & nx,
real & ny,
real & nz ) [inline]
 

Ptv(real) ToolsElmT4n3D::normal3 ( ) [inline]
 

void ToolsElmT4n3D::normal4 ( real & nx,
real & ny,
real & nz ) [inline]
 

Ptv(real) ToolsElmT4n3D::normal4 ( ) [inline]
 

bool ToolsElmT4n3D::ok ( ) const
 

bool ToolsElmT4n3D::onTetra ( real x,
real y,
real z )
 

bool ToolsElmT4n3D::outSide ( real x,
real y,
real z )
 

void ToolsElmT4n3D::print ( Os os ) const
 

void ToolsElmT4n3D::quadShape ( real r,
real s,
real t,
real u,
real & psi1,
real & psi2,
real & psi3,
real & psi4,
real & psi5,
real & psi6,
real & psi7,
real & psi8,
real & psi9,
real & psi10 ) [inline]
 

as for class "ToolsElmT3n2D", but deals with "ElmT10n3D" elements (requires the extra nodes to located at the midpoints of the edges).

real ToolsElmT4n3D::qualityMeasure ( int i )
 

returns some some quality measures for tetrahedra. The result is normalized such that the output is 1.0 for an equilateral tetrahedron and tends towards 0.0 for a degenerate tetrahedron. The argument "i" can be 1 (see eta), 2 (see etaincirc), 3 (see etaMinSolidAngle) , 4 (see etaMaxSolidAngle), or 5 (see etahH).

void ToolsElmT4n3D::refill ( int elm_no )
 

real ToolsElmT4n3D::solidAngle ( int i )
 

real ToolsElmT4n3D::solidAngle1 ( ) [inline]
 

real ToolsElmT4n3D::solidAngle2 ( ) [inline]
 

real ToolsElmT4n3D::solidAngle3 ( ) [inline]
 

real ToolsElmT4n3D::solidAngle4 ( ) [inline]
 

void ToolsElmT4n3D::testComputations ( )