#include <Transform.hpp>
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().
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.
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.
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.
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.
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.
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.
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.
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.
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.