imaging::Transform< N_VERTICES, N_FACES, N > Class Template Reference
[Finite Element Module]

Abstract base class of all transformations of the reference element to an element of the FE grid. More...

#include <Transform.hpp>

List of all members.

Public Member Functions

void assign (size_t vertex_index, const ublas::fixed_vector< float_t, N > &vertex_coordinates)
ublas::fixed_vector< float_t, N > & value (const ublas::fixed_vector< float_t, N > &in, ublas::fixed_vector< float_t, N > &out) const
ublas::fixed_matrix< float_t,
N, N > & 
derivative (const ublas::fixed_vector< float_t, N > &in, ublas::fixed_matrix< float_t, N, N > &out) const
ublas::fixed_matrix< float_t,
N, N-1 > & 
boundary_derivative (size_t face_index, const ublas::fixed_vector< float_t, N-1 > &in, ublas::fixed_matrix< float_t, N, N-1 > &out) const
ublas::fixed_vector< float_t, N > & boundary_normal (size_t face_index, ublas::fixed_vector< float_t, N > &out) const
ublas::fixed_vector< float_t, N > & boundary2element (size_t face_index, const ublas::fixed_vector< float_t, N-1 > &in, ublas::fixed_vector< float_t, N > &out) const

Static Public Member Functions

static size_t face_vertex (size_t face_index, size_t face_vertex_index)

Static Public Attributes

static const size_t n_element_vertices = N_VERTICES
static const size_t n_element_faces = N_FACES

Protected Attributes

ublas::fixed_vector
< ublas::fixed_vector< float_t,
N >, N_VERTICES > 
_vertices
 The vertices of the element.


Detailed Description

template<size_t N_VERTICES, size_t N_FACES, size_t N>
class imaging::Transform< N_VERTICES, N_FACES, N >

Abstract base class of all transformations of the reference element to an element of the FE grid.

All implementations of element transformations should be derived from this class. The template parameters N_VERTICES and N refer to the number of vertices of the elements and to the dimension of the element respectively.

The derived classes provide functions to transform coordinates on the reference element to grid coordinates and computes the derivate of this transformation. Furthermore, the classes transform coordinates on the boundary reference elements of the reference element (i.e. the reference elements of the faces of the reference element) to coordinates on the reference element.

To make this more clear, assume the reference element to be the square [-1, 1] x [-1, 1]. I.e. the grid consists of quadrilateral elements. The boundary reference elements of the reference square are the intervals [-1, 1]. First the corresponding Square2dTransform object must be initialized to the 4 vertices of the element it should transform to by calling assign(). It then transforms coordinates in the reference square to coordinates in the element in the 2-dimensional plane. Call value() to perform this transformation and derivative() for its derivative.. Furthermore, the class transforms coordinates in [-1, 1] (i.e. scalar values) to the reference element. This is done by calling boundary2element().

See also:
Square2dTransform, Triangle2dTransform, Interval1dTransform

Member Function Documentation

template<size_t N_VERTICES, size_t N_FACES, size_t N>
static size_t imaging::Transform< N_VERTICES, N_FACES, N >::face_vertex ( size_t  face_index,
size_t  face_vertex_index 
) [static]

Returns the vertex index (on the element) of the vertex determined by face_index and face_vertex_index (on the boundary reference element). E.g. the vertex 1 (there are only vertices 0 and 1 on the boundary reference element) on the face 2 of the square reference element (there are 4 faces with indices from zero to 3) is mapped to vertex 3 on the reference element.

Reimplemented in imaging::Square2dTransform, imaging::Triangle2dTransform, imaging::Tetrahedra3dTransform, imaging::Cube3dTransform, and imaging::Interval1dTransform.

template<size_t N_VERTICES, size_t N_FACES, size_t N>
void imaging::Transform< N_VERTICES, N_FACES, N >::assign ( size_t  vertex_index,
const ublas::fixed_vector< float_t, N > &  vertex_coordinates 
) [inline]

Sets the vertex vertex_index to vertex_coordinates.

template<size_t N_VERTICES, size_t N_FACES, size_t N>
ublas::fixed_vector<float_t, N>& imaging::Transform< N_VERTICES, N_FACES, N >::value ( const ublas::fixed_vector< float_t, N > &  in,
ublas::fixed_vector< float_t, N > &  out 
) const

Computes the coordinates of in (on the reference element) and stores them in out.

template<size_t N_VERTICES, size_t N_FACES, size_t N>
ublas::fixed_matrix<float_t, N, N>& imaging::Transform< N_VERTICES, N_FACES, N >::derivative ( const ublas::fixed_vector< float_t, N > &  in,
ublas::fixed_matrix< float_t, N, N > &  out 
) const

Computes the derivate of the element transform at in (on the reference element) and stores it in out.

template<size_t N_VERTICES, size_t N_FACES, size_t N>
ublas::fixed_matrix<float_t, N, N - 1>& imaging::Transform< N_VERTICES, N_FACES, N >::boundary_derivative ( size_t  face_index,
const ublas::fixed_vector< float_t, N-1 > &  in,
ublas::fixed_matrix< float_t, N, N-1 > &  out 
) const

Computes the derivate of the element transform along the face face_index at in (on the boundary reference element) and stores it in out.

template<size_t N_VERTICES, size_t N_FACES, size_t N>
ublas::fixed_vector<float_t, N>& imaging::Transform< N_VERTICES, N_FACES, N >::boundary_normal ( size_t  face_index,
ublas::fixed_vector< float_t, N > &  out 
) const

Computes the unit boundary normal at the face face_index at in (on the boundary reference element) of the reference element and stores it in out. If the boundaries of the element are linear segments (which is probably always the case), then this function does actually not depend on in. This means the boundary_normal() merely ressembles a look-up table which matches face_index with face normal on the reference element.

template<size_t N_VERTICES, size_t N_FACES, size_t N>
ublas::fixed_vector<float_t, N>& imaging::Transform< N_VERTICES, N_FACES, N >::boundary2element ( size_t  face_index,
const ublas::fixed_vector< float_t, N-1 > &  in,
ublas::fixed_vector< float_t, N > &  out 
) const

Transforms the coordinates in on the boundary reference element of the face face_index to coordinates on the reference element and stores them in out.


Member Data Documentation

template<size_t N_VERTICES, size_t N_FACES, size_t N>
const size_t imaging::Transform< N_VERTICES, N_FACES, N >::n_element_vertices = N_VERTICES [static]

The number of vertices of the reference element of this transformation.

template<size_t N_VERTICES, size_t N_FACES, size_t N>
const size_t imaging::Transform< N_VERTICES, N_FACES, N >::n_element_faces = N_FACES [static]

The number of faces of the reference element of this transformation.


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

Generated on Tue Feb 10 10:01:31 2009 for imaging2 by  doxygen 1.5.5