Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
basis_fem_tensor.h
Go to the documentation of this file.
1#ifndef _RHEOLEF_BASIS_FEM_TENSOR_H
2#define _RHEOLEF_BASIS_FEM_TENSOR_H
23/*Class:sherwin
24NAME: @code{tensor(X)} - symmetric tensor-valued basis
25@cindex polynomial basis
26@clindex space
27@clindex basis
28@clindex reference_element
29SYNOPSIS:
30 space Mh (omega,"P1","tensor");
31DESCRIPTION:
32 @noindent
33 This polynomial @code{basis} is used for symmetric tensor-valued basis
34 when all components are approcimated by the same scalar-valued basis.
35AUTHOR: Pierre.Saramito@imag.fr
36DATE: 25 january 2019
37End:
38*/
39#include "rheolef/basis.h"
40namespace rheolef {
41
42template<class T>
43class basis_fem_tensor: public basis_rep<T> {
44public:
45
46// typedefs:
47
49 typedef typename base::size_type size_type;
52
53// allocators:
54
57
58// accessors:
59
60 std::string family_name() const { return _scalar_basis.family_name(); }
61 size_type family_index() const { return _scalar_basis.family_index(); }
62 size_type degree() const { return _scalar_basis.degree(); }
64 bool is_hierarchical() const { return true; }
65 size_type size() const { return _n_comp; }
67 bool is_continuous() const { return _scalar_basis.is_continuous(); }
68 bool have_index_parameter() const { return _scalar_basis.have_index_parameter(); }
69 bool have_continuous_feature() const { return _scalar_basis.have_continuous_feature(); }
70 bool is_nodal() const { return _scalar_basis.is_nodal(); }
71 bool have_compact_support_inside_element() const { return _scalar_basis.have_compact_support_inside_element(); }
72
73 const Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>&
74 hat_node (reference_element hat_K) const;
75
76 // evaluation of all basis functions at hat_x:
77 void evaluate (
79 const point_basic<T>& hat_x,
80 Eigen::Matrix<tensor_basic<T>,Eigen::Dynamic,1>& value) const;
81
82 void grad_evaluate (
84 const point_basic<T>& hat_x,
85 Eigen::Matrix<tensor3_basic<T>,Eigen::Dynamic,1>& value) const;
86
87 // dofs for a tensor-valued function
88 void _compute_dofs (
90 const Eigen::Matrix<tensor_basic<T>,Eigen::Dynamic,1>& f_xnod,
91 Eigen::Matrix<T,Eigen::Dynamic,1>& dof) const;
92
93// internals:
94
95 void _initialize_cstor_sizes() const;
96 void _initialize_data (reference_element hat_K) const;
97
98protected:
99// data:
102
103// working area:
104 mutable Eigen::Matrix<T,Eigen::Dynamic,1> _scalar_value;
105 mutable Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1> _vector_value;
106};
107
108} // namespace rheolef
109#endif // _RHEOLEF_BASIS_FEM_TENSOR_H
bool have_compact_support_inside_element() const
void _compute_dofs(reference_element hat_K, const Eigen::Matrix< tensor_basic< T >, Eigen::Dynamic, 1 > &f_xnod, Eigen::Matrix< T, Eigen::Dynamic, 1 > &dof) const
valued_type valued_tag() const
space_constant::valued_type valued_type
Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > _vector_value
Eigen::Matrix< T, Eigen::Dynamic, 1 > _scalar_value
tensor_basic< T > value_type
void grad_evaluate(reference_element hat_K, const point_basic< T > &hat_x, Eigen::Matrix< tensor3_basic< T >, Eigen::Dynamic, 1 > &value) const
void evaluate(reference_element hat_K, const point_basic< T > &hat_x, Eigen::Matrix< tensor_basic< T >, Eigen::Dynamic, 1 > &value) const
size_type family_index() const
const Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > & hat_node(reference_element hat_K) const
const basis_basic< T > & operator[](size_type i_comp) const
std::string family_name() const
void _initialize_data(reference_element hat_K) const
see the basis_option page for the full documentation
reference_element::size_type size_type
Definition basis.h:214
see the reference_element page for the full documentation
This file is part of Rheolef.