Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
basis_raw_bernstein.h
Go to the documentation of this file.
1#ifndef _RHEOLEF_BASIS_RAW_BERNSTEIN_H
2#define _RHEOLEF_BASIS_RAW_BERNSTEIN_H
23//
24// Bernstein initial (raw) basis for fem construction
25//
26// author: Pierre.Saramito@imag.fr
27//
28// date: 11 september 2017
29//
30#include "rheolef/basis_raw.h"
31#include "rheolef/ad3.h"
32namespace rheolef {
33
34template<class T>
36public:
37
38// typedefs:
39
41 typedef typename base::size_type size_type;
42 typedef T value_type;
43
44// allocators:
45
46 basis_raw_bernstein (std::string name);
48
49// accessors:
50
51 std::string family_name() const { return "B"; }
52 size_type ndof (reference_element hat_K) const;
53 bool is_hierarchical() const { return false; }
54
55// evaluation of all basis functions at hat_x:
56
57 void evaluate (
59 const point_basic<T>& hat_x,
60 Eigen::Matrix<T,Eigen::Dynamic,1>& value) const;
61
62 // evaluate the gradient:
63 void grad_evaluate (
65 const point_basic<T>& hat_x,
66 Eigen::Matrix<point_basic<T>,Eigen::Dynamic,1>& value) const;
67
68protected:
69// internals:
70
71 void _initialize (reference_element hat_K) const;
72
73// data:
74
75 mutable std::vector<T> _factorial;
76 mutable std::array<std::vector<point_basic<size_type> >,
78 mutable std::array<std::vector<std::array<T,6> >,
80 mutable std::array<std::vector<std::array<ad3_basic<T>,6> >,
82};
83
84} // namespace rheolef
85#endif // _RHEOLEF_BASIS_RAW_BERNSTEIN_H
field::size_type size_type
Definition branch.cc:430
void evaluate(reference_element hat_K, const point_basic< T > &hat_x, Eigen::Matrix< T, Eigen::Dynamic, 1 > &value) const
std::array< std::vector< std::array< ad3_basic< T >, 6 > >, reference_element::max_variant > _lambda_ad_pow
std::array< std::vector< std::array< T, 6 > >, reference_element::max_variant > _lambda_pow
void grad_evaluate(reference_element hat_K, const point_basic< T > &hat_x, Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > &value) const
size_type ndof(reference_element hat_K) const
std::array< std::vector< point_basic< size_type > >, reference_element::max_variant > _power_index
void _initialize(reference_element hat_K) const
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.