NiHu  2.0
NiHu::quadrature_base< Derived > Class Template Reference

CRTP base class of all quadratures. More...

#include <quadrature.hpp>

Public Types

typedef eigen_std_vector< typename quadr_elem< Derived >::type >::type base_t
 the base vector class of the quadrature
 
typedef quadrature_traits< Derived > traits_t
 traits type
 
typedef traits_t::domain_t domain_t
 domain type
 
typedef domain_t::xi_t xi_t
 local coordinate type
 
typedef domain_t::scalar_t scalar_t
 local scalar type
 
typedef quadrature_elem< xi_t, scalar_tquadrature_elem_t
 quadrature elem type
 

Public Member Functions

 quadrature_base (size_t N=0)
 constructor allocating space for the quadrature elements More...
 
scalar_t sum_of_weights (void) const
 return sum of quadrature weights More...
 
std::ostream & print (std::ostream &os) const
 print a quadrature into an output stream More...
 
Derived & operator*= (scalar_t const &c)
 multiply the quadrature by a scalar More...
 
template<class LSet , bool Signed = true>
Derived transform (Eigen::Matrix< scalar_t, LSet::num_nodes, LSet::domain_t::dimension > const &coords) const
 transform the domain of the quadrature with a given shape set and corner points More...
 
template<class LSet , bool Signed = true>
Derived & transform_inplace (const Eigen::Matrix< scalar_t, LSet::num_nodes, LSet::domain_t::dimension > &coords)
 transform the domain of the quadrature in place More...
 
template<class otherDerived >
Derived operator+ (const quadrature_base< otherDerived > &other) const
 add two quadratures More...
 
template<class otherDerived >
Derived & operator+= (const quadrature_base< otherDerived > &other)
 add another quadrature to this More...
 

Detailed Description

template<class Derived>
class NiHu::quadrature_base< Derived >

CRTP base class of all quadratures.

Template Parameters
Derivedthe CRTP derived class

Definition at line 162 of file quadrature.hpp.

Constructor & Destructor Documentation

◆ quadrature_base()

template<class Derived >
NiHu::quadrature_base< Derived >::quadrature_base ( size_t  N = 0)
inline

constructor allocating space for the quadrature elements

Parameters
Nnumber of quadrature elements

Definition at line 187 of file quadrature.hpp.

Member Function Documentation

◆ operator*=()

template<class Derived >
Derived& NiHu::quadrature_base< Derived >::operator*= ( scalar_t const &  c)
inline

multiply the quadrature by a scalar

Parameters
[in]cthe scalar multiplier
Returns
reference to the the new quadrature

Definition at line 222 of file quadrature.hpp.

◆ operator+()

template<class Derived >
template<class otherDerived >
Derived NiHu::quadrature_base< Derived >::operator+ ( const quadrature_base< otherDerived > &  other) const
inline

add two quadratures

Template Parameters
otherDerivedother quadrature type
Parameters
[in]otherthe other quadrature
Returns
new quadrature

It is assured that the dimensions match.

Definition at line 281 of file quadrature.hpp.

◆ operator+=()

template<class Derived >
template<class otherDerived >
Derived& NiHu::quadrature_base< Derived >::operator+= ( const quadrature_base< otherDerived > &  other)
inline

add another quadrature to this

It is assured that the dimensions match.

Template Parameters
otherDerivedother quadrature type
Parameters
[in]otherthe other quadrature
Returns
reference to the new quadrature

Definition at line 299 of file quadrature.hpp.

◆ print()

template<class Derived >
std::ostream& NiHu::quadrature_base< Derived >::print ( std::ostream &  os) const
inline

print a quadrature into an output stream

Parameters
osthe output stream
Returns
reference to the stream

Definition at line 209 of file quadrature.hpp.

◆ sum_of_weights()

template<class Derived >
scalar_t NiHu::quadrature_base< Derived >::sum_of_weights ( void  ) const
inline

return sum of quadrature weights

Returns
sum of weights

Definition at line 196 of file quadrature.hpp.

◆ transform()

template<class Derived >
template<class LSet , bool Signed = true>
Derived NiHu::quadrature_base< Derived >::transform ( Eigen::Matrix< scalar_t, LSet::num_nodes, LSet::domain_t::dimension > const &  coords) const
inline

transform the domain of the quadrature with a given shape set and corner points

Template Parameters
LSetshape set type of transformation
Signedindicates if the sign of the Jacobian needs to be taken into ancount
Parameters
[in]coordscorner coordinates of transformed domain
Returns
transformed quadrature
Todo:
this transformation is sick, does not fit into our quadrature scheme conceptually

Definition at line 238 of file quadrature.hpp.

◆ transform_inplace()

template<class Derived >
template<class LSet , bool Signed = true>
Derived& NiHu::quadrature_base< Derived >::transform_inplace ( const Eigen::Matrix< scalar_t, LSet::num_nodes, LSet::domain_t::dimension > &  coords)
inline

transform the domain of the quadrature in place

Template Parameters
LSetshape set type of transformation
Signedindicates if the sign of the Jacobian needs to be taken into ancount
Parameters
[in]coordscorner coordinates of transformed domain
Returns
reference to the transformed quadrature

Definition at line 259 of file quadrature.hpp.


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