Hermes2D  2.0
Hermes::Hermes2D::Transformable Class Reference

#include <transformable.h>

+ Inheritance diagram for Hermes::Hermes2D::Transformable:

Public Member Functions

Elementget_active_element () const
 
void set_transform (uint64_t idx)
 
uint64_t get_transform () const
 
virtual void push_transform (int son)
 

Protected Member Functions

virtual void set_active_element (Element *e)
 
virtual void pop_transform ()
 
void reset_transform ()
 Empties the stack, loads identity transform.
 
double get_transform_jacobian () const
 
Trfget_ctm () const
 
unsigned int get_depth () const
 

Static Protected Member Functions

static void push_transforms (std::set< Transformable * > &transformables, int son)
 
static void pop_transforms (std::set< Transformable * > &transformables)
 

Protected Attributes

Elementelement
 The active element.
 
Trfctm
 Current sub-element transformation matrix.
 
uint64_t sub_idx
 Sub-element transformation index.
 
Trf stack [21]
 Transformation matrix stack.
 
unsigned int top
 Stack top.
 

Static Protected Attributes

static const unsigned int H2D_MAX_TRN_LEVEL = 15
 
static const uint64_t H2D_MAX_IDX = (1ULL << 3 * H2D_MAX_TRN_LEVEL) - 1
 

Friends

template<typename T >
class KellyTypeAdapt
 
template<typename T >
class Adapt
 
template<typename T >
class Func
 
template<typename T >
class Function
 
template<typename T >
class DiscontinuousFunc
 
template<typename T >
class DiscreteProblem
 
template<typename T >
class DiscreteProblemLinear
 
template<typename T >
class NeighborSearch
 
class CurvMap
 
class Traverse
 
class Views::Vectorizer
 

Detailed Description

Transformable is a base class for all classes that perform some kind of precalculation of function values on elements. These classes (PrecalcShapeset, Solution, RefMap) inherit from Transformable the ability to transform integration points to the sub-elements of an element.

Definition at line 49 of file transformable.h.

Member Function Documentation

Trf* Hermes::Hermes2D::Transformable::get_ctm ( ) const
inlineprotected
Returns
The current transformation matrix.

Definition at line 92 of file transformable.h.

unsigned int Hermes::Hermes2D::Transformable::get_depth ( ) const
inlineprotected
Returns
The depth of the current transformation.

Definition at line 95 of file transformable.h.

uint64_t Hermes::Hermes2D::Transformable::get_transform ( ) const
Returns
The current transform index.

Definition at line 68 of file transformable.cpp.

Referenced by Hermes::Hermes2D::NeighborSearch< Scalar >::init_ext_fn().

double Hermes::Hermes2D::Transformable::get_transform_jacobian ( ) const
inlineprotected
Returns
The jacobian of the current transformation matrix.

Definition at line 89 of file transformable.h.

void Hermes::Hermes2D::Transformable::pop_transform ( )
protectedvirtual

Removes the current transformation matrix from the top of the stack. The new top becomes the current transformation matrix. This returns the transform to the state before the last push_transform() was performed.

Reimplemented in Hermes::Hermes2D::ComplexFilter, Hermes::Hermes2D::MeshFunction< Scalar >, Hermes::Hermes2D::MeshFunction< double >, Hermes::Hermes2D::MeshFunction< std::complex< double > >, Hermes::Hermes2D::Filter< Scalar >, Hermes::Hermes2D::Filter< double >, and Hermes::Hermes2D::Filter< std::complex< double > >.

Definition at line 61 of file transformable.cpp.

Referenced by Hermes::Hermes2D::MeshFunction< Scalar >::pop_transform().

void Hermes::Hermes2D::Transformable::push_transform ( int  son)
virtual

Multiplies the current transformation matrix on the right by a transformation to the specified son element and pushes it on top of the matrix stack. All integration points will then be transformed to this sub-element. This process can be repeated.

Parameters
son[in]Son element number in the range[0-3] for triangles and[0-7] for quads.

Reimplemented in Hermes::Hermes2D::ComplexFilter, Hermes::Hermes2D::MeshFunction< Scalar >, Hermes::Hermes2D::MeshFunction< double >, Hermes::Hermes2D::MeshFunction< std::complex< double > >, Hermes::Hermes2D::Filter< Scalar >, Hermes::Hermes2D::Filter< double >, and Hermes::Hermes2D::Filter< std::complex< double > >.

Definition at line 99 of file transformable.cpp.

Referenced by Hermes::Hermes2D::MeshFunction< Scalar >::push_transform(), and set_transform().

void Hermes::Hermes2D::Transformable::set_active_element ( Element e)
protectedvirtual
void Hermes::Hermes2D::Transformable::set_transform ( uint64_t  idx)

Sets the current transform at once as if it was created by multiple calls to push_transform().

Parameters
idx[in]The number of the sub-element, as returned by get_transform().

Definition at line 85 of file transformable.cpp.

Referenced by Hermes::Hermes2D::DiscreteProblem< Scalar >::assemble_DG_one_neighbor(), Hermes::Hermes2D::KellyTypeAdapt< Scalar >::calc_err_internal(), and Hermes::Hermes2D::NeighborSearch< Scalar >::init_ext_fn().

Member Data Documentation

const uint64_t Hermes::Hermes2D::Transformable::H2D_MAX_IDX = (1ULL << 3 * H2D_MAX_TRN_LEVEL) - 1
staticprotected

The largest sub_idx for top <= 10. FIXME: Why it is only 0x4000?

Definition at line 111 of file transformable.h.


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