13#ifndef DUMUX_MULTIDOMAIN_ASSEMBLER_VIEW_HH
14#define DUMUX_MULTIDOMAIN_ASSEMBLER_VIEW_HH
16#include <dune/common/hybridutilities.hh>
17#include <dune/common/std/type_traits.hh>
29template<
typename MDAssembler, std::
size_t domainId>
32 static constexpr Dune::index_constant<domainId> myId{};
35 using HasStaticIsImplicitCheck =
decltype(A::isImplicit());
38 static constexpr bool hasStaticIsImplicit = Dune::Std::is_detected<HasStaticIsImplicitCheck, A>::value;
45 : assembler_{assembler}
48 template<std::
size_t i>
49 auto localResidual(Dune::index_constant<i>
id)
const {
return assembler_.localResidual(
id); }
52 template<std::
size_t i>
53 const auto&
problem(Dune::index_constant<i>
id)
const {
return assembler_.problem(
id); }
54 const auto&
problem()
const {
return assembler_.problem(myId); }
56 template<std::
size_t i>
57 const auto&
gridGeometry(Dune::index_constant<i>
id)
const {
return assembler_.gridGeometry(
id); }
58 const auto&
gridGeometry()
const {
return assembler_.gridGeometry(myId); }
60 template<std::
size_t i>
61 const auto&
gridVariables(Dune::index_constant<i>
id)
const {
return assembler_.gridVariables(
id); }
62 const auto&
gridVariables()
const {
return assembler_.gridVariables(myId); }
64 const auto&
prevSol()
const {
return assembler_.prevSol(); }
67 template<
class A = MDAssembler,
typename std::enable_if_t<hasStaticIsImplicit<A>,
int> = 0>
68 static constexpr bool isImplicit() {
return MDAssembler::isImplicit(); }
70 template<
class A = MDAssembler,
typename std::enable_if_t<!hasStaticIsImplicit<A>,
int> = 0>
71 bool isImplicit()
const {
return assembler_.isImplicit(); }
74 MDAssembler& assembler_;
Subdomain-specific view on a multidomain assembler. Allows retrieval of sub-domain specific objects w...
Definition: assemblerview.hh:31
bool isImplicit() const
Definition: assemblerview.hh:71
typename MDAssembler::CouplingManager CouplingManager
Definition: assemblerview.hh:41
const auto & gridVariables(Dune::index_constant< i > id) const
Definition: assemblerview.hh:61
const auto & gridGeometry(Dune::index_constant< i > id) const
Definition: assemblerview.hh:57
const auto & problem(Dune::index_constant< i > id) const
Definition: assemblerview.hh:53
MultiDomainAssemblerSubDomainView(MDAssembler &assembler, Dune::index_constant< domainId >)
Definition: assemblerview.hh:44
const auto & gridGeometry() const
Definition: assemblerview.hh:58
auto localResidual() const
Definition: assemblerview.hh:50
bool isStationaryProblem() const
Definition: assemblerview.hh:65
static constexpr bool isImplicit()
Definition: assemblerview.hh:68
const auto & prevSol() const
Definition: assemblerview.hh:64
const auto & problem() const
Definition: assemblerview.hh:54
auto localResidual(Dune::index_constant< i > id) const
Definition: assemblerview.hh:49
typename MDAssembler::SolutionVector SolutionVector
Definition: assemblerview.hh:42
const auto & gridVariables() const
Definition: assemblerview.hh:62