13#ifndef DUMUX_MULTIDOMAIN_TRAITS_HH 
   14#define DUMUX_MULTIDOMAIN_TRAITS_HH 
   21#include <dune/common/fmatrix.hh> 
   22#include <dune/common/indices.hh> 
   24#include <dune/istl/bcrsmatrix.hh> 
   25#include <dune/istl/multitypeblockvector.hh> 
   26#include <dune/istl/multitypeblockmatrix.hh> 
   39template<
class Scalar, 
class... JacobianBlocks>
 
   42    static_assert(std::conjunction_v<isBCRSMatrix<JacobianBlocks>...>, 
"Jacobian blocks have to be BCRSMatrices!");
 
   44    template<std::
size_t id>
 
   45    using JacobianDiagBlock = 
typename std::tuple_element_t<id, std::tuple<JacobianBlocks...>>;
 
   47    template<std::
size_t id>
 
   48    static constexpr decltype(
auto) numEq()
 
   49    { 
return JacobianDiagBlock<id>::block_type::rows; }
 
   51    template <std::
size_t id, 
class I> 
struct makeRow;
 
   53    template <std::size_t id, std::size_t... Is>
 
   54    struct makeRow<id, std::index_sequence<Is...>>
 
   59    template <
class I> 
struct makeMatrix;
 
   61    template <std::size_t... Is>
 
   62    struct makeMatrix<std::index_sequence<Is...>>
 
   67    using Indices = std::index_sequence_for<JacobianBlocks...>;
 
   69    using type = 
typename makeMatrix<Indices>::type;
 
 
   73template<
template<std::
size_t> 
class T, 
class Indices>
 
   76    template<std::
size_t i>
 
 
   83template<
template<std::
size_t> 
class T, 
class Indices>
 
   86    template<std::
size_t i>
 
   87    using PtrType = std::shared_ptr<const T<i>>;
 
 
   93template<
template<std::
size_t> 
class SubDomainDiagBlocks, 
class Indices, 
class Scalar>
 
   96    template<
typename... MatrixBlocks>
 
 
  132template<
typename... SubDomainTypeTags>
 
  141    template<std::
size_t id>
 
  142    using SubDomainTypeTag = 
typename std::tuple_element_t<id, std::tuple<SubDomainTypeTags...>>;
 
  145    using Indices = std::make_index_sequence<numSubDomains>;
 
  148    template<std::
size_t id>
 
  152    template<std::
size_t id>
 
  156    template<std::
size_t id>
 
  160    template<std::
size_t id>
 
  170    template<std::
size_t id>
 
  173        using Index = Dune::index_constant<id>;
 
 
  212    template<
template<std::
size_t> 
class T>
 
  216    template<
template<std::
size_t> 
class T>
 
  220    template<
template<std::
size_t> 
class T>
 
 
a helper class to create a multitype matrix given the diagonal matrix blocks
Definition multidomain/traits.hh:41
typename makeMatrix< Indices >::type type
Definition multidomain/traits.hh:69
Definition common/pdesolver.hh:26
Definition variablesbackend.hh:34
Defines all properties used in Dumux.
Helper to extract native Dune vector types from particular Dumux types.
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition propertysystem.hh:296
Type traits to be used with matrix types.
Distance implementation details.
Definition cvfelocalresidual.hh:25
helper alias to create the JacobianMatrix type
Definition multidomain/traits.hh:95
typename createMultiTypeBlockMatrixType< Scalar, MatrixBlocks... >::type::type M
Definition multidomain/traits.hh:97
typename makeFromIndexedType< M, SubDomainDiagBlocks, Indices >::type type
Definition multidomain/traits.hh:99
helper alias to create a tuple of shared_ptr<const ...> 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< const T< i > > PtrType
Definition multidomain/traits.hh:87
helper alias to create a tuple of shared_ptr<...> from an indexed type
Definition multidomain/traits.hh:75
std::shared_ptr< T< i > > PtrType
Definition multidomain/traits.hh:77
typename makeFromIndexedType< std::tuple, PtrType, Indices >::type type
Definition multidomain/traits.hh:79
Definition dunevectors.hh:56
typename NativeDuneVectorTypeImpl< V, Dune::Std::is_detected< Detail::DuneVectors::StateDetector, V >{} >::type type
Definition dunevectors.hh:57
Definition multidomain/traits.hh:172
GetPropType< SubDomainTypeTag< id >, Properties::GridGeometry > GridGeometry
Definition multidomain/traits.hh:176
typename Detail::NativeDuneVectorType< SolutionVector >::type ResidualVector
Definition multidomain/traits.hh:182
SubDomainTypeTag< id > TypeTag
Definition multidomain/traits.hh:174
Dune::index_constant< id > Index
Definition multidomain/traits.hh:173
GetPropType< SubDomainTypeTag< id >, Properties::IOFields > IOFields
Definition multidomain/traits.hh:180
GetPropType< SubDomainTypeTag< id >, Properties::Problem > Problem
Definition multidomain/traits.hh:177
GetPropType< SubDomainTypeTag< id >, Properties::GridVariables > GridVariables
Definition multidomain/traits.hh:178
GetPropType< SubDomainTypeTag< id >, Properties::Grid > Grid
Definition multidomain/traits.hh:175
GetPropType< SubDomainTypeTag< id >, Properties::SolutionVector > SolutionVector
Definition multidomain/traits.hh:181
GetPropType< SubDomainTypeTag< id >, Properties::LocalResidual > LocalResidual
Definition multidomain/traits.hh:179
Definition multidomain/traits.hh:134
static constexpr std::size_t numSubDomains
Definition multidomain/traits.hh:136
typename makeFromIndexedType< std::common_type_t, SubDomainScalar, Indices >::type Scalar
Definition multidomain/traits.hh:193
typename makeFromIndexedType< Dune::MultiTypeBlockVector, SubDomainSolutionVector, Indices >::type SolutionVector
Definition multidomain/traits.hh:196
typename Detail::MultiDomainTupleSharedPtr< T, Indices >::type TupleOfSharedPtr
Definition multidomain/traits.hh:217
typename makeFromIndexedType< Dune::MultiTypeBlockVector, SubDomainResidualVector, Indices >::type ResidualVector
Definition multidomain/traits.hh:199
typename makeFromIndexedType< std::tuple, T, Indices >::type Tuple
Definition multidomain/traits.hh:213
typename Detail::MultiDomainMatrixType< SubDomainJacobianMatrix, Indices, Scalar >::type JacobianMatrix
Definition multidomain/traits.hh:202
typename Detail::MultiDomainTupleSharedPtrConst< T, Indices >::type TupleOfSharedPtrConst
Definition multidomain/traits.hh:221
Utilities for template meta programming.