Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
basis_fem_empty.h
Go to the documentation of this file.
1#ifndef _RHEOLEF_BASIS_FEM_EMPTY_H
2#define _RHEOLEF_BASIS_FEM_EMPTY_H
23/*Class:sherwin
24NAME: @code{empty} - the empty finite element
25@cindex polynomial basis
26@clindex space
27@clindex basis
28@clindex reference_element
29SYNOPSIS:
30 space Zh (omega,"empty");
31DESCRIPTION:
32 @noindent
33 This polynomial @code{basis} is used when an empty
34 finite element set should be declared.
35 This could be useful when product of space
36 are considered and a special empty set is required, e.g.:
37 @example
38 string approx = (k > 0) ? "P"+std::to_string(k-1)+"d" : "empty";
39 space Xh (omega, approx);
40 @end example
41 In this example, it represents the "P_{-1}" polynomial
42 space that is empty by convention.
43AUTHOR: Pierre.Saramito@imag.fr
44DATE: 2 january 2019
45End:
46*/
47#include "rheolef/basis.h"
48namespace rheolef {
49
50template<class T>
51class basis_fem_empty: public basis_rep<T> {
52public:
54 typedef typename base::size_type size_type;
57 std::string name() const { return family_name(); }
58 bool have_index_parameter() const { return false; }
59 std::string family_name() const { return "empty"; }
60 size_type degree () const { return 0; }
61 bool have_compact_support_inside_element() const { return true; }
62 bool is_nodal() const { return true; }
63 void evaluate (
65 const point_basic<T>& hat_x,
66 Eigen::Matrix<T,Eigen::Dynamic,1>& values) const;
67 void grad_evaluate (
69 const point_basic<T>& hat_x,
70 Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>& values) const;
71 void _compute_dofs (
73 const Eigen::Matrix<T,Eigen::Dynamic,1>& f_xnod,
74 Eigen::Matrix<T,Eigen::Dynamic,1>& dof) const;
75 void _initialize_cstor_sizes() const;
76 void _initialize_data (reference_element hat_K) const;
77 const Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>& hat_node(reference_element hat_K) const {
78 base::_initialize_data_guard(hat_K);
79 return _dummy_hat_node;
80 }
81protected:
82 static const Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1> _dummy_hat_node;
83};
84
85} // namespace rheolef
86#endif // _RHEOLEF_BASIS_FEM_EMPTY_H
std::string name() const
bool have_compact_support_inside_element() const
size_type degree() const
void _initialize_cstor_sizes() const
static const Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > _dummy_hat_node
void _compute_dofs(reference_element hat_K, const Eigen::Matrix< T, Eigen::Dynamic, 1 > &f_xnod, Eigen::Matrix< T, Eigen::Dynamic, 1 > &dof) const
const Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > & hat_node(reference_element hat_K) const
void evaluate(reference_element hat_K, const point_basic< T > &hat_x, Eigen::Matrix< T, Eigen::Dynamic, 1 > &values) const
std::string family_name() const
bool have_index_parameter() const
void grad_evaluate(reference_element hat_K, const point_basic< T > &hat_x, Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > &values) const
void _initialize_data(reference_element hat_K) const
see the reference_element page for the full documentation
This file is part of Rheolef.