Hermes2D
3.0
|
#include <transformable.h>
Public Member Functions | |
Element * | get_active_element () const |
virtual void | set_transform (uint64_t idx) |
uint64_t | get_transform () const |
virtual void | push_transform (int son) |
virtual void | pop_transform () |
Static Public Attributes | |
static const unsigned int | H2D_MAX_TRN_LEVEL = 15 |
If this changes, NeighborSearch::H2D_MAX_NEIGHBORS must change too. | |
Protected Member Functions | |
virtual void | set_active_element (Element *e) |
virtual void | reset_transform () |
Empties the stack, loads identity transform. | |
double | get_transform_jacobian () const |
Trf * | get_ctm () const |
virtual void | force_transform (uint64_t sub_idx, Trf *ctm) |
For internal use only. | |
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 | |
Element * | element |
The active element. | |
Trf * | ctm |
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 uint64_t | H2D_MAX_IDX = (1ULL << 3 * H2D_MAX_TRN_LEVEL) - 1 |
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 44 of file transformable.h.
|
inline |
Definition at line 48 of file transformable.h.
Referenced by Hermes::Hermes2D::PostProcessing::VolumetricIntegralCalculator< Scalar >::calculate(), Hermes::Hermes2D::PostProcessing::SurfaceIntegralCalculator< Scalar >::calculate(), Hermes::Hermes2D::init_fn_preallocated(), Hermes::Hermes2D::init_geom_surf_allocated(), Hermes::Hermes2D::init_geom_vol_allocated(), Hermes::Hermes2D::RefinementSelectors::L2ProjBasedSelector< Scalar >::precalc_ref_solution(), Hermes::Hermes2D::RefinementSelectors::H1ProjBasedSelector< Scalar >::precalc_ref_solution(), and Hermes::Hermes2D::RefinementSelectors::HcurlProjBasedSelector< Scalar >::precalc_ref_solution().
|
inlineprotected |
Definition at line 90 of file transformable.h.
Referenced by Hermes::Hermes2D::CurvMap::update_refmap_coeffs().
|
inlineprotected |
Definition at line 96 of file transformable.h.
uint64_t Hermes::Hermes2D::Transformable::get_transform | ( | ) | const |
Definition at line 66 of file transformable.cpp.
Referenced by Hermes::Hermes2D::NeighborSearch< Scalar >::init_ext_fn().
|
inlineprotected |
Definition at line 87 of file transformable.h.
|
virtual |
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::Function< Scalar >, Hermes::Hermes2D::Function< double >, Hermes::Hermes2D::RefMap, Hermes::Hermes2D::ComplexFilter, Hermes::Hermes2D::Filter< Scalar >, Hermes::Hermes2D::Filter< double >, and Hermes::Hermes2D::Filter< std::complex< double > >.
Definition at line 59 of file transformable.cpp.
Referenced by Hermes::Hermes2D::Function< Scalar >::pop_transform().
|
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.
son[in] | Son element number in the range[0-3] for triangles and[0-7] for quads. |
Reimplemented in Hermes::Hermes2D::Function< Scalar >, Hermes::Hermes2D::Function< double >, Hermes::Hermes2D::RefMap, Hermes::Hermes2D::ComplexFilter, Hermes::Hermes2D::Filter< Scalar >, Hermes::Hermes2D::Filter< double >, and Hermes::Hermes2D::Filter< std::complex< double > >.
Definition at line 109 of file transformable.cpp.
Referenced by Hermes::Hermes2D::Function< Scalar >::push_transform(), and set_transform().
|
protectedvirtual |
Called by the assembling procedure and by other functions. In PrecalcShapeset it sets an internal variable that can be later retrieved by get_active_element(). In Solution it selects the element to retrieve solution values for, etc.
e[in] | Element associated with the function being represented by the class. |
Reimplemented in Hermes::Hermes2D::LinearFilter< Scalar >, Hermes::Hermes2D::Function< Scalar >, Hermes::Hermes2D::Function< double >, Hermes::Hermes2D::Solution< Scalar >, Hermes::Hermes2D::Solution< double >, Hermes::Hermes2D::ComplexFilter, Hermes::Hermes2D::MeshFunction< Scalar >, Hermes::Hermes2D::MeshFunction< double >, Hermes::Hermes2D::MeshFunction< std::complex< double > >, Hermes::Hermes2D::RefMap, Hermes::Hermes2D::Filter< Scalar >, Hermes::Hermes2D::Filter< double >, and Hermes::Hermes2D::Filter< std::complex< double > >.
Definition at line 76 of file transformable.cpp.
Referenced by Hermes::Hermes2D::Function< Scalar >::set_active_element().
|
virtual |
Sets the current transform at once as if it was created by multiple calls to push_transform().
idx[in] | The number of the sub-element, as returned by get_transform(). |
Reimplemented in Hermes::Hermes2D::Function< Scalar >, and Hermes::Hermes2D::Function< double >.
Definition at line 89 of file transformable.cpp.
Referenced by Hermes::Hermes2D::Function< Scalar >::set_transform().
|
staticprotected |
The largest sub_idx for top <= 10. FIXME: Why it is only 0x4000?
Definition at line 111 of file transformable.h.