basis_fem_RTk.h
Go to the documentation of this file.
#ifndef _RHEOLEF_BASIS_FEM_RTK_H
#define _RHEOLEF_BASIS_FEM_RTK_H
/*Class:sherwin
NAME: @code{RTk} - The Raviart-Thomas vector-valued polynomial basis
@cindex polynomial basis
@clindex space
@clindex basis
SYNOPSIS:
space Vh(omega,"RT0");
DESCRIPTION:
@noindent
This @code{basis} is described
in Raviart and Thomas (Mathematical aspects of finite element methods, Springer, 1977).
It is indicated in the @code{space} (see @ref{space class})
by a string starting with
the two letters @code{"RT"},
followed by digits indicating the polynomial order.
OPTIONS:
This basis recognizes the equispaced/warburton node option
for degrees of freedom located on sides.
See @ref{basis_option class}.
AUTHOR: Pierre.Saramito@imag.fr
DATE: 12 september 2017
End:
*/
#include "rheolef/basis.h"
#include "rheolef/quadrature.h"
namespace rheolef {
template<class T>
class basis_fem_RTk: public basis_rep<T> {
public:
// typedefs:
typedef basis_rep<T> base;
typedef reference_element::size_type size_type;
typedef point_basic<T> value_type;
typedef typename base::valued_type valued_type;
// allocators:
basis_fem_RTk (size_type k, const basis_option& sopt);
~basis_fem_RTk();
// accessors:
size_type degree() const { return _b_pre_kp1.degree(); }
std::string family_name() const { return "RT"; }
size_type family_index() const { return degree()-1; }
bool is_nodal() const { return false; }
valued_type valued_tag() const { return space_constant::vector; }
const std::string& valued() const { return space_constant::valued_name (valued_tag()); }
const Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>&
hat_node (reference_element hat_K) const;
const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>&
vdm (reference_element hat_K) const;
const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>&
inv_vdm (reference_element hat_K) const;
// evaluation of all basis functions at hat_x:
void evaluate (
reference_element hat_K,
const point_basic<T>& hat_x,
Eigen::Matrix<value_type,Eigen::Dynamic,1>& value) const;
void grad_evaluate (
reference_element hat_K,
const point_basic<T>& hat_x,
Eigen::Matrix<tensor_basic<T>,Eigen::Dynamic,1>& value) const;
// internals:
void _initialize_cstor_sizes() const;
void _initialize_data (reference_element hat_K) const;
void _compute_dofs (
reference_element hat_K,
const Eigen::Matrix<value_type,Eigen::Dynamic,1>& f_xnod,
Eigen::Matrix<T,Eigen::Dynamic,1>& dof) const;
protected:
// data:
// 1) numbering: initialized by _initialize_cstor_sizes, used by initialize_data:
// nodes are organized by variant and dimension=0..3 of subgeos, for each hat_K
// in the discontinous case, this distinction remains:
mutable std::array<
std::array<
size_type
,reference_element::max_variant>
,4> _nnod_on_subgeo_remainder;
// 2) valued: initialized by _initialize_data:
basis_raw_basic<T> _b_pre_kp1;
mutable std::array<
Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>,
reference_element::max_variant> _hat_node;
mutable std::array<Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>,
reference_element::max_variant> _vdm, _inv_vdm;
mutable quadrature<T> _quad;
mutable std::array<
Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>,
reference_element::max_variant> _bar_a;
mutable std::array<
std::array<
Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>
,3>,
reference_element::max_variant> _bkm1_node_internal_d;
};
} // namespace rheolef
#endif // _RHEOLEF_BASIS_FEM_RTK_H
rheolef::basis_fem_RTk::is_nodal
bool is_nodal() const
Definition: basis_fem_RTk.h:73
rheolef::basis_fem_RTk
Definition: basis_fem_RTk.h:53
rheolef::point_basic
Definition: point.h:87
rheolef::basis_fem_RTk::degree
size_type degree() const
Definition: basis_fem_RTk.h:70
rheolef::basis_fem_RTk::_quad
quadrature< T > _quad
Definition: basis_fem_RTk.h:129
rheolef::basis_fem_RTk::_initialize_cstor_sizes
void _initialize_cstor_sizes() const
Definition: basis_fem_RTk.cc:92
rheolef::basis_raw_basic
Definition: basis_raw.h:107
rheolef::value
rheolef::std value
rheolef::tensor_basic
Definition: tensor.h:90
rheolef::basis_fem_RTk::valued_type
base::valued_type valued_type
Definition: basis_fem_RTk.h:61
rheolef::space_constant::valued_type
valued_type
Definition: space_constant.h:135
rheolef::basis_fem_RTk::_nnod_on_subgeo_remainder
std::array< std::array< size_type,reference_element::max_variant >,4 > _nnod_on_subgeo_remainder
Definition: basis_fem_RTk.h:117
rheolef::basis_option
see the basis_option page for the full documentation
Definition: basis_option.h:93
rheolef::basis_fem_RTk::_bar_a
std::array< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic >, reference_element::max_variant > _bar_a
Definition: basis_fem_RTk.h:133
rheolef::reference_element
see the reference_element page for the full documentation
Definition: reference_element.h:66
rheolef::basis_fem_RTk::family_index
size_type family_index() const
Definition: basis_fem_RTk.h:72
rheolef::basis_fem_RTk::grad_evaluate
void grad_evaluate(reference_element hat_K, const point_basic< T > &hat_x, Eigen::Matrix< tensor_basic< T >, Eigen::Dynamic, 1 > &value) const
Definition: basis_fem_RTk.cc:603
rheolef::basis_fem_RTk::evaluate
void evaluate(reference_element hat_K, const point_basic< T > &hat_x, Eigen::Matrix< value_type, Eigen::Dynamic, 1 > &value) const
Definition: basis_fem_RTk.cc:566
rheolef::basis_fem_RTk::valued
const std::string & valued() const
Definition: basis_fem_RTk.h:75
rheolef::basis_fem_RTk::_vdm
std::array< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic >, reference_element::max_variant > _vdm
Definition: basis_fem_RTk.h:127
rheolef::basis_fem_RTk::_inv_vdm
std::array< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic >, reference_element::max_variant > _inv_vdm
Definition: basis_fem_RTk.h:127
rheolef::basis_fem_RTk::hat_node
const Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > & hat_node(reference_element hat_K) const
Definition: basis_fem_RTk.cc:71
rheolef::basis_fem_RTk::size_type
reference_element::size_type size_type
Definition: basis_fem_RTk.h:59
rheolef::basis_fem_RTk::_initialize_data
void _initialize_data(reference_element hat_K) const
Definition: basis_fem_RTk.cc:144
rheolef::basis_fem_RTk::inv_vdm
const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & inv_vdm(reference_element hat_K) const
Definition: basis_fem_RTk.cc:85
rheolef::space_constant::valued_name
const std::string & valued_name(valued_type valued_tag)
Definition: space_constant.cc:43
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
rheolef::reference_element::max_variant
static const variant_type max_variant
Definition: reference_element.h:82
rheolef::basis_fem_RTk::_compute_dofs
void _compute_dofs(reference_element hat_K, const Eigen::Matrix< value_type, Eigen::Dynamic, 1 > &f_xnod, Eigen::Matrix< T, Eigen::Dynamic, 1 > &dof) const
Definition: basis_fem_RTk.cc:655
rheolef::basis_fem_RTk::vdm
const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & vdm(reference_element hat_K) const
Definition: basis_fem_RTk.cc:78
rheolef::space_constant::vector
@ vector
Definition: space_constant.h:137
rheolef::basis_fem_RTk::basis_fem_RTk
basis_fem_RTk(size_type k, const basis_option &sopt)
Definition: basis_fem_RTk.cc:43
rheolef::basis_fem_RTk::value_type
point_basic< T > value_type
Definition: basis_fem_RTk.h:60
rheolef::basis_fem_RTk::_bkm1_node_internal_d
std::array< std::array< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic >,3 >, reference_element::max_variant > _bkm1_node_internal_d
Definition: basis_fem_RTk.h:139
rheolef::basis_fem_RTk::base
basis_rep< T > base
Definition: basis_fem_RTk.h:58
rheolef::reference_element::size_type
std::vector< int >::size_type size_type
Definition: reference_element.h:71
rheolef::quadrature
Definition: quadrature.h:185
rheolef::basis_fem_RTk::~basis_fem_RTk
~basis_fem_RTk()
Definition: basis_fem_RTk.cc:39
rheolef::basis_fem_RTk::_hat_node
std::array< Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 >, reference_element::max_variant > _hat_node
Definition: basis_fem_RTk.h:124
rheolef::basis_fem_RTk::_b_pre_kp1
basis_raw_basic< T > _b_pre_kp1
Definition: basis_fem_RTk.h:120
rheolef::basis_fem_RTk::family_name
std::string family_name() const
Definition: basis_fem_RTk.h:71
rheolef::basis_fem_RTk::valued_tag
valued_type valued_tag() const
Definition: basis_fem_RTk.h:74
rheolef::basis_rep
Definition: basis.h:209