21#include "rheolef/basis.h"
22#include "rheolef/basis_get.h"
32is_family_no_index (
const std::string& family_name)
37 if (family_name ==
"bubble")
return true;
38 if (family_name ==
"P1qd")
return true;
39 if (family_name ==
"empty")
return true;
45 std::string family_name,
49 string opt_d = (sopt.
is_continuous() || (family_name ==
"P" && index == 0)) ?
"" :
"d";
50 string basename = is_family_no_index (family_name) ? family_name : family_name + std::to_string(index) + opt_d;
51 string name_opt = basename + sopt.
stamp();
53 trace_macro(
"standard_naming("<<family_name<<
","<<index<<
",opts)=\""<<name_opt<<
"\"");
57 return "trace_n(" + name_opt +
")";
61 const size_type unset = std::numeric_limits<basis_option::size_type>::max();
62 string opt_dim = (sopt.
dimension() == unset) ?
"" :
"d=" + std::to_string(sopt.
dimension());
65 string coma = (opt_dim ==
"" || opt_sc ==
"") ?
"" :
",";
66 string opt_valued = (opt_dim ==
"" && opt_sc ==
"") ?
"" :
"[" + opt_dim + coma + opt_sc +
"]";
67 string braced_name = sopt.
valued() + opt_valued +
"(" + name_opt +
")";
71 return "trace_n(" + braced_name +
")";
96 std::string fname = family_name();
111 _have_initialize_data(),
112 _ndof_on_subgeo_internal(),
114 _nnod_on_subgeo_internal(),
116 _first_idof_by_dimension_internal(),
117 _first_idof_by_dimension(),
118 _first_inod_by_dimension_internal(),
119 _first_inod_by_dimension()
127 _have_initialize_data.fill (
false);
133 if (_have_initialize_data [hat_K.
variant()])
return;
134 _have_initialize_data [hat_K.
variant()] =
true;
135 _initialize_data (hat_K);
150 ,4>& nxxx_on_subgeo_internal,
158 nxxx_on_subgeo = nxxx_on_subgeo_internal;
161 for (
size_type map_dim = 0; map_dim < 4; ++map_dim) {
162 nxxx_on_subgeo [map_dim].fill (0);
176 sum += n_subgeo*nxxx_on_subgeo_internal [map_dim][subgeo_variant];
178 nxxx_on_subgeo [map_dim][variant] = sum;
202 first_ixxx_by_dimension [variant].fill(0);
203 for (
size_type subgeo_dim = 0; subgeo_dim <= map_dim; ++subgeo_dim) {
204 size_type sum = first_ixxx_by_dimension [variant][subgeo_dim];
210 sum += n_subgeo*nxxx_on_subgeo [map_dim][subgeo_variant];
212 first_ixxx_by_dimension [variant][subgeo_dim+1] = sum;
219#define _RHEOLEF_instanciation(T) \
220template class basis_rep<T>; \
221template void basis_basic<T>::reset (std::string&); \
222template void basis_basic<T>::reset_family_index (size_type); \
#define _RHEOLEF_instanciation(T, M, A)
see the Float page for the full documentation
void reset_family_index(size_type k)
void reset(std::string &name)
see the basis_option page for the full documentation
bool is_continuous() const
coordinate_type coordinate_system() const
size_type dimension() const
std::string stamp() const
valued_type valued_tag() const
const std::string & valued() const
basis_rep(const basis_option &sopt)
static void _helper_make_discontinuous_ndof_on_subgeo(bool is_continuous, const std::array< std::array< size_type, reference_element::max_variant >, 4 > &nxxx_on_subgeo_internal, std::array< std::array< size_type, reference_element::max_variant >, 4 > &nxxx_on_subgeo)
reference_element::size_type size_type
void _initialize_data_guard(reference_element hat_K) const
static std::string standard_naming(std::string family_name, size_t degree, const basis_option &sopt)
static void _helper_initialize_first_ixxx_by_dimension_from_nxxx_on_subgeo(const std::array< std::array< size_type, reference_element::max_variant >, 4 > &_nxxx_on_subgeo, std::array< std::array< size_type, 5 >, reference_element::max_variant > &_first_ixxx_by_dimension)
see the persistent_table page for the full documentation
see the reference_element page for the full documentation
static const variant_type max_variant
static variant_type last_variant_by_dimension(size_type dim)
size_type dimension() const
static variant_type first_variant_by_dimension(size_type dim)
size_type n_subgeo_by_variant(size_type subgeo_variant) const
variant_type variant() const
#define trace_macro(message)
std::string coordinate_system_name(coordinate_type i)
This file is part of Rheolef.
void basis_parse_from_string(const std::string &str, family_index_option_type &fio)
void load(idiststream &in, Float &p, field &uh)