FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ > Class Template Reference

Trafo Evaluator CRTP base-class template. More...

#include <evaluator_base.hpp>

Inheritance diagram for FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >:
FEAT::Trafo::Standard::Evaluator< Trafo_, EvalPolicy_, Shape_ >

Classes

struct  ConfigTraits
 Trafo configuration traits class template. More...
 

Public Types

typedef Index CellIterator
 CellIterator typedef. More...
 
typedef EvalPolicy::DataType DataType
 evaluation data type More...
 
typedef EvalPolicy::DomainPointType DomainPointType
 domain point type More...
 
typedef EvalPolicy_ EvalPolicy
 evaluation policy More...
 
typedef EvalPolicy_ EvalTraits
 evaluation traits; identical to eval policy More...
 
typedef EvalPolicy::HessianInverseType HessianInverseType
 hessian inverse tensor type More...
 
typedef EvalPolicy::HessianTensorType HessianTensorType
 hessian tensor type More...
 
typedef EvalPolicy::ImagePointType ImagePointType
 image point type More...
 
typedef EvalPolicy::JacobianDeterminantType JacobianDeterminantType
 jacobian determinant type More...
 
typedef EvalPolicy::JacobianInverseType JacobianInverseType
 jacobian inverse matrix type More...
 
typedef EvalPolicy::JacobianMatrixType JacobianMatrixType
 jacobian matrix type More...
 
typedef TrafoType::ShapeType ShapeType
 shape type More...
 
typedef Trafo_ TrafoType
 trafo type More...
 

Public Member Functions

CellIterator begin () const
 Returns a CellIterator representing the index of the first cell. More...
 
void calc_hess_ten (HessianTensorType &hess_ten, const DomainPointType &dom_point) const
 Computes the hessian tensor for a given domain point. More...
 
void calc_jac_mat (JacobianMatrixType &jac_mat, const DomainPointType &dom_point) const
 Computes the jacobian matrix for a given domain point. More...
 
CellIterator end () const
 Returns a CellIterator representing the first index past the last cell. More...
 
void finish ()
 Finishes the evaluator for the currently active cell. More...
 
Index get_cell_index () const
 Returns the index of the currently active cell. More...
 
Index get_num_cells () const
 Returns the number of cells in the mesh. More...
 
const TrafoTypeget_trafo () const
 Returns a reference to the trafo object. More...
 
void map_point (ImagePointType &img_point, const DomainPointType &dom_point) const
 Maps a domain point from the reference cell to the currently active cell. More...
 
template<TrafoTags cfg_>
void operator() (Trafo::EvalData< EvalTraits, cfg_ > &trafo_data, const DomainPointType &dom_point) const
 Trafo evaluation operator. More...
 
void prepare (const CellIterator &cell)
 Prepares the evaluator for a given cell. More...
 
DataType volume () const
 Computes and returns the volume of the current cell. More...
 
DataType width_directed (const ImagePointType &ray) const
 Computes and returns the directed mesh width. More...
 

Static Public Attributes

static constexpr int domain_dim = EvalPolicy::domain_dim
 domain dimension More...
 
static constexpr TrafoTags eval_caps = ...
 
static constexpr int image_dim = EvalPolicy::image_dim
 image dimension More...
 

Protected Member Functions

 EvaluatorBase (const TrafoType &trafo)
 constructor More...
 

Protected Attributes

Index _cell_index
 currently active cell index More...
 
const TrafoType_trafo
 trafo reference More...
 

Detailed Description

template<typename Trafo_, typename Evaluator_, typename EvalPolicy_>
class FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >

Trafo Evaluator CRTP base-class template.

This class template is a CRTP base class used by various transformation evaluators to outsource common wrapper code which is independent of the actual transformation in use.

Template Parameters
Evaluator_The evaluator class that derives from this class template.
EvalPolicy_The evaluation policy of the trafo evaluator.
Author
Peter Zajac

Definition at line 41 of file evaluator_base.hpp.

Member Typedef Documentation

◆ CellIterator

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
typedef Index FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::CellIterator

CellIterator typedef.

Definition at line 78 of file evaluator_base.hpp.

◆ DataType

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
typedef EvalPolicy::DataType FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::DataType

evaluation data type

Definition at line 56 of file evaluator_base.hpp.

◆ DomainPointType

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
typedef EvalPolicy::DomainPointType FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::DomainPointType

domain point type

Definition at line 58 of file evaluator_base.hpp.

◆ EvalPolicy

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
typedef EvalPolicy_ FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::EvalPolicy

evaluation policy

Definition at line 50 of file evaluator_base.hpp.

◆ EvalTraits

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
typedef EvalPolicy_ FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::EvalTraits

evaluation traits; identical to eval policy

Definition at line 53 of file evaluator_base.hpp.

◆ HessianInverseType

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
typedef EvalPolicy::HessianInverseType FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::HessianInverseType

hessian inverse tensor type

Definition at line 70 of file evaluator_base.hpp.

◆ HessianTensorType

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
typedef EvalPolicy::HessianTensorType FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::HessianTensorType

hessian tensor type

Definition at line 68 of file evaluator_base.hpp.

◆ ImagePointType

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
typedef EvalPolicy::ImagePointType FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::ImagePointType

image point type

Definition at line 60 of file evaluator_base.hpp.

◆ JacobianDeterminantType

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
typedef EvalPolicy::JacobianDeterminantType FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::JacobianDeterminantType

jacobian determinant type

Definition at line 66 of file evaluator_base.hpp.

◆ JacobianInverseType

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
typedef EvalPolicy::JacobianInverseType FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::JacobianInverseType

jacobian inverse matrix type

Definition at line 64 of file evaluator_base.hpp.

◆ JacobianMatrixType

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
typedef EvalPolicy::JacobianMatrixType FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::JacobianMatrixType

jacobian matrix type

Definition at line 62 of file evaluator_base.hpp.

◆ ShapeType

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
typedef TrafoType::ShapeType FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::ShapeType

shape type

Definition at line 47 of file evaluator_base.hpp.

◆ TrafoType

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
typedef Trafo_ FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::TrafoType

trafo type

Definition at line 45 of file evaluator_base.hpp.

Constructor & Destructor Documentation

◆ EvaluatorBase()

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::EvaluatorBase ( const TrafoType trafo)
inlineexplicitprotected

constructor

Definition at line 146 of file evaluator_base.hpp.

Member Function Documentation

◆ begin()

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
CellIterator FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::begin ( ) const
inline

Returns a CellIterator representing the index of the first cell.

Definition at line 164 of file evaluator_base.hpp.

◆ calc_hess_ten()

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
void FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::calc_hess_ten ( HessianTensorType hess_ten,
const DomainPointType dom_point 
) const

Computes the hessian tensor for a given domain point.

Parameters
[out]hess_tenA reference to the hessian tensor that is to be computed.
[in]dom_pointA reference to the domain point on the reference cell for which the hessian tensor is to be computed.

◆ calc_jac_mat()

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
void FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::calc_jac_mat ( JacobianMatrixType jac_mat,
const DomainPointType dom_point 
) const

Computes the jacobian matrix for a given domain point.

Parameters
[out]jac_matA reference to the jacobian matrix that is to be computed.
[in]dom_pointA reference to the domain point on the reference cell for which the jacobian matrix is to be computed.

◆ end()

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
CellIterator FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::end ( ) const
inline

Returns a CellIterator representing the first index past the last cell.

Definition at line 172 of file evaluator_base.hpp.

References FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::get_num_cells().

◆ finish()

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
void FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::finish ( )
inline

Finishes the evaluator for the currently active cell.

Definition at line 211 of file evaluator_base.hpp.

References FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::_cell_index.

Referenced by FEAT::Trafo::Standard::Mapping< Mesh_ >::compute_vol().

◆ get_cell_index()

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
Index FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::get_cell_index ( ) const
inline

Returns the index of the currently active cell.

Definition at line 191 of file evaluator_base.hpp.

References FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::_cell_index.

◆ get_num_cells()

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
Index FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::get_num_cells ( ) const
inline

Returns the number of cells in the mesh.

Returns
The number of cells in the underlying mesh.

Definition at line 183 of file evaluator_base.hpp.

References FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::_trafo, and FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::domain_dim.

Referenced by FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::end().

◆ get_trafo()

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
const TrafoType & FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::get_trafo ( ) const
inline

Returns a reference to the trafo object.

Definition at line 156 of file evaluator_base.hpp.

References FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::_trafo.

◆ map_point()

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
void FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::map_point ( ImagePointType img_point,
const DomainPointType dom_point 
) const

Maps a domain point from the reference cell to the currently active cell.

Parameters
[out]img_pointA reference to the image point on the active cell that is to be computed.
[in]dom_pointA reference to the domain point on the reference cell that is to be mapped.

◆ operator()()

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
template<TrafoTags cfg_>
void FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::operator() ( Trafo::EvalData< EvalTraits, cfg_ > &  trafo_data,
const DomainPointType dom_point 
) const
inline

Trafo evaluation operator.

Parameters
[out]trafo_dataA reference to the trafo data that is to be computed.
[in]dom_pointA reference to the domain point on the reference cell in which the trafo is to be evaluated.
Compiler Hack:
GCC 6.1 template compiler bug

Definition at line 229 of file evaluator_base.hpp.

References FEAT::dom_point, FEAT::hess_inv, FEAT::hess_ten, FEAT::img_point, FEAT::jac_det, FEAT::jac_inv, and FEAT::jac_mat.

◆ prepare()

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
void FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::prepare ( const CellIterator cell)
inline

Prepares the evaluator for a given cell.

Parameters
[in]cellThe index of the cell for which the evaluator is to be prepared.

Definition at line 202 of file evaluator_base.hpp.

References FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::_cell_index.

Referenced by FEAT::Trafo::Standard::Evaluator< Trafo_, EvalPolicy_, Shape_ >::prepare(), and FEAT::Trafo::Standard::Evaluator< Trafo_, EvalPolicy_, Shape::Vertex >::prepare().

◆ volume()

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
DataType FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::volume ( ) const

Computes and returns the volume of the current cell.

Returns
The volume of the current cell.

◆ width_directed()

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
DataType FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::width_directed ( const ImagePointType ray) const

Computes and returns the directed mesh width.

The usual internal implementation of this function returns the following expression:

\[ L\cdot \| J_\tau^{-1} \cdot v \|_2^{-1} \]

where

  • \(J_\tau\) is the Jacobian matrix of the transformation from the reference hypercube or a regular (equilateral) simplex, evaluated in the barycentre of that element.
  • v is the given (normalized) ray direction vector.
  • L is an appropriate scaling factor, which is chosen to ensure that this function returns a value of 1 for the unit element with all edge lengths equal to 1
Parameters
[in]rayA (normalized) direction vector. Must not be a null vector.
Returns
The mesh width in direction of the input ray vector.

Member Data Documentation

◆ _cell_index

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
Index FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::_cell_index
protected

◆ _trafo

◆ domain_dim

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
constexpr int FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::domain_dim = EvalPolicy::domain_dim
staticconstexpr

◆ eval_caps

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
constexpr TrafoTags FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::eval_caps = ...
staticconstexpr

Definition at line 84 of file evaluator_base.hpp.

◆ image_dim

template<typename Trafo_ , typename Evaluator_ , typename EvalPolicy_ >
constexpr int FEAT::Trafo::EvaluatorBase< Trafo_, Evaluator_, EvalPolicy_ >::image_dim = EvalPolicy::image_dim
staticconstexpr

image dimension

Definition at line 75 of file evaluator_base.hpp.


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