Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
basis_fem_RTk.h
Go to the documentation of this file.
1#ifndef _RHEOLEF_BASIS_FEM_RTK_H
2#define _RHEOLEF_BASIS_FEM_RTK_H
23/*Class:sherwin
24NAME: @code{RTk} - The Raviart-Thomas vector-valued polynomial basis
25@cindex polynomial basis
26@clindex space
27@clindex basis
28SYNOPSIS:
29 space Vh(omega,"RT0");
30DESCRIPTION:
31 @noindent
32 This @code{basis} is described
33 in Raviart and Thomas (Mathematical aspects of finite element methods, Springer, 1977).
34 It is indicated in the @code{space} (see @ref{space class})
35 by a string starting with
36 the two letters @code{"RT"},
37 followed by digits indicating the polynomial order.
38
39OPTIONS:
40 This basis recognizes the equispaced/warburton node option
41 for degrees of freedom located on sides.
42 See @ref{basis_option class}.
43
44AUTHOR: Pierre.Saramito@imag.fr
45DATE: 12 september 2017
46End:
47*/
48#include "rheolef/basis.h"
49#include "rheolef/quadrature.h"
50namespace rheolef {
51
52template<class T>
53class basis_fem_RTk: public basis_rep<T> {
54public:
55
56// typedefs:
57
61 typedef typename base::valued_type valued_type;
62
63// allocators:
64
67
68// accessors:
69
70 size_type degree() const { return _b_pre_kp1.degree(); }
71 std::string family_name() const { return "RT"; }
72 size_type family_index() const { return degree()-1; }
73 bool is_nodal() const { return false; }
75 const std::string& valued() const { return space_constant::valued_name (valued_tag()); }
76
77 const Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>&
78 hat_node (reference_element hat_K) const;
79
80 const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>&
81 vdm (reference_element hat_K) const;
82
83 const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>&
84 inv_vdm (reference_element hat_K) const;
85
86// evaluation of all basis functions at hat_x:
87
88 void evaluate (
90 const point_basic<T>& hat_x,
91 Eigen::Matrix<value_type,Eigen::Dynamic,1>& value) const;
92
93 void grad_evaluate (
95 const point_basic<T>& hat_x,
96 Eigen::Matrix<tensor_basic<T>,Eigen::Dynamic,1>& value) const;
97
98// internals:
99
100 void _initialize_cstor_sizes() const;
101 void _initialize_data (reference_element hat_K) const;
102 void _compute_dofs (
103 reference_element hat_K,
104 const Eigen::Matrix<value_type,Eigen::Dynamic,1>& f_xnod,
105 Eigen::Matrix<T,Eigen::Dynamic,1>& dof) const;
106
107protected:
108
109// data:
110 // valued: initialized by _initialize_data:
112
113 mutable std::array<
114 Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>,
116
117 mutable std::array<Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>,
119
121
122 mutable std::array<
123 Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>,
125
126 mutable std::array<
127 std::array<
128 Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>
129 ,3>,
131};
132
133} // namespace rheolef
134#endif // _RHEOLEF_BASIS_FEM_RTK_H
std::array< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic >, reference_element::max_variant > _inv_vdm
std::array< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic >, reference_element::max_variant > _bar_a
std::array< std::array< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic >,3 >, reference_element::max_variant > _bkm1_node_internal_d
valued_type valued_tag() const
void grad_evaluate(reference_element hat_K, const point_basic< T > &hat_x, Eigen::Matrix< tensor_basic< T >, Eigen::Dynamic, 1 > &value) 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
point_basic< T > value_type
void evaluate(reference_element hat_K, const point_basic< T > &hat_x, Eigen::Matrix< value_type, Eigen::Dynamic, 1 > &value) const
const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & vdm(reference_element hat_K) const
std::array< Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 >, reference_element::max_variant > _hat_node
reference_element::size_type size_type
size_type degree() const
void _initialize_cstor_sizes() const
basis_raw_basic< T > _b_pre_kp1
std::array< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic >, reference_element::max_variant > _vdm
size_type family_index() const
const Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > & hat_node(reference_element hat_K) const
base::valued_type valued_type
const std::string & valued() const
std::string family_name() const
quadrature< T > _quad
const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > & inv_vdm(reference_element hat_K) const
void _initialize_data(reference_element hat_K) const
see the basis_option page for the full documentation
see the reference_element page for the full documentation
static const variant_type max_variant
std::vector< int >::size_type size_type
const std::string & valued_name(valued_type valued_tag)
This file is part of Rheolef.