Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
basis_raw_monomial.h
Go to the documentation of this file.
1#ifndef _RHEOLEF_BASIS_RAW_MONOMIAL_H
2#define _RHEOLEF_BASIS_RAW_MONOMIAL_H
23//
24// Monomial initial (raw) basis for fem construction
25//
26// author: Pierre.Saramito@imag.fr
27//
28// date: 11 september 2017
29//
30// Note: monomial basis is not the best choice for Pk FEM basis building
31// It is provided for test purpose only
32// For practical usage, choose dubiner initial basis instead.
33//
34#include "rheolef/basis_raw.h"
35#include "rheolef/ad3.h"
36namespace rheolef {
37
38template<class T>
40public:
41
42// typedefs:
43
45 typedef typename base::size_type size_type;
46 typedef T value_type;
47
48// allocators:
49
50 basis_raw_monomial (std::string name);
52
53// accessors:
54
55 std::string family_name() const { return "M"; }
56 size_type ndof (reference_element hat_K) const;
57 bool is_hierarchical() const { return true; }
58
59// evaluation of all basis functions at hat_x:
60
61 void evaluate (
63 const point_basic<T>& hat_x,
64 Eigen::Matrix<T,Eigen::Dynamic,1>& value) const;
65
66 // evaluate the gradient:
67 void grad_evaluate (
69 const point_basic<T>& hat_x,
70 Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>& value) const;
71
72protected:
73// internals:
74
75 void _initialize (reference_element hat_K) const;
76
77// data:
78
79 mutable std::array<
80 std::vector<point_basic<size_type> >,
82 mutable std::array<
83 Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>,
85 mutable std::array<
86 Eigen::Matrix<point_basic<ad3_basic<T> >,Eigen::Dynamic,1>,
88};
89
90} // namespace rheolef
91#endif // _RHEOLEF_BASIS_RAW_MONOMIAL_H
field::size_type size_type
Definition branch.cc:430
size_type ndof(reference_element hat_K) const
std::array< std::vector< point_basic< size_type > >, reference_element::max_variant > _power_index
void evaluate(reference_element hat_K, const point_basic< T > &hat_x, Eigen::Matrix< T, Eigen::Dynamic, 1 > &value) const
void grad_evaluate(reference_element hat_K, const point_basic< T > &hat_x, Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > &value) const
std::array< Eigen::Matrix< point_basic< ad3_basic< T > >, Eigen::Dynamic, 1 >, reference_element::max_variant > _hat_x_ad_pow
void _initialize(reference_element hat_K) const
std::string family_name() const
std::array< Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 >, reference_element::max_variant > _hat_x_pow
std::string name() const
Definition basis_raw.h:49
reference_element::size_type size_type
Definition basis_raw.h:38
see the reference_element page for the full documentation
static const variant_type max_variant
Expr1::float_type T
Definition field_expr.h:230
This file is part of Rheolef.