24#ifndef DUMUX_COMMON_PARTIAL_HH
25#define DUMUX_COMMON_PARTIAL_HH
30#include <dune/istl/multitypeblockvector.hh>
39template<
class ...Args, std::size_t ...i>
42 return Dune::MultiTypeBlockVector<std::add_lvalue_reference_t<std::decay_t<std::tuple_element_t<indices, std::tuple<Args...>>>>...>(v[indices]...);
50template<
class ...Args, std::size_t ...i>
53 return Dune::MultiTypeBlockVector<std::add_lvalue_reference_t<
const std::decay_t<std::tuple_element_t<indices, std::tuple<Args...>>>>...>(v[indices]...);
61template<
class ...Args, std::size_t ...i>
62auto partial(std::tuple<Args...>& v, Dune::index_constant<i>... indices)
64 return std::tuple<std::add_lvalue_reference_t<std::decay_t<std::tuple_element_t<indices, std::tuple<Args...>>>>...>(std::get<indices>(v)...);
72template<
class ...Args, std::size_t ...i>
73auto partial(
const std::tuple<Args...>& v, Dune::index_constant<i>... indices)
75 return std::tuple<std::add_lvalue_reference_t<
const std::decay_t<std::tuple_element_t<indices, std::tuple<Args...>>>>...>(std::get<indices>(v)...);
83template<
class T, std::size_t ...i>
84auto partial(T& t, std::tuple<Dune::index_constant<i>...> indices)
86 return partial(t, Dune::index_constant<i>{}...);
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
auto partial(Dune::MultiTypeBlockVector< Args... > &v, Dune::index_constant< i >... indices)
a function to get a MultiTypeBlockVector with references to some entries of another MultiTypeBlockVec...
Definition: partial.hh:40
Definition: variablesbackend.hh:43