12#ifndef DUMUX_LINEAR_SOLVER_TRAITS_HH
13#define DUMUX_LINEAR_SOLVER_TRAITS_HH
17#include <dune/istl/schwarz.hh>
18#include <dune/istl/novlpschwarz.hh>
19#include <dune/istl/owneroverlapcopy.hh>
20#include <dune/istl/paamg/pinfo.hh>
21#include <dune/istl/preconditioners.hh>
22#include <dune/grid/common/capabilities.hh>
30template<
class Gr
idGeometry,
class DiscretizationMethod>
36template<
class Gr
idGeometry>
40template<
class MType,
class VType>
48 template<
class SeqPreconditioner>
54 template<
class Matrix,
class Vector>
61template <
class MType,
class VType>
67 using Comm = Dune::OwnerOverlapCopyCommunication<Dune::bigunsignedint<96>,
int>;
68 using LinearOperator = Dune::NonoverlappingSchwarzOperator<MType, VType, VType, Comm>;
69 using ScalarProduct = Dune::NonoverlappingSchwarzScalarProduct<VType, Comm>;
72 template<
class SeqPreconditioner>
73 using Preconditioner = Dune::NonoverlappingBlockPreconditioner<Comm, SeqPreconditioner>;
76template <
class MType,
class VType>
82 using Comm = Dune::OwnerOverlapCopyCommunication<Dune::bigunsignedint<96>,
int>;
83 using LinearOperator = Dune::OverlappingSchwarzOperator<MType, VType, VType, Comm>;
84 using ScalarProduct = Dune::OverlappingSchwarzScalarProduct<VType, Comm>;
87 template<
class SeqPreconditioner>
88 using Preconditioner = Dune::BlockPreconditioner<VType, VType, Comm, SeqPreconditioner>;
92template<
class Gr
idGeometry>
95 using GridView =
typename GridGeometry::GridView;
96 using Grid =
typename GridGeometry::GridView::Traits::Grid;
98 template<
class Matrix,
class Vector>
102 template<
class Matrix,
class Vector>
105 template<
class Matrix,
class Vector>
111template<
class Gr
idGeometry>
116 using Grid =
typename GridGeometry::GridView::Traits::Grid;
117 static constexpr int dofCodim = Grid::dimension;
118 static constexpr bool canCommunicate = Dumux::Detail::canCommunicate<Grid, dofCodim>;
120 template<
class Gr
idView>
122 {
return gridView.overlapSize(0) == 0; }
125template<
class Gr
idGeometry>
129 using Grid =
typename GridGeometry::GridView::Traits::Grid;
132 static constexpr int dofCodim = Grid::dimension;
133 static constexpr std::bitset<Grid::dimension+1> dofCodims{ (1UL << Grid::dimension) + 1UL };
136 {
return { gg.dofMapper() }; }
140template<
class Gr
idGeometry>
145 using Grid =
typename GridGeometry::GridView::Traits::Grid;
146 static constexpr int dofCodim = 0;
147 static constexpr bool canCommunicate = Dumux::Detail::canCommunicate<Grid, dofCodim>;
149 template<
class Gr
idView>
155template<
class Gr
idGeometry>
162 DofMapper(
const typename GridGeometry::GridView& gridView)
163 : gridView_(gridView) {}
165 template<
class Entity>
167 {
return gridView_.indexSet().index(e); }
170 {
return gridView_.size(1); }
173 typename GridGeometry::GridView gridView_;
177 {
return { gg.gridView() }; }
179 using Grid =
typename GridGeometry::GridView::Traits::Grid;
180 static constexpr int dofCodim = 1;
184 Dune::Capabilities::canCommunicate<Grid, dofCodim>::v
187 template<
class Gr
idView>
190 assert(gridView.overlapSize(0) > 0);
196template<
class Gr
idGeometry>
201 using Grid =
typename GridGeometry::GridView::Traits::Grid;
202 static constexpr int dofCodim = 1;
203 static constexpr bool canCommunicate = Dumux::Detail::canCommunicate<Grid, dofCodim>;
206 {
return { gg.dofMapper() }; }
208 template<
class Gr
idView>
210 {
return gridView.overlapSize(0) == 0; }
214template<
class Gr
idGeometry>
219template<
class Gr
idGeometry>
auto size() const
Definition: linearsolvertraits.hh:169
DofMapper(const typename GridGeometry::GridView &gridView)
Definition: linearsolvertraits.hh:162
auto index(const Entity &e) const
Definition: linearsolvertraits.hh:166
dune-grid capabilities compatibility layer
The available discretization methods in Dumux.
static constexpr bool canCommunicate
Definition: gridcapabilities.hh:51
CVFE< CVFEMethods::CR_RT > FCDiamond
Definition: method.hh:101
CVFE< CVFEMethods::PQ1 > Box
Definition: method.hh:94
CVFE< CVFEMethods::PQ1Bubble > PQ1Bubble
Definition: method.hh:108
Definition: linearsolvertraits.hh:94
typename GridGeometry::GridView::Traits::Grid Grid
Definition: linearsolvertraits.hh:96
typename GridGeometry::GridView GridView
Definition: linearsolvertraits.hh:95
static bool isNonOverlapping(const GridView &gridView)
Definition: linearsolvertraits.hh:121
typename GridGeometry::VertexMapper DofMapper
Definition: linearsolvertraits.hh:115
typename GridGeometry::ElementMapper DofMapper
Definition: linearsolvertraits.hh:144
static bool isNonOverlapping(const GridView &gridView)
Definition: linearsolvertraits.hh:150
typename GridGeometry::DofMapper DofMapper
Definition: linearsolvertraits.hh:200
static bool isNonOverlapping(const GridView &gridView)
Definition: linearsolvertraits.hh:209
static const DofMapper & dofMapper(const GridGeometry &gg)
Definition: linearsolvertraits.hh:205
static bool isNonOverlapping(const GridView &gridView)
Definition: linearsolvertraits.hh:188
static DofMapper dofMapper(const GridGeometry &gg)
Definition: linearsolvertraits.hh:176
static const DofMapper & dofMapper(const GridGeometry &gg)
Definition: linearsolvertraits.hh:135
The implementation is specialized for the different discretizations.
Definition: linearsolvertraits.hh:31
Definition: linearsolvertraits.hh:63
Dune::NonoverlappingSchwarzOperator< MType, VType, VType, Comm > LinearOperator
Definition: linearsolvertraits.hh:68
MType Matrix
Definition: linearsolvertraits.hh:65
Dune::NonoverlappingBlockPreconditioner< Comm, SeqPreconditioner > Preconditioner
Definition: linearsolvertraits.hh:73
Dune::NonoverlappingSchwarzScalarProduct< VType, Comm > ScalarProduct
Definition: linearsolvertraits.hh:69
VType Vector
Definition: linearsolvertraits.hh:66
Dune::OwnerOverlapCopyCommunication< Dune::bigunsignedint< 96 >, int > Comm
Definition: linearsolvertraits.hh:67
static constexpr bool isNonOverlapping
Definition: linearsolvertraits.hh:70
Definition: linearsolvertraits.hh:78
static constexpr bool isNonOverlapping
Definition: linearsolvertraits.hh:85
Dune::OverlappingSchwarzOperator< MType, VType, VType, Comm > LinearOperator
Definition: linearsolvertraits.hh:83
MType Matrix
Definition: linearsolvertraits.hh:80
Dune::BlockPreconditioner< VType, VType, Comm, SeqPreconditioner > Preconditioner
Definition: linearsolvertraits.hh:88
VType Vector
Definition: linearsolvertraits.hh:81
Dune::OwnerOverlapCopyCommunication< Dune::bigunsignedint< 96 >, int > Comm
Definition: linearsolvertraits.hh:82
Dune::OverlappingSchwarzScalarProduct< VType, Comm > ScalarProduct
Definition: linearsolvertraits.hh:84
Definition: linearsolvertraits.hh:53
static constexpr bool canCommunicate
Definition: linearsolvertraits.hh:57
sequential solver traits
Definition: linearsolvertraits.hh:42
MType Matrix
Definition: linearsolvertraits.hh:43
VType Vector
Definition: linearsolvertraits.hh:44
Dune::MatrixAdapter< MType, VType, VType > LinearOperator
Definition: linearsolvertraits.hh:45
SeqPreconditioner Preconditioner
Definition: linearsolvertraits.hh:49
Dune::SeqScalarProduct< VType > ScalarProduct
Definition: linearsolvertraits.hh:46
Definition: gridcapabilities.hh:33