25#ifndef DUMUX_MULTIDOMAIN_TRAITS_HH
26#define DUMUX_MULTIDOMAIN_TRAITS_HH
33#include <dune/common/fmatrix.hh>
34#include <dune/common/indices.hh>
36#include <dune/istl/bcrsmatrix.hh>
37#include <dune/istl/multitypeblockvector.hh>
38#include <dune/istl/multitypeblockmatrix.hh>
49template<
class Scalar,
class... JacobianBlocks>
52 static_assert(std::conjunction_v<isBCRSMatrix<JacobianBlocks>...>,
"Jacobian blocks have to be BCRSMatrices!");
54 template<std::
size_t id>
55 using JacobianDiagBlock =
typename std::tuple_element_t<id, std::tuple<JacobianBlocks...>>;
57 template<std::
size_t id>
58 static constexpr decltype(
auto) numEq()
59 {
return JacobianDiagBlock<id>::block_type::rows; }
61 template <std::
size_t id,
class I>
struct makeRow;
63 template <std::size_t id, std::size_t... Is>
64 struct makeRow<id, std::index_sequence<Is...>>
69 template <
class I>
struct makeMatrix;
71 template <std::size_t... Is>
72 struct makeMatrix<std::index_sequence<Is...>>
77 using Indices = std::index_sequence_for<JacobianBlocks...>;
79 using type =
typename makeMatrix<Indices>::type;
83template<
template<std::
size_t>
class T,
class Indices>
86 template<std::
size_t i>
93template<
template<std::
size_t>
class T,
class Indices>
96 template<std::
size_t i>
97 using PtrType = std::shared_ptr<const T<i>>;
103template<
template<std::
size_t>
class SubDomainDiagBlocks,
class Indices,
class Scalar>
106 template<
typename... MatrixBlocks>
139template<
typename... SubDomainTypeTags>
148 template<std::
size_t id>
149 using SubDomainTypeTag =
typename std::tuple_element_t<id, std::tuple<SubDomainTypeTags...>>;
152 using Indices = std::make_index_sequence<numSubDomains>;
155 template<std::
size_t id>
159 template<std::
size_t id>
163 template<std::
size_t id>
173 template<std::
size_t id>
176 using Index = Dune::index_constant<id>;
210 template<
template<std::
size_t>
class T>
214 template<
template<std::
size_t>
class T>
218 template<
template<std::
size_t>
class T>
Type traits to be used with matrix types.
Utilities for template meta programming.
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:180
Definition: common/pdesolver.hh:38
Property to specify the type of scalar values.
Definition: common/properties.hh:43
The DUNE grid type.
Definition: common/properties.hh:47
Property to specify the type of a problem which has to be solved.
Definition: common/properties.hh:55
A class helping models to define input and output fields.
Definition: common/properties.hh:61
Type of the global jacobian matrix.
Definition: common/properties.hh:65
Vector containing all primary variable vector of the grid.
Definition: common/properties.hh:67
Definition: common/properties.hh:100
The grid variables object managing variable data on the grid (volvars/fluxvars cache)
Definition: common/properties.hh:121
Definition: utility.hh:40
Definition: variablesbackend.hh:43
a helper class to create a multitype matrix given the diagonal matrix blocks
Definition: multidomain/traits.hh:51
typename makeMatrix< Indices >::type type
Definition: multidomain/traits.hh:79
helper alias to create a tuple of shared_ptr<...> from an indexed type
Definition: multidomain/traits.hh:85
typename makeFromIndexedType< std::tuple, PtrType, Indices >::type type
Definition: multidomain/traits.hh:89
std::shared_ptr< T< i > > PtrType
Definition: multidomain/traits.hh:87
helper alias to create a tuple of shared_ptr<const ...> from an indexed type
Definition: multidomain/traits.hh:95
typename makeFromIndexedType< std::tuple, PtrType, Indices >::type type
Definition: multidomain/traits.hh:99
std::shared_ptr< const T< i > > PtrType
Definition: multidomain/traits.hh:97
helper alias to create the JacobianMatrix type
Definition: multidomain/traits.hh:105
typename createMultiTypeBlockMatrixType< Scalar, MatrixBlocks... >::type::type M
Definition: multidomain/traits.hh:107
typename makeFromIndexedType< M, SubDomainDiagBlocks, Indices >::type type
Definition: multidomain/traits.hh:109
Definition: multidomain/traits.hh:141
static constexpr std::size_t numSubDomains
the number of subdomains
Definition: multidomain/traits.hh:143
typename makeFromIndexedType< std::common_type_t, SubDomainScalar, Indices >::type Scalar
the scalar type
Definition: multidomain/traits.hh:194
typename makeFromIndexedType< Dune::MultiTypeBlockVector, SubDomainSolutionVector, Indices >::type SolutionVector
the solution vector type
Definition: multidomain/traits.hh:197
typename Detail::MultiDomainTupleSharedPtr< T, Indices >::type TupleOfSharedPtr
helper alias to create tuple<std::shared_ptr<...>> from indexed type
Definition: multidomain/traits.hh:215
typename makeFromIndexedType< std::tuple, T, Indices >::type Tuple
helper alias to create tuple<...> from indexed type
Definition: multidomain/traits.hh:211
typename Detail::MultiDomainMatrixType< SubDomainJacobianMatrix, Indices, Scalar >::type JacobianMatrix
the jacobian type
Definition: multidomain/traits.hh:200
typename Detail::MultiDomainTupleSharedPtrConst< T, Indices >::type TupleOfSharedPtrConst
helper alias to create tuple<std::shared_ptr<const ...>> from indexed type
Definition: multidomain/traits.hh:219
Definition: multidomain/traits.hh:175
GetPropType< SubDomainTypeTag< id >, Properties::GridGeometry > GridGeometry
Definition: multidomain/traits.hh:179
SubDomainTypeTag< id > TypeTag
Definition: multidomain/traits.hh:177
Dune::index_constant< id > Index
Definition: multidomain/traits.hh:176
GetPropType< SubDomainTypeTag< id >, Properties::IOFields > IOFields
Definition: multidomain/traits.hh:182
GetPropType< SubDomainTypeTag< id >, Properties::Problem > Problem
Definition: multidomain/traits.hh:180
GetPropType< SubDomainTypeTag< id >, Properties::GridVariables > GridVariables
Definition: multidomain/traits.hh:181
GetPropType< SubDomainTypeTag< id >, Properties::Grid > Grid
Definition: multidomain/traits.hh:178
GetPropType< SubDomainTypeTag< id >, Properties::SolutionVector > SolutionVector
Definition: multidomain/traits.hh:183
Declares all properties used in Dumux.