Loading...
Searching...
No Matches
fem_on_pointset.h
Go to the documentation of this file.
#ifndef _RHEOLEF_FEM_ON_POINTSET_H
#define _RHEOLEF_FEM_ON_POINTSET_H
//
// evaluate a FEM basis on a mapped element K
// on a full pointset, e.g. a quadrature node set
// or an interpolation node set
// where the FEM on K is defined via the Piola transformation:
//
// F : hat_K ---> K
// hat_x +--> x = F(hat_x)
//
// and the corresponding FEM on the reference element
//
#include "rheolef/geo.h"
#include "rheolef/basis_on_pointset.h"
#include "rheolef/piola_on_pointset.h"
namespace rheolef {
// ----------------------------------------------------------------------------
// representation
// ----------------------------------------------------------------------------
template<class T>
class fem_on_pointset_rep {
public:
typedef reference_element::size_type size_type;
typedef details::differentiate_option::type diff_type;
// allocators:
fem_on_pointset_rep();
// accessors:
const basis_on_pointset<T>& get_basis_on_pointset() const { return _bops; }
const piola_on_pointset<T>& get_piola_on_pointset() const { return _pops; }
// modifiers:
void initialize (
const basis_basic<T>& fem_basis,
const piola_on_pointset<T>& pops);
template<class M, class Value, diff_type Diff>
void
evaluate (
const geo_basic<T,M>& omega_K,
const geo_element& K,
const details::differentiate_option& gopt,
Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const;
template<class M, class Value, diff_type Diff>
void
evaluate_on_side (
const geo_basic<T,M>& omega_K,
const geo_element& K,
const side_information_type& sid,
const details::differentiate_option& gopt,
Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const;
// internals:
template<class M, class Value>
void _evaluate_post_piola (
const geo_basic<T,M>& omega_K,
const geo_element& K,
const Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& hat_phij_xi,
Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const;
//protected:
basis_on_pointset<T> _bops;
piola_on_pointset<T> _pops;
// working area:
public:
mutable std::array<
Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>
,reference_element::max_variant> _scalar_phij_xi;
mutable std::array<
Eigen::Matrix<point_basic<T>,Eigen::Dynamic,Eigen::Dynamic>
,reference_element::max_variant> _vector_phij_xi;
mutable std::array<
Eigen::Matrix<tensor_basic<T>,Eigen::Dynamic,Eigen::Dynamic>
,reference_element::max_variant> _tensor_phij_xi;
};
template<class T>
fem_on_pointset_rep<T>::fem_on_pointset_rep()
: _bops(),
_pops(),
_scalar_phij_xi(),
_vector_phij_xi(),
_tensor_phij_xi()
{
}
// ----------------------------------------------------------------------------
// interface
// ----------------------------------------------------------------------------
template<class T>
class fem_on_pointset: public smart_pointer<fem_on_pointset_rep<T> > {
public:
typedef fem_on_pointset_rep<T> rep;
typedef smart_pointer<rep> base;
typedef typename rep::size_type size_type;
typedef typename rep::diff_type diff_type;
// allocators:
fem_on_pointset();
// modifiers:
void initialize (
const basis_basic<T>& fem_basis,
const piola_on_pointset<T>& pops)
{ base::data().initialize (fem_basis, pops); }
// accessors:
const basis_on_pointset<T>& get_basis_on_pointset() const
{ return base::data().get_basis_on_pointset(); }
const piola_on_pointset<T>& get_piola_on_pointset() const
{ return base::data().get_piola_on_pointset(); }
template<class M, class Value, diff_type Diff>
void
evaluate (
const geo_basic<T,M>& omega_K,
const geo_element& K,
const details::differentiate_option& gopt,
Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const
{ base::data().template evaluate<M,Value,Diff> (omega_K, K, gopt, value); }
template<class M, class Value, diff_type Diff>
void
evaluate_on_side (
const geo_basic<T,M>& omega_K,
const geo_element& K,
const side_information_type& sid,
const details::differentiate_option& gopt,
Eigen::Matrix<Value,Eigen::Dynamic,Eigen::Dynamic>& value) const
{ base::data().template evaluate_on_side<M,Value,Diff> (omega_K, K, sid, gopt, value); }
};
template<class T>
inline
fem_on_pointset<T>::fem_on_pointset()
: base(new_macro(rep))
{
}
}// namespace rheolef
#endif // _RHEOLEF_FEM_ON_POINTSET_H
rheolef::basis_basic
Definition basis.h:566
rheolef::basis_on_pointset
Definition basis_on_pointset.h:192
rheolef::fem_on_pointset_rep
Definition fem_on_pointset.h:43
rheolef::fem_on_pointset_rep::_bops
basis_on_pointset< T > _bops
Definition fem_on_pointset.h:89
rheolef::fem_on_pointset_rep::_evaluate_post_piola
void _evaluate_post_piola(const geo_basic< T, M > &omega_K, const geo_element &K, const Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &hat_phij_xi, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value) const
Definition fem_on_pointset.cc:79
rheolef::fem_on_pointset_rep::size_type
reference_element::size_type size_type
Definition fem_on_pointset.h:45
rheolef::fem_on_pointset_rep::fem_on_pointset_rep
fem_on_pointset_rep()
Definition fem_on_pointset.h:105
rheolef::fem_on_pointset_rep::_scalar_phij_xi
std::array< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic >,reference_element::max_variant > _scalar_phij_xi
Definition fem_on_pointset.h:96
rheolef::fem_on_pointset_rep::evaluate
void evaluate(const geo_basic< T, M > &omega_K, const geo_element &K, const details::differentiate_option &gopt, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value) const
Definition fem_on_pointset.cc:454
rheolef::fem_on_pointset_rep::initialize
void initialize(const basis_basic< T > &fem_basis, const piola_on_pointset< T > &pops)
Definition fem_on_pointset.cc:31
rheolef::fem_on_pointset_rep::get_piola_on_pointset
const piola_on_pointset< T > & get_piola_on_pointset() const
Definition fem_on_pointset.h:55
rheolef::fem_on_pointset_rep::diff_type
details::differentiate_option::type diff_type
Definition fem_on_pointset.h:46
rheolef::fem_on_pointset_rep::_tensor_phij_xi
std::array< Eigen::Matrix< tensor_basic< T >, Eigen::Dynamic, Eigen::Dynamic >,reference_element::max_variant > _tensor_phij_xi
Definition fem_on_pointset.h:102
rheolef::fem_on_pointset_rep::evaluate_on_side
void evaluate_on_side(const geo_basic< T, M > &omega_K, const geo_element &K, const side_information_type &sid, const details::differentiate_option &gopt, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value) const
Definition fem_on_pointset.cc:466
rheolef::fem_on_pointset_rep::_vector_phij_xi
std::array< Eigen::Matrix< point_basic< T >, Eigen::Dynamic, Eigen::Dynamic >,reference_element::max_variant > _vector_phij_xi
Definition fem_on_pointset.h:99
rheolef::fem_on_pointset_rep::get_basis_on_pointset
const basis_on_pointset< T > & get_basis_on_pointset() const
Definition fem_on_pointset.h:54
rheolef::fem_on_pointset_rep::_pops
piola_on_pointset< T > _pops
Definition fem_on_pointset.h:90
rheolef::fem_on_pointset::evaluate
void evaluate(const geo_basic< T, M > &omega_K, const geo_element &K, const details::differentiate_option &gopt, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value) const
Definition fem_on_pointset.h:144
rheolef::fem_on_pointset::fem_on_pointset
fem_on_pointset()
Definition fem_on_pointset.h:163
rheolef::fem_on_pointset::diff_type
rep::diff_type diff_type
Definition fem_on_pointset.h:122
rheolef::fem_on_pointset::initialize
void initialize(const basis_basic< T > &fem_basis, const piola_on_pointset< T > &pops)
Definition fem_on_pointset.h:130
rheolef::fem_on_pointset::get_piola_on_pointset
const piola_on_pointset< T > & get_piola_on_pointset() const
Definition fem_on_pointset.h:139
rheolef::fem_on_pointset::base
smart_pointer< rep > base
Definition fem_on_pointset.h:120
rheolef::fem_on_pointset::rep
fem_on_pointset_rep< T > rep
Definition fem_on_pointset.h:119
rheolef::fem_on_pointset::size_type
rep::size_type size_type
Definition fem_on_pointset.h:121
rheolef::fem_on_pointset::evaluate_on_side
void evaluate_on_side(const geo_basic< T, M > &omega_K, const geo_element &K, const side_information_type &sid, const details::differentiate_option &gopt, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &value) const
Definition fem_on_pointset.h:153
rheolef::fem_on_pointset::get_basis_on_pointset
const basis_on_pointset< T > & get_basis_on_pointset() const
Definition fem_on_pointset.h:137
rheolef::geo_basic
generic mesh with rerefence counting
Definition geo.h:1089
rheolef::geo_element
see the geo_element page for the full documentation
Definition geo_element.h:102
rheolef::piola_on_pointset
Definition piola_on_pointset.h:142
rheolef::reference_element::max_variant
static const variant_type max_variant
Definition reference_element.h:82
rheolef::reference_element::size_type
std::vector< int >::size_type size_type
Definition reference_element.h:71
rheolef::smart_pointer_base::data
const T & data() const
Definition smart_pointer.h:266
rheolef::smart_pointer< fem_on_pointset_rep< T > >::smart_pointer
smart_pointer(T *p=0)
Definition smart_pointer.h:357
rheolef
This file is part of Rheolef.
Definition compiler_eigen.h:39
rheolef::details::differentiate_option
Definition piola.h:41
rheolef::details::differentiate_option::type
type
Definition piola.h:42
rheolef::side_information_type
Definition reference_element_face_transformation.h:37