/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/common/tuples.hh Source File#
|
DiFfRG
|
tuples.hh
Go to the documentation of this file.
128 template <size_t idx, typename tuple_type, typename strSet> constexpr auto &get(named_tuple<tuple_type, strSet> &ob)
132 template <size_t idx, typename tuple_type, typename strSet> constexpr auto &get(named_tuple<tuple_type, strSet> &&ob)
204 template <uint n, typename NT, typename Vector> std::array<NT, n> vector_to_array(const Vector &v)
223 template <typename Head, typename... Tail> constexpr auto tuple_tail(const std::tuple<Head, Tail...> &t)
228 template <typename tuple_type, typename strSet> constexpr auto tuple_tail(const named_tuple<tuple_type, strSet> &t)
233 template <int i, typename Head, typename... Tail> constexpr auto tuple_last(const std::tuple<Head, Tail...> &t)
238 return std::apply([](auto & /*head*/, auto &...tail) { return tuple_last<i>(std::tie(tail...)); }, t);
247 template <int i, typename Head, typename... Tail> constexpr auto tuple_first(const std::tuple<Head, Tail...> &t)
283 template <typename T_inner, typename Model, size_t... IDXs> auto _jacobian_tuple(std::index_sequence<IDXs...>)
290 return _jacobian_tuple<T_inner, Model>(std::make_index_sequence<Model::Components::count_fe_subsystems()>{});
293 template <typename T_inner, typename Model, size_t... IDXs> auto _jacobian_2_tuple(std::index_sequence<IDXs...>)
296 SimpleMatrix<T_inner, Model::Components::count_fe_functions(0), Model::Components::count_fe_functions(IDXs)>,
301 return _jacobian_2_tuple<T_inner, Model>(std::make_index_sequence<Model::Components::count_fe_subsystems()>{});
A simple NxM-matrix class, which is used for cell-wise Jacobians.
Definition tuples.hh:156
const NT & operator()(const uint n, const uint m) const
Access the matrix entry at (n,m).
Definition tuples.hh:168
NT & operator()(const uint n, const uint m)
Access the matrix entry at (n,m).
Definition tuples.hh:163
void print() const
Print the matrix to the console.
Definition tuples.hh:191
Definition complex_math.hh:10
constexpr auto tuple_tail(const std::tuple< Head, Tail... > &t)
Definition tuples.hh:223
constexpr auto tuple_first(const std::tuple< Head, Tail... > &t)
Definition tuples.hh:247
auto _jacobian_2_tuple(std::index_sequence< IDXs... >)
Definition tuples.hh:293
auto local_sol_q(const std::array< T, N > &a, uint q_index)
Definition tuples.hh:278
auto vector_to_tuple_helper(const std::vector< T > &v, std::index_sequence< Indices... >)
Definition tuples.hh:213
auto _local_sol_tuple(const std::array< T, N > &a, std::index_sequence< IDXs... >, uint q_index)
Definition tuples.hh:274
consteval bool strings_equal(FixedString< N1 > s1, FixedString< N2 > s2)
Definition fixed_string.hh:49
constexpr auto & get(named_tuple< tuple_type, strSet > &ob)
get a reference to the element with the given name
Definition tuples.hh:111
constexpr auto tuple_last(const std::tuple< Head, Tail... > &t)
Definition tuples.hh:233
Definition tuples.hh:34
static constexpr std::array< const char *, size > names
Definition tuples.hh:36
A class to store a tuple with elements that can be accessed by name. The names are stored as FixedStr...
Definition tuples.hh:56
static consteval size_t get_idx(const char *name)
Definition tuples.hh:88
Generated by