42 if ((
name.length()) > 0 && (
name[0] ==
'M')) {
44 base::_degree = atoi(
name.c_str()+1);
45 }
else if (
name.length() > 0) {
46 error_macro (
"invalid polynomial name `"<<
name<<
"' for the Mk polynomial set");
51trace_macro (
"basis_raw_monomial: name()="<<base::name());
68 make_power_indexes_sorted_by_degrees (hat_K, base::_degree, _power_index[hat_K.
variant()]);
72 _hat_x_pow [hat_K.
variant()].resize (base::_degree+1);
73 _hat_x_ad_pow[hat_K.
variant()].resize (base::_degree+1);
81 Eigen::Matrix<T,Eigen::Dynamic,1>& value)
const
83trace_macro (
"basis_raw_monomial: evaluate (name="<<base::name()<<
")...");
84 base::_initialize_guard (hat_K);
89 precompute_power_monomial (hat_K,
d, hat_x, base::_degree, _hat_x_pow[hat_K.
variant()]);
90 size_t loc_ndof = _power_index[hat_K.
variant()].size();
91 value.resize(loc_ndof);
92 for (
size_t loc_idof = 0; loc_idof < loc_ndof; loc_idof++) {
93 value[loc_idof] = eval_monomial_internal (hat_K,
d, _hat_x_pow[hat_K.
variant()], _power_index[hat_K.
variant()][loc_idof]);
95trace_macro (
"basis_raw_monomial: evaluate (name="<<base::name()<<
") done");
104 base::_initialize_guard (hat_K);
107 precompute_power_monomial (hat_K,
d, hat_x_ad, base::_degree, _hat_x_ad_pow[hat_K.
variant()]);
108 size_t loc_ndof = _power_index[hat_K.
variant()].size();
109 value.resize(loc_ndof);
110 for (
size_t loc_idof = 0; loc_idof < loc_ndof; loc_idof++) {
112 value[loc_idof] = bx.
grad();
118#define _RHEOLEF_instanciation(T) \
119template class basis_raw_monomial<T>;
#define _RHEOLEF_instanciation(T, M, A)
see the Float page for the full documentation
const point_basic< T > & grad() const
size_type ndof(reference_element hat_K) 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_monomial(std::string name)
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 trace_macro(message)
#define error_macro(message)
This file is part of Rheolef.