Version: 5.1.6

INTERP_KERNEL.SplitterTetra< MyMeshType > Class Template Reference

Class calculating the volume of intersection between a tetrahedral target element and source elements with triangular or quadratilateral faces. More...

#include <SplitterTetra.hxx>

Public Member Functions

 SplitterTetra (const MyMeshType &srcMesh, const double **tetraCorners, const typename MyMeshType::MyConnType *nodesId)
 ~SplitterTetra ()
double intersectSourceCell (typename MyMeshType::MyConnType srcCell, double *baryCentre=0)
double intersectTetra (const double **tetraCorners)
MyMeshType::MyConnType getId (int id)
void splitIntoDualCells (SplitterTetra< MyMeshType > **output)
void splitMySelfForDual (double *output, int i, typename MyMeshType::MyConnType &nodeId)
void clearVolumesCache ()

Private Member Functions

void createAffineTransform (const double **corners)
 Creates the affine transform _t from the corners of the tetrahedron.
void checkIsOutside (const double *pt, bool *isOutside) const
 Function used to filter out elements by checking if they belong to one of the halfspaces x <= 0, x >= 1, y <= 0, y >= 1, z <= 0, z >= 1, (indexed 0 - 7).
void calculateNode (typename MyMeshType::MyConnType globalNodeNum)
 Calculates the transformed node with a given global node number.
void calculateVolume (TransformedTriangle &tri, const TriangleFaceKey &key)
 Calculates the volume contribution from the given TransformedTriangle and stores it with the given key in .
 SplitterTetra (const SplitterTetra &t)
 disallow copying
SplitterTetraoperator= (const SplitterTetra &t)
 disallow assignment

Private Attributes

TetraAffineTransform_t
 affine transform associated with this target element
HashMap< int, double * > _nodes
 HashMap relating node numbers to transformed nodes, used for caching.
HashMap< TriangleFaceKey, double_volumes
 HashMap relating triangular faces to calculated volume contributions, used for caching.
const MyMeshType & _src_mesh
 reference to the source mesh
MyMeshType::MyConnType _conn [4]
double _coords [12]

Detailed Description

template<class MyMeshType>
class INTERP_KERNEL::SplitterTetra< MyMeshType >

Class calculating the volume of intersection between a tetrahedral target element and source elements with triangular or quadratilateral faces.


Constructor & Destructor Documentation

template<class MyMeshType>
INTERP_KERNEL.SplitterTetra< MyMeshType >.SplitterTetra ( const MyMeshType &  srcMesh,
const double **  tetraCorners,
const typename MyMeshType::MyConnType *  nodesId 
)
template<class MyMeshType>
INTERP_KERNEL.SplitterTetra< MyMeshType >.~SplitterTetra (  ) 
template<class MyMeshType>
INTERP_KERNEL.SplitterTetra< MyMeshType >.SplitterTetra ( const SplitterTetra< MyMeshType > &  t  )  [private]

disallow copying


Member Function Documentation

template<class MyMeshType>
double INTERP_KERNEL.SplitterTetra< MyMeshType >.intersectSourceCell ( typename MyMeshType::MyConnType  srcCell,
double baryCentre = 0 
)
template<class MyMeshType>
double INTERP_KERNEL.SplitterTetra< MyMeshType >.intersectTetra ( const double **  tetraCorners  ) 
template<class MyMeshType>
MyMeshType::MyConnType INTERP_KERNEL.SplitterTetra< MyMeshType >.getId ( int  id  ) 
template<class MyMeshType>
void INTERP_KERNEL.SplitterTetra< MyMeshType >.splitIntoDualCells ( SplitterTetra< MyMeshType > **  output  ) 
template<class MyMeshType>
void INTERP_KERNEL.SplitterTetra< MyMeshType >.splitMySelfForDual ( double output,
int  i,
typename MyMeshType::MyConnType &  nodeId 
)
template<class MyMeshType>
void INTERP_KERNEL.SplitterTetra< MyMeshType >.clearVolumesCache (  ) 
template<class MyMeshType >
void INTERP_KERNEL.SplitterTetra< MyMeshType >::createAffineTransform ( const double **  corners  )  [private]

Creates the affine transform _t from the corners of the tetrahedron.

Used by the constructors

Parameters:
corners double*[4] array containing pointers to four double[3] arrays with the coordinates of the corners of the tetrahedron

References INTERP_KERNEL.SplitterTetra< MyMeshType >._t.

template<class MyMeshType >
void INTERP_KERNEL.SplitterTetra< MyMeshType >::checkIsOutside ( const double pt,
bool *  isOutside 
) const [private]

Function used to filter out elements by checking if they belong to one of the halfspaces x <= 0, x >= 1, y <= 0, y >= 1, z <= 0, z >= 1, (indexed 0 - 7).

The function updates an array of boolean variables which indicates whether the points that have already been checked are all in a halfspace. For each halfspace, the corresponding array element will be true if and only if it was true when the method was called and pt lies in the halfspace.

Parameters:
pt double[3] containing the coordiantes of a transformed point
isOutside bool[8] which indicate the results of earlier checks.
template<class MyMeshType >
void INTERP_KERNEL.SplitterTetra< MyMeshType >::calculateNode ( typename MyMeshType::MyConnType  globalNodeNum  )  [private]

Calculates the transformed node with a given global node number.

Gets the coordinates for the node in _src_mesh with the given global number and applies TetraAffineTransform _t to it. Stores the result in the cache _nodes. The non-existance of the node in _nodes should be verified before calling.

Parameters:
globalNodeNum global node number of the node in the mesh _src_mesh

References INTERP_KERNEL.SplitterTetra< MyMeshType >._nodes, INTERP_KERNEL.SplitterTetra< MyMeshType >._src_mesh, INTERP_KERNEL.SplitterTetra< MyMeshType >._t, and INTERP_KERNEL.TetraAffineTransform.apply().

template<class MyMeshType >
void INTERP_KERNEL.SplitterTetra< MyMeshType >::calculateVolume ( TransformedTriangle tri,
const TriangleFaceKey key 
) [private]

Calculates the volume contribution from the given TransformedTriangle and stores it with the given key in .

Calls TransformedTriangle.calculateIntersectionVolume to perform the calculation.

Parameters:
tri triangle for which to calculate the volume contribution
key key associated with the face

References INTERP_KERNEL.SplitterTetra< MyMeshType >._volumes, INTERP_KERNEL.TransformedTriangle.calculateIntersectionVolume(), and INTERP_KERNEL.HashMap< _Key, _Tp, _HashFn, _EqualKey, _Alloc >.insert().

template<class MyMeshType>
SplitterTetra& INTERP_KERNEL.SplitterTetra< MyMeshType >.operator= ( const SplitterTetra< MyMeshType > &  t  )  [private]

disallow assignment


Field Documentation

template<class MyMeshType>
TetraAffineTransform* INTERP_KERNEL.SplitterTetra< MyMeshType >._t [private]

affine transform associated with this target element

template<class MyMeshType>
HashMap< int , double* > INTERP_KERNEL.SplitterTetra< MyMeshType >._nodes [private]

HashMap relating node numbers to transformed nodes, used for caching.

template<class MyMeshType>
HashMap< TriangleFaceKey, double > INTERP_KERNEL.SplitterTetra< MyMeshType >._volumes [private]

HashMap relating triangular faces to calculated volume contributions, used for caching.

template<class MyMeshType>
const MyMeshType& INTERP_KERNEL.SplitterTetra< MyMeshType >._src_mesh [private]

reference to the source mesh

template<class MyMeshType>
MyMeshType::MyConnType INTERP_KERNEL.SplitterTetra< MyMeshType >._conn[4] [private]
template<class MyMeshType>
double INTERP_KERNEL.SplitterTetra< MyMeshType >._coords[12] [private]