24#ifndef DUMUX_LINEAR_SOLVER_TRAITS_HH
25#define DUMUX_LINEAR_SOLVER_TRAITS_HH
29#include <dune/istl/schwarz.hh>
30#include <dune/istl/novlpschwarz.hh>
31#include <dune/istl/owneroverlapcopy.hh>
32#include <dune/istl/paamg/pinfo.hh>
33#include <dune/istl/preconditioners.hh>
34#include <dune/grid/common/capabilities.hh>
42template<
class Gr
idGeometry,
class DiscretizationMethod>
48template<
class Gr
idGeometry>
52template<
class MType,
class VType>
60 template<
class SeqPreconditioner>
65template <
class MType,
class VType>
71 using Comm = Dune::OwnerOverlapCopyCommunication<Dune::bigunsignedint<96>,
int>;
72 using LinearOperator = Dune::NonoverlappingSchwarzOperator<MType, VType, VType, Comm>;
73 using ScalarProduct = Dune::NonoverlappingSchwarzScalarProduct<VType, Comm>;
76 template<
class SeqPreconditioner>
77 using Preconditioner = Dune::NonoverlappingBlockPreconditioner<Comm, SeqPreconditioner>;
80template <
class MType,
class VType>
86 using Comm = Dune::OwnerOverlapCopyCommunication<Dune::bigunsignedint<96>,
int>;
87 using LinearOperator = Dune::OverlappingSchwarzOperator<MType, VType, VType, Comm>;
88 using ScalarProduct = Dune::OverlappingSchwarzScalarProduct<VType, Comm>;
91 template<
class SeqPreconditioner>
92 using Preconditioner = Dune::BlockPreconditioner<VType, VType, Comm, SeqPreconditioner>;
96template<
class Gr
idGeometry>
99 using GridView =
typename GridGeometry::GridView;
100 using Grid =
typename GridGeometry::GridView::Traits::Grid;
102 template<
class Matrix,
class Vector>
106 template<
class Matrix,
class Vector>
109 template<
class Matrix,
class Vector>
115template<
class Gr
idGeometry>
120 using Grid =
typename GridGeometry::GridView::Traits::Grid;
121 static constexpr int dofCodim = Grid::dimension;
122 static constexpr bool canCommunicate = Dumux::Detail::canCommunicate<Grid, dofCodim>;
124 template<
class Gr
idView>
126 {
return gridView.overlapSize(0) == 0; }
129template<
class Gr
idGeometry>
133 using Grid =
typename GridGeometry::GridView::Traits::Grid;
136 static constexpr int dofCodim = Grid::dimension;
137 static constexpr std::bitset<Grid::dimension+1> dofCodims{ (1UL << Grid::dimension) + 1UL };
140 {
return { gg.dofMapper() }; }
144template<
class Gr
idGeometry>
149 using Grid =
typename GridGeometry::GridView::Traits::Grid;
150 static constexpr int dofCodim = 0;
151 static constexpr bool canCommunicate = Dumux::Detail::canCommunicate<Grid, dofCodim>;
153 template<
class Gr
idView>
159template<
class Gr
idGeometry>
166 DofMapper(
const typename GridGeometry::GridView& gridView)
167 : gridView_(gridView) {}
169 template<
class Entity>
171 {
return gridView_.indexSet().index(e); }
174 {
return gridView_.size(1); }
177 typename GridGeometry::GridView gridView_;
181 {
return { gg.gridView() }; }
183 using Grid =
typename GridGeometry::GridView::Traits::Grid;
184 static constexpr int dofCodim = 1;
188 Dune::Capabilities::canCommunicate<Grid, dofCodim>::v
191 template<
class Gr
idView>
194 assert(gridView.overlapSize(0) > 0);
200template<
class Gr
idGeometry>
205 using Grid =
typename GridGeometry::GridView::Traits::Grid;
206 static constexpr int dofCodim = 1;
207 static constexpr bool canCommunicate = Dumux::Detail::canCommunicate<Grid, dofCodim>;
210 {
return { gg.dofMapper() }; }
212 template<
class Gr
idView>
214 {
return gridView.overlapSize(0) == 0; }
218template<
class Gr
idGeometry>
223template<
class Gr
idGeometry>
dune-grid capabilities compatibility layer
The available discretization methods in Dumux.
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
static constexpr bool canCommunicate
Definition: gridcapabilities.hh:63
CVFE< CVFEMethods::CR_RT > FCDiamond
Definition: method.hh:90
CVFE< CVFEMethods::PQ1 > Box
Definition: method.hh:83
CVFE< CVFEMethods::PQ1Bubble > PQ1Bubble
Definition: method.hh:97
Definition: gridcapabilities.hh:45
The implementation is specialized for the different discretizations.
Definition: linearsolvertraits.hh:43
sequential solver traits
Definition: linearsolvertraits.hh:54
MType Matrix
Definition: linearsolvertraits.hh:55
VType Vector
Definition: linearsolvertraits.hh:56
Dune::MatrixAdapter< MType, VType, VType > LinearOperator
Definition: linearsolvertraits.hh:57
SeqPreconditioner Preconditioner
Definition: linearsolvertraits.hh:61
Dune::SeqScalarProduct< VType > ScalarProduct
Definition: linearsolvertraits.hh:58
Definition: linearsolvertraits.hh:67
Dune::NonoverlappingSchwarzOperator< MType, VType, VType, Comm > LinearOperator
Definition: linearsolvertraits.hh:72
MType Matrix
Definition: linearsolvertraits.hh:69
Dune::NonoverlappingBlockPreconditioner< Comm, SeqPreconditioner > Preconditioner
Definition: linearsolvertraits.hh:77
Dune::NonoverlappingSchwarzScalarProduct< VType, Comm > ScalarProduct
Definition: linearsolvertraits.hh:73
VType Vector
Definition: linearsolvertraits.hh:70
Dune::OwnerOverlapCopyCommunication< Dune::bigunsignedint< 96 >, int > Comm
Definition: linearsolvertraits.hh:71
static constexpr bool isNonOverlapping
Definition: linearsolvertraits.hh:74
Definition: linearsolvertraits.hh:82
static constexpr bool isNonOverlapping
Definition: linearsolvertraits.hh:89
Dune::OverlappingSchwarzOperator< MType, VType, VType, Comm > LinearOperator
Definition: linearsolvertraits.hh:87
MType Matrix
Definition: linearsolvertraits.hh:84
Dune::BlockPreconditioner< VType, VType, Comm, SeqPreconditioner > Preconditioner
Definition: linearsolvertraits.hh:92
VType Vector
Definition: linearsolvertraits.hh:85
Dune::OwnerOverlapCopyCommunication< Dune::bigunsignedint< 96 >, int > Comm
Definition: linearsolvertraits.hh:86
Dune::OverlappingSchwarzScalarProduct< VType, Comm > ScalarProduct
Definition: linearsolvertraits.hh:88
Definition: linearsolvertraits.hh:98
typename GridGeometry::GridView::Traits::Grid Grid
Definition: linearsolvertraits.hh:100
typename GridGeometry::GridView GridView
Definition: linearsolvertraits.hh:99
static bool isNonOverlapping(const GridView &gridView)
Definition: linearsolvertraits.hh:125
typename GridGeometry::VertexMapper DofMapper
Definition: linearsolvertraits.hh:119
static const DofMapper & dofMapper(const GridGeometry &gg)
Definition: linearsolvertraits.hh:139
typename GridGeometry::ElementMapper DofMapper
Definition: linearsolvertraits.hh:148
static bool isNonOverlapping(const GridView &gridView)
Definition: linearsolvertraits.hh:154
static bool isNonOverlapping(const GridView &gridView)
Definition: linearsolvertraits.hh:192
static DofMapper dofMapper(const GridGeometry &gg)
Definition: linearsolvertraits.hh:180
auto size() const
Definition: linearsolvertraits.hh:173
DofMapper(const typename GridGeometry::GridView &gridView)
Definition: linearsolvertraits.hh:166
auto index(const Entity &e) const
Definition: linearsolvertraits.hh:170
typename GridGeometry::DofMapper DofMapper
Definition: linearsolvertraits.hh:204
static bool isNonOverlapping(const GridView &gridView)
Definition: linearsolvertraits.hh:213
static const DofMapper & dofMapper(const GridGeometry &gg)
Definition: linearsolvertraits.hh:209