OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

tetrahedron< Point, PointRef > Class Template Reference

A tetrahedron primitive. More...

List of all members.


Public Types

enum  { nVertices = 4, nEdges = 6 }

Public Member Functions

 tetrahedron (const Point &a, const Point &b, const Point &c, const Point &d)
 Construct from points.
 tetrahedron (Istream &)
 Construct from Istream.
const Point & a () const
 Return vertices.
const Point & b () const
const Point & c () const
const Point & d () const
vector Sa () const
 Return face normal.
vector Sb () const
vector Sc () const
vector Sd () const
scalar mag () const
 Return volume.
vector circumCentre () const
 Return circum-centre.
scalar circumRadius () const
 Return circum-radius.
pointHit containmentSphere (const scalar tol) const
 Return (min)containment sphere, i.e. the smallest sphere with.
void gradNiSquared (scalarField &buffer) const
 Fill buffer with shape function products.
void gradNiDotGradNj (scalarField &buffer) const
void gradNiGradNi (tensorField &buffer) const
void gradNiGradNj (tensorField &buffer) const

Friends

Istreamoperator>> (Istream &, tetrahedron &)
Ostreamoperator (Ostream &, const tetrahedron &)

Detailed Description

template<class Point, class PointRef>
class Foam::tetrahedron< Point, PointRef >

A tetrahedron primitive.

Ordering of edges needs to be the same for a tetrahedron class, a tetrahedron cell shape model and a tetCell.

Source files

Definition at line 73 of file tetrahedron.H.


Member Enumeration Documentation

anonymous enum

Enumerator:
nVertices 
nEdges 

Definition at line 84 of file tetrahedron.H.


Constructor & Destructor Documentation

tetrahedron ( const Point &  a,
const Point &  b,
const Point &  c,
const Point &  d 
) [inline]

Construct from points.

Definition at line 33 of file tetrahedronI.H.

References b, and d.

tetrahedron ( Istream is  )  [inline]

Construct from Istream.

Definition at line 48 of file tetrahedronI.H.


Member Function Documentation

const Point & a (  )  const [inline]

Return vertices.

Definition at line 66 of file tetrahedronI.H.

const Point & b (  )  const [inline]

Definition at line 73 of file tetrahedronI.H.

const Point & c (  )  const [inline]

Definition at line 80 of file tetrahedronI.H.

const Point & d (  )  const [inline]

Definition at line 87 of file tetrahedronI.H.

vector Sa (  )  const [inline]

Return face normal.

Definition at line 94 of file tetrahedronI.H.

vector Sb (  )  const [inline]

Definition at line 101 of file tetrahedronI.H.

vector Sc (  )  const [inline]

Definition at line 108 of file tetrahedronI.H.

vector Sd (  )  const [inline]

Definition at line 115 of file tetrahedronI.H.

scalar mag (  )  const [inline]

Return volume.

Definition at line 122 of file tetrahedronI.H.

Referenced by Foam::operator>>().

Here is the caller graph for this function:

vector circumCentre (  )  const [inline]

Return circum-centre.

Definition at line 129 of file tetrahedronI.H.

Referenced by tetrahedron< Point, PointRef >::containmentSphere(), and Foam::operator>>().

Here is the caller graph for this function:

scalar circumRadius (  )  const [inline]

Return circum-radius.

Definition at line 146 of file tetrahedronI.H.

Foam::pointHit containmentSphere ( const scalar  tol  )  const [inline]

Return (min)containment sphere, i.e. the smallest sphere with.

all points inside. Returns pointHit with:

  • hit : if sphere is equal to circumsphere (biggest sphere)
  • point : centre of sphere
  • distance : radius of sphere
  • eligiblemiss: false Tol (small compared to 1, e.g. 1E-9) is used to determine whether point is inside: mag(pt - ctr) < (1+tol)*radius.

Definition at line 37 of file tetrahedron.C.

References tetrahedron< Point, PointRef >::circumCentre(), Foam::magSqr(), and Foam::sqrt().

Here is the call graph for this function:

void gradNiSquared ( scalarField buffer  )  const [inline]

Fill buffer with shape function products.

Definition at line 242 of file tetrahedron.C.

void gradNiDotGradNj ( scalarField buffer  )  const [inline]

Definition at line 263 of file tetrahedron.C.

void gradNiGradNi ( tensorField buffer  )  const [inline]

Definition at line 293 of file tetrahedron.C.

void gradNiGradNj ( tensorField buffer  )  const [inline]

Definition at line 311 of file tetrahedron.C.


Friends And Related Function Documentation

Istream& operator>> ( Istream ,
tetrahedron< Point, PointRef > &   
) [friend]

Ostream& operator ( Ostream ,
const tetrahedron< Point, PointRef > &   
) [friend]


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd