RefMap Class Reference

Represents the reference mapping. More...

#include <refmap.h>

Inherits Transformable.

List of all members.

Classes

struct  Node

Public Member Functions

 RefMap ()
 ~RefMap ()
void set_quad_2d (Quad2D *quad_2d)
 Sets the quadrature points in which the reference map will be evaluated.
Quad2Dget_quad_2d () const
 Returns the current quadrature points.
const Quad1Dget_quad_1d () const
 Returns the 1D quadrature for use in surface integrals.
virtual void set_active_element (Element *e)
 Initializes the reference map for the specified element. Must be called prior to using all other functions in the class.
bool is_jacobian_const () const
 Returns true if the jacobian of the reference map is constant (which is the case for non-curvilinear triangular elements), false otherwise.
int get_inv_ref_order () const
 Returns the increase in the integration order due to the reference map.
double get_const_jacobian () const
 If the jacobian of the reference map is constant, this is the fast way to obtain it.
double2x2get_const_inv_ref_map ()
 If the reference map is constant, this is the fast way to obtain its inverse matrix.
double * get_jacobian (int order)
 Returns the jacobian of the reference map precalculated at the integration points of the specified order. Intended for non-constant jacobian elements.
double2x2get_inv_ref_map (int order)
 Returns the inverse matrices of the reference map precalculated at the integration points of the specified order. Intended for non-constant jacobian elements.
double3x2get_second_ref_map (int order)
 Returns coefficients for weak forms with second derivatives.
double * get_phys_x (int order)
 Returns the x-coordinates of the integration points transformed to the physical domain of the element. Intended for integrals containing spatial variables.
double * get_phys_y (int order)
 Returns he y-coordinates of the integration points transformed to the physical domain of the element. Intended for integrals containing spatial variables.
double3get_tangent (int edge)
 Returns the triples [x,y,norm] of the tangent to the specified (possibly curved) edge at the 1D integration points along the edge. The maximum 1D quadrature rule is always used.
void untransform (Element *e, double x, double y, double &xi1, double &xi2)
 Transforms physical coordinates x, y from the element e back to the reference domain. If the point (x, y) does not lie in e, then (xi1, xi2) will not lie in the reference domain.
void inv_ref_map_at_point (double xi1, double xi2, double &x, double &y, double2x2 &m)
 Calculates the inverse Jacobi matrix of reference map at a particular point (xi1, xi2).
virtual void push_transform (int son)
 See Transformable::push_transform().
virtual void pop_transform ()
 See Transformable::pop_transform().
void free ()
 Frees all data associated with the instance.
void force_transform (uint64_t sub_idx, Trf *ctm)
 For internal use only.

Protected Member Functions

void update_cur_node ()
void calc_inv_ref_map (int order)
void calc_const_inv_ref_map ()
 Quickly calculates the (hard-coded) reference mapping for elements with constant jacobians (ie., linear triangles and linear parallelogram quads). How it works for parallelograms can be found here.
void calc_second_ref_map (int order)
bool is_parallelogram ()
void calc_phys_x (int order)
void calc_phys_y (int order)
void calc_tangent (int edge)
int calc_inv_ref_order ()
 Finds the necessary quadrature degree needed to integrate the inverse reference mapping matrix alone. This is added to the total integration order in weak form itegrals.
void init_node (Node **pp)
void free_node (Node *node)
Node ** handle_overflow ()

Protected Attributes

Quad2Dquad_2d
int num_tables
bool is_const
int inv_ref_order
double const_jacobian
double2x2 const_inv_ref_map
void * nodes
Nodecur_node
Nodeoverflow
Quad1DStd quad_1d
int indices [70]
int nc
double2coefs
double2 lin_coefs [4]

Static Protected Attributes

static const int H2D_MAX_TABLES = g_max_quad + 1 + 4

Detailed Description

Represents the reference mapping.

RefMap represents the mapping from the reference to the physical element. Its main task is to provide both the (inverse) reference mapping matrix and its jacobian, precalculated in quadrature points. Other functions include the calculation of integration points positions in the physical domain and the calculation of edge tangents in 1D integration points.


Constructor & Destructor Documentation

RefMap::RefMap (  ) 
RefMap::~RefMap (  )  [inline]

Member Function Documentation

void RefMap::calc_const_inv_ref_map (  )  [protected]

Quickly calculates the (hard-coded) reference mapping for elements with constant jacobians (ie., linear triangles and linear parallelogram quads). How it works for parallelograms can be found here.

void RefMap::calc_inv_ref_map ( int  order  )  [protected]
int RefMap::calc_inv_ref_order (  )  [protected]

Finds the necessary quadrature degree needed to integrate the inverse reference mapping matrix alone. This is added to the total integration order in weak form itegrals.

void RefMap::calc_phys_x ( int  order  )  [protected]
void RefMap::calc_phys_y ( int  order  )  [protected]
void RefMap::calc_second_ref_map ( int  order  )  [protected]
void RefMap::calc_tangent ( int  edge  )  [protected]
void RefMap::force_transform ( uint64_t  sub_idx,
Trf ctm 
) [inline]

For internal use only.

void RefMap::free (  ) 

Frees all data associated with the instance.

void RefMap::free_node ( Node node  )  [protected]
double2x2* RefMap::get_const_inv_ref_map (  )  [inline]

If the reference map is constant, this is the fast way to obtain its inverse matrix.

double RefMap::get_const_jacobian (  )  const [inline]

If the jacobian of the reference map is constant, this is the fast way to obtain it.

double2x2* RefMap::get_inv_ref_map ( int  order  )  [inline]

Returns the inverse matrices of the reference map precalculated at the integration points of the specified order. Intended for non-constant jacobian elements.

int RefMap::get_inv_ref_order (  )  const [inline]

Returns the increase in the integration order due to the reference map.

double* RefMap::get_jacobian ( int  order  )  [inline]

Returns the jacobian of the reference map precalculated at the integration points of the specified order. Intended for non-constant jacobian elements.

double* RefMap::get_phys_x ( int  order  )  [inline]

Returns the x-coordinates of the integration points transformed to the physical domain of the element. Intended for integrals containing spatial variables.

double* RefMap::get_phys_y ( int  order  )  [inline]

Returns he y-coordinates of the integration points transformed to the physical domain of the element. Intended for integrals containing spatial variables.

const Quad1D* RefMap::get_quad_1d (  )  const [inline]

Returns the 1D quadrature for use in surface integrals.

Quad2D* RefMap::get_quad_2d (  )  const [inline]

Returns the current quadrature points.

double3x2* RefMap::get_second_ref_map ( int  order  )  [inline]

Returns coefficients for weak forms with second derivatives.

double3* RefMap::get_tangent ( int  edge  )  [inline]

Returns the triples [x,y,norm] of the tangent to the specified (possibly curved) edge at the 1D integration points along the edge. The maximum 1D quadrature rule is always used.

RefMap::Node ** RefMap::handle_overflow (  )  [protected]
void RefMap::init_node ( Node **  pp  )  [protected]
void RefMap::inv_ref_map_at_point ( double  xi1,
double  xi2,
double &  x,
double &  y,
double2x2 m 
)

Calculates the inverse Jacobi matrix of reference map at a particular point (xi1, xi2).

bool RefMap::is_jacobian_const (  )  const [inline]

Returns true if the jacobian of the reference map is constant (which is the case for non-curvilinear triangular elements), false otherwise.

bool RefMap::is_parallelogram (  )  [protected]
void RefMap::pop_transform (  )  [virtual]
void RefMap::push_transform ( int  son  )  [virtual]
void RefMap::set_active_element ( Element e  )  [virtual]

Initializes the reference map for the specified element. Must be called prior to using all other functions in the class.

Reimplemented from Transformable.

void RefMap::set_quad_2d ( Quad2D quad_2d  ) 

Sets the quadrature points in which the reference map will be evaluated.

Parameters:
quad_2d [in] The quadrature points.
void RefMap::untransform ( Element e,
double  x,
double  y,
double &  xi1,
double &  xi2 
)

Transforms physical coordinates x, y from the element e back to the reference domain. If the point (x, y) does not lie in e, then (xi1, xi2) will not lie in the reference domain.

void RefMap::update_cur_node (  )  [inline, protected]

Member Data Documentation

double2* RefMap::coefs [protected]
double RefMap::const_jacobian [protected]
Node* RefMap::cur_node [protected]
const int RefMap::H2D_MAX_TABLES = g_max_quad + 1 + 4 [static, protected]
int RefMap::indices[70] [protected]
int RefMap::inv_ref_order [protected]
bool RefMap::is_const [protected]
double2 RefMap::lin_coefs[4] [protected]
int RefMap::nc [protected]
void* RefMap::nodes [protected]
int RefMap::num_tables [protected]
Node* RefMap::overflow [protected]
Quad2D* RefMap::quad_2d [protected]

The documentation for this class was generated from the following files:
Generated on Sat Jun 5 15:17:43 2010 for Hermes2D Library: Real Version by  doxygen 1.6.3