24#ifndef DUMUX_LINEAR_SOLVER_TRAITS_HH
25#define DUMUX_LINEAR_SOLVER_TRAITS_HH
27#include <dune/istl/schwarz.hh>
28#include <dune/istl/novlpschwarz.hh>
29#include <dune/istl/owneroverlapcopy.hh>
30#include <dune/istl/paamg/pinfo.hh>
31#include <dune/istl/preconditioners.hh>
32#include <dune/grid/common/capabilities.hh>
40template<
class Gr
idGeometry,
class DiscretizationMethod>
47template<
class Gr
idGeometry>
51template<
class MType,
class VType>
59 template<
class SeqPreconditioner>
64template <
class MType,
class VType>
70 using Comm = Dune::OwnerOverlapCopyCommunication<Dune::bigunsignedint<96>,
int>;
71 using LinearOperator = Dune::NonoverlappingSchwarzOperator<MType, VType, VType, Comm>;
72 using ScalarProduct = Dune::NonoverlappingSchwarzScalarProduct<VType, Comm>;
75 template<
class SeqPreconditioner>
76 using Preconditioner = Dune::NonoverlappingBlockPreconditioner<Comm, SeqPreconditioner>;
79template <
class MType,
class VType>
85 using Comm = Dune::OwnerOverlapCopyCommunication<Dune::bigunsignedint<96>,
int>;
86 using LinearOperator = Dune::OverlappingSchwarzOperator<MType, VType, VType, Comm>;
87 using ScalarProduct = Dune::OverlappingSchwarzScalarProduct<VType, Comm>;
90 template<
class SeqPreconditioner>
91 using Preconditioner = Dune::BlockPreconditioner<VType, VType, Comm, SeqPreconditioner>;
95template<
class Gr
idGeometry>
98 using GridView =
typename GridGeometry::GridView;
99 using Grid =
typename GridGeometry::GridView::Traits::Grid;
101 template<
class Matrix,
class Vector>
105 template<
class Matrix,
class Vector>
108 template<
class Matrix,
class Vector>
114template<
class Gr
idGeometry>
119 using Grid =
typename GridGeometry::GridView::Traits::Grid;
120 static constexpr int dofCodim = Grid::dimension;
121 static constexpr bool canCommunicate = Dumux::Detail::canCommunicate<Grid, dofCodim>;
123 template<
class Gr
idView>
125 {
return gridView.overlapSize(0) == 0; }
129template<
class Gr
idGeometry>
134 using Grid =
typename GridGeometry::GridView::Traits::Grid;
135 static constexpr int dofCodim = 0;
136 static constexpr bool canCommunicate = Dumux::Detail::canCommunicate<Grid, dofCodim>;
138 template<
class Gr
idView>
144template<
class Gr
idGeometry>
151 DofMapper(
const typename GridGeometry::GridView& gridView)
152 : gridView_(gridView) {}
154 auto index(
const typename GridGeometry::GridView::Intersection& intersection)
const
155 {
return gridView_.indexSet().index(intersection); }
157 template<
class Entity>
159 {
return gridView_.indexSet().index(e); }
162 {
return gridView_.size(1); }
165 typename GridGeometry::GridView gridView_;
168 using Grid =
typename GridGeometry::GridView::Traits::Grid;
169 static constexpr int dofCodim = 1;
173 Dune::Capabilities::canCommunicate<Grid, dofCodim>::v
176 template<
class Gr
idView>
179 assert(gridView.overlapSize(0) > 0);
185template<
class Gr
idGeometry>
190template<
class Gr
idGeometry>
dune-grid capabilities compatibility layer
The available discretization methods in Dumux.
static constexpr bool canCommunicate
Definition: gridcapabilities.hh:63
Definition: gridcapabilities.hh:45
The implementation is specialized for the different discretizations.
Definition: linearsolvertraits.hh:41
sequential solver traits
Definition: linearsolvertraits.hh:53
MType Matrix
Definition: linearsolvertraits.hh:54
VType Vector
Definition: linearsolvertraits.hh:55
Dune::MatrixAdapter< MType, VType, VType > LinearOperator
Definition: linearsolvertraits.hh:56
SeqPreconditioner Preconditioner
Definition: linearsolvertraits.hh:60
Dune::SeqScalarProduct< VType > ScalarProduct
Definition: linearsolvertraits.hh:57
Definition: linearsolvertraits.hh:66
Dune::NonoverlappingSchwarzOperator< MType, VType, VType, Comm > LinearOperator
Definition: linearsolvertraits.hh:71
MType Matrix
Definition: linearsolvertraits.hh:68
Dune::NonoverlappingBlockPreconditioner< Comm, SeqPreconditioner > Preconditioner
Definition: linearsolvertraits.hh:76
Dune::NonoverlappingSchwarzScalarProduct< VType, Comm > ScalarProduct
Definition: linearsolvertraits.hh:72
VType Vector
Definition: linearsolvertraits.hh:69
Dune::OwnerOverlapCopyCommunication< Dune::bigunsignedint< 96 >, int > Comm
Definition: linearsolvertraits.hh:70
static constexpr bool isNonOverlapping
Definition: linearsolvertraits.hh:73
Definition: linearsolvertraits.hh:81
static constexpr bool isNonOverlapping
Definition: linearsolvertraits.hh:88
Dune::OverlappingSchwarzOperator< MType, VType, VType, Comm > LinearOperator
Definition: linearsolvertraits.hh:86
MType Matrix
Definition: linearsolvertraits.hh:83
Dune::BlockPreconditioner< VType, VType, Comm, SeqPreconditioner > Preconditioner
Definition: linearsolvertraits.hh:91
VType Vector
Definition: linearsolvertraits.hh:84
Dune::OwnerOverlapCopyCommunication< Dune::bigunsignedint< 96 >, int > Comm
Definition: linearsolvertraits.hh:85
Dune::OverlappingSchwarzScalarProduct< VType, Comm > ScalarProduct
Definition: linearsolvertraits.hh:87
Definition: linearsolvertraits.hh:97
typename GridGeometry::GridView::Traits::Grid Grid
Definition: linearsolvertraits.hh:99
typename GridGeometry::GridView GridView
Definition: linearsolvertraits.hh:98
static bool isNonOverlapping(const GridView &gridView)
Definition: linearsolvertraits.hh:124
typename GridGeometry::VertexMapper DofMapper
Definition: linearsolvertraits.hh:118
typename GridGeometry::ElementMapper DofMapper
Definition: linearsolvertraits.hh:133
static bool isNonOverlapping(const GridView &gridView)
Definition: linearsolvertraits.hh:139
static bool isNonOverlapping(const GridView &gridView)
Definition: linearsolvertraits.hh:177
auto size() const
Definition: linearsolvertraits.hh:161
DofMapper(const typename GridGeometry::GridView &gridView)
Definition: linearsolvertraits.hh:151
auto index(const typename GridGeometry::GridView::Intersection &intersection) const
Definition: linearsolvertraits.hh:154
auto index(const Entity &e) const
Definition: linearsolvertraits.hh:158