Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
basis_fem_trace_n.h
Go to the documentation of this file.
1#ifndef _RHEOLEF_BASIS_FEM_TRACE_N_H
2#define _RHEOLEF_BASIS_FEM_TRACE_N_H
23/*Class:sherwin
24NAME: @code{trace_n(RTkd)} - normal trace of a basis on element boundaries
25@cindex polynomial basis
26@clindex space
27@clindex basis
28@clindex reference_element
29SYNOPSIS:
30 space Mh (omega,"trace_n(RT1d)");
31DESCRIPTION:
32 @noindent
33 This polynomial @code{basis} is used by the postprocessing stage of the
34 hybrid high order (HHO) finite element method.
35 It is indicated in the @code{space} (see @ref{space class}) by
36 inserting the "trace_n(.)" operator around
37 an H(div) element characterisation, e.g. Raviart-Thomas
38 (see @ref{basis class}).
39
40AUTHOR: Pierre.Saramito@imag.fr
41DATE: 23 march 2020
42End:
43*/
44#include "rheolef/basis.h"
45namespace rheolef {
46
47template<class T>
48class basis_fem_trace_n: public basis_rep<T> {
49public:
50
51// typedefs:
52
55 typedef T value_type;
56
57// allocators:
58
61
62// accessors:
63
64 std::string family_name() const { return _vec_basis.family_name(); }
65 size_type family_index() const { return _vec_basis.family_index(); }
66 size_type degree() const { return _vec_basis.family_index(); }
67 bool is_nodal() const { return _tr_n_basis.is_nodal(); }
68 const Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>&
69 hat_node (reference_element hat_K) const;
70
73 const side_information_type& sid) const;
77 Eigen::Matrix<size_type,Eigen::Dynamic,1>& loc_idof) const;
78
79// evaluation of all basis functions at hat_x:
80
81 void evaluate_on_side (
84 const point_basic<T>& hat_x,
85 Eigen::Matrix<T,Eigen::Dynamic,1>& value) const;
86
87// internals:
88
89 // accessors to subgeo ndof & nnod by dimension (not available for basis_trace_n)
90 virtual size_type first_sid_inod (reference_element hat_K, size_type loc_isid) const {
91 return _first_sid_inod [hat_K.variant()][loc_isid];
92 }
93 virtual size_type first_sid_idof (reference_element hat_K, size_type loc_isid) const {
94 return _first_sid_idof [hat_K.variant()][loc_isid];
95 }
96 void _initialize_cstor_sizes() const;
97 void _initialize_data (reference_element hat_K) const;
98 void _compute_dofs (
99 reference_element hat_K,
100 const Eigen::Matrix<T,Eigen::Dynamic,1>& f_xnod, // scalar-valued case
101 Eigen::Matrix<T,Eigen::Dynamic,1>& dof) const;
102
103 // overload visualization:
104 virtual void put_scalar_valued (std::ostream& os, reference_element hat_K) const;
105
106protected:
107// data:
110
111 mutable std::array<
112 Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>,
114
115 // nodes and dofs are organized by side=0..6 of subgeos, for each hat_K:
116 mutable std::array<
117 std::array<size_type,reference_element::max_side_by_variant+1>,
120
121 // working array:
122 mutable Eigen::Matrix<T,Eigen::Dynamic,1> _sid_value;
123};
124
125} // namespace rheolef
126#endif // _RHEOLEF_BASIS_FEM_TRACE_N_H
field::size_type size_type
Definition branch.cc:430
size_type local_ndof_on_side(reference_element hat_K, const side_information_type &sid) const
std::array< std::array< size_type, reference_element::max_side_by_variant+1 >, reference_element::max_variant > _first_sid_idof
void evaluate_on_side(reference_element hat_K, const side_information_type &sid, const point_basic< T > &hat_x, Eigen::Matrix< T, Eigen::Dynamic, 1 > &value) const
std::array< Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 >, reference_element::max_variant > _hat_node
reference_element::size_type size_type
void local_idof_on_side(reference_element hat_K, const side_information_type &sid, Eigen::Matrix< size_type, Eigen::Dynamic, 1 > &loc_idof) const
Eigen::Matrix< T, Eigen::Dynamic, 1 > _sid_value
std::array< std::array< size_type, reference_element::max_side_by_variant+1 >, reference_element::max_variant > _first_sid_inod
virtual size_type first_sid_inod(reference_element hat_K, size_type loc_isid) const
virtual void put_scalar_valued(std::ostream &os, reference_element hat_K) const
void _compute_dofs(reference_element hat_K, const Eigen::Matrix< T, Eigen::Dynamic, 1 > &f_xnod, Eigen::Matrix< T, Eigen::Dynamic, 1 > &dof) const
virtual size_type first_sid_idof(reference_element hat_K, size_type loc_isid) const
const Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > & hat_node(reference_element hat_K) const
std::string family_name() const
void _initialize_data(reference_element hat_K) const
see the reference_element page for the full documentation
static const variant_type max_variant
variant_type variant() const
std::vector< int >::size_type size_type
Expr1::float_type T
Definition field_expr.h:230
This file is part of Rheolef.