24 #include "rheolef/rheostream.h"
74 base::is_continuous(),
75 base::_ndof_on_subgeo,
76 base::_nnod_on_subgeo,
77 base::_first_idof_by_dimension,
78 base::_first_inod_by_dimension);
91 switch (base::_sopt.get_node()) {
97 default:
error_macro (
"unsupported node set: "<<base::_sopt.get_node_name());
102 "unisolvence failed for " <<
base::name() <<
"(" << hat_K.
name() <<
") basis");
111 Eigen::Matrix<T,Eigen::Dynamic,1>&
value)
const
113 base::_initialize_data_guard (hat_K);
115 Eigen::Matrix<T,Eigen::Dynamic,1> _work0, _work1, _work2;
117 eval_sherwin_basis (hat_x, hat_K, degree(), _alpha, _beta, _work0, _work1, _work2,
value);
127 base::_initialize_data_guard (hat_K);
130 std::vector<ad3_basic<T> > _work0_ad, _work1_ad, _work2_ad;
131 std::array<std::vector<ad3_basic<T> >,
134 std::vector<ad3_basic<T> >& value_ad = _value_ad [hat_K.
variant()];
136 eval_sherwin_basis (hat_x_ad, hat_K, degree(), _alpha, _beta, _work0_ad, _work1_ad, _work2_ad, value_ad);
137 size_t loc_ndof = value_ad.size();
138 value.resize(loc_ndof);
139 for (
size_t loc_idof = 0; loc_idof < loc_ndof; loc_idof++) {
140 value[loc_idof] = value_ad[loc_idof].grad();
148 const Eigen::Matrix<T,Eigen::Dynamic,1>& f_xnod,
149 Eigen::Matrix<T,Eigen::Dynamic,1>& dof)
const
153 base::_initialize_data_guard (hat_K);
154 dof = base::_inv_vdm[hat_K.
variant()]*f_xnod;
160 #define _RHEOLEF_instanciation(T) \
161 template class basis_fem_Pk_sherwin<T>;
see the Float page for the full documentation
static void initialize_local_first(size_type k, bool is_continuous, std::array< std::array< size_type, reference_element::max_variant >, 4 > &ndof_on_subgeo, std::array< std::array< size_type, reference_element::max_variant >, 4 > &nnod_on_subgeo, std::array< std::array< size_type, 5 >, reference_element::max_variant > &first_idof_by_dimension, std::array< std::array< size_type, 5 >, reference_element::max_variant > &first_inod_by_dimension)
basis_fem_Pk_sherwin(size_type degree, const basis_option &sopt)
void _initialize_cstor_sizes() const
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
void _compute_dofs(reference_element hat_K, const Eigen::Matrix< T, Eigen::Dynamic, 1 > &f_xnod, Eigen::Matrix< T, Eigen::Dynamic, 1 > &dof) const
std::string family_name() const
void _initialize_data(reference_element hat_K) const
see the basis_option page for the full documentation
reference_element::size_type size_type
piola_fem< T > _piola_fem
static std::string standard_naming(std::string family_name, size_t degree, const basis_option &sopt)
see the reference_element page for the full documentation
static const variant_type max_variant
variant_type variant() const
#define error_macro(message)
#define fatal_macro(message)
#define warning_macro(message)
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
void basis_on_pointset_evaluate(const Basis &b, const reference_element &hat_K, const Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > &hat_x, Eigen::Matrix< Value, Eigen::Dynamic, Eigen::Dynamic > &vdm)
This file is part of Rheolef.
void pointset_lagrange_equispaced(reference_element hat_K, size_t order_in, Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > &hat_xnod, size_t internal=0)
void pointset_lagrange_warburton(reference_element hat_K, size_t degree, Eigen::Matrix< point_basic< T >, Eigen::Dynamic, 1 > &hat_xnod, bool map_on_reference_element=true)
_RHEOLEF_instanciation(Float, sequential, std::allocator< Float >) _RHEOLEF_instanciation(Float
void invert(tiny_matrix< T > &a, tiny_matrix< T > &inv_a)