43 if ((
name.length()) > 0 && (
name[0] ==
'B')) {
45 base::_degree = atoi(
name.c_str()+1);
46 }
else if (
name.length() > 0) {
47 error_macro (
"invalid polynomial name `"<<
name<<
"' for the Bk raw polynomial set");
63 if (_factorial.size() == 0) {
64 _factorial.resize (base::_degree+1);
65 precompute_factorial (base::_degree, _factorial);
74 make_power_indexes_sorted_by_inodes (hat_K, base::_degree, _power_index[hat_K.
variant()]);
78 _lambda_pow [hat_K.
variant()].resize(base::_degree+1);
79 _lambda_ad_pow[hat_K.
variant()].resize(base::_degree+1);
87 Eigen::Matrix<T,Eigen::Dynamic,1>& value)
const
89 base::_initialize_guard (hat_K);
94 precompute_power_bernstein (hat_K,
d, hat_x, base::_degree, _lambda_pow[hat_K.
variant()]);
95 size_t loc_ndof = _power_index[hat_K.
variant()].size();
96 value.resize(loc_ndof);
97 for (
size_t loc_idof = 0; loc_idof < loc_ndof; loc_idof++) {
98 value[loc_idof] = eval_bernstein_internal (hat_K,
d, _lambda_pow[hat_K.
variant()], _factorial, _power_index[hat_K.
variant()][loc_idof], base::_degree);
108 base::_initialize_guard (hat_K);
111 precompute_power_bernstein (hat_K,
d, hat_x_ad, base::_degree, _lambda_ad_pow[hat_K.
variant()]);
112 size_t loc_ndof = _power_index[hat_K.
variant()].size();
113 value.resize(loc_ndof);
114 for (
size_t loc_idof = 0; loc_idof < loc_ndof; loc_idof++) {
115 ad3_basic<T> bx = eval_bernstein_internal (hat_K,
d, _lambda_ad_pow[hat_K.
variant()], _factorial, _power_index[hat_K.
variant()][loc_idof], base::_degree);
116 value[loc_idof] = bx.
grad();
122#define _RHEOLEF_instanciation(T) \
123template class basis_raw_bernstein<T>;
#define _RHEOLEF_instanciation(T, M, A)
see the Float page for the full documentation
const point_basic< T > & grad() const
base::size_type size_type
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
basis_raw_bernstein(std::string name)
size_type ndof(reference_element hat_K) const
void _initialize(reference_element hat_K) const
see the reference_element page for the full documentation
size_type dimension() const
variant_type variant() const
static size_type n_node(variant_type variant, size_type order)
#define error_macro(message)
This file is part of Rheolef.