24#ifndef DUMUX_AMG_TRAITS_HH
25#define DUMUX_AMG_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>
42#include <dune/grid/uggrid.hh>
47namespace Capabilities {
49template<
class Gr
id,
int codim>
52 static const bool v =
false;
56template<
int dim,
int codim>
59 static const bool v =
true;
71template<
class MType,
class VType,
class Gr
idGeometry, DiscretizationMethod discMethod>
struct AmgTraitsImpl;
74template<
class MType,
class VType,
class Gr
idGeometry>
78template <
class MType,
class VType,
bool isParallel>
82 using Comm = Dune::Amg::SequentialInformation;
85 using Smoother = Dune::SeqSSOR<MType,VType, VType>;
89template <
class MType,
class VType>
93 using Comm = Dune::OwnerOverlapCopyCommunication<Dune::bigunsignedint<96>,
int>;
94 using LinearOperator = Dune::NonoverlappingSchwarzOperator<MType,VType, VType,Comm>;
95 using ScalarProduct = Dune::NonoverlappingSchwarzScalarProduct<VType,Comm>;
96 using Smoother = Dune::NonoverlappingBlockPreconditioner<Comm,Dune::SeqSSOR<MType,VType, VType> >;
101template<
class Matrix,
class Vector,
class Gr
idGeometry>
104 using Grid =
typename GridGeometry::GridView::Traits::Grid;
106 dofCodim = Grid::dimension,
107 isNonOverlapping =
true,
109 isParallel = Dune::Capabilities::canCommunicate<Grid, dofCodim>::v
113 using VType = Dune::BlockVector<Dune::FieldVector<typename Vector::block_type::value_type, Vector::block_type::dimension>>;
124template <
class MType,
class VType,
bool isParallel>
128 using Comm = Dune::Amg::SequentialInformation;
131 using Smoother = Dune::SeqSSOR<MType,VType, VType>;
135template <
class MType,
class VType>
139 using Comm = Dune::OwnerOverlapCopyCommunication<Dune::bigunsignedint<96>,
int>;
140 using LinearOperator = Dune::OverlappingSchwarzOperator<MType,VType, VType,Comm>;
142 using Smoother = Dune::BlockPreconditioner<VType,VType,Comm,Dune::SeqSSOR<MType,VType, VType> >;
147template<
class Matrix,
class Vector,
class Gr
idGeometry>
150 using Grid =
typename GridGeometry::GridView::Traits::Grid;
153 isNonOverlapping =
false,
155 isParallel = Dune::Capabilities::canCommunicate<Grid, dofCodim>::v
159 using VType = Dune::BlockVector<Dune::FieldVector<typename Vector::block_type::value_type, Vector::block_type::dimension>>;
169template<
class Matrix,
class Vector,
class Gr
idGeometry>
171:
public AmgTraitsImpl<Matrix, Vector, GridGeometry, DiscretizationMethod::cctpfa> {};
The available discretization methods in Dumux.
DiscretizationMethod
The available discretization methods in Dumux.
Definition: method.hh:37
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
Definition: common/properties/model.hh:34
Definition: amgtraits.hh:51
static const bool v
Definition: amgtraits.hh:52
The implementation is specialized for the different discretizations.
Definition: amgtraits.hh:71
NonoverlappingSolverTraits used by discretization with non-overlapping parallel model.
Definition: amgtraits.hh:80
Dune::SeqScalarProduct< VType > ScalarProduct
Definition: amgtraits.hh:84
Dune::SeqSSOR< MType, VType, VType > Smoother
Definition: amgtraits.hh:85
Dune::MatrixAdapter< MType, VType, VType > LinearOperator
Definition: amgtraits.hh:83
Dune::Amg::SequentialInformation Comm
Definition: amgtraits.hh:82
Dune::NonoverlappingBlockPreconditioner< Comm, Dune::SeqSSOR< MType, VType, VType > > Smoother
Definition: amgtraits.hh:96
Dune::OwnerOverlapCopyCommunication< Dune::bigunsignedint< 96 >, int > Comm
Definition: amgtraits.hh:93
Dune::NonoverlappingSchwarzScalarProduct< VType, Comm > ScalarProduct
Definition: amgtraits.hh:95
Dune::NonoverlappingSchwarzOperator< MType, VType, VType, Comm > LinearOperator
Definition: amgtraits.hh:94
typename GridGeometry::GridView::Traits::Grid Grid
Definition: amgtraits.hh:104
Dune::BlockVector< Dune::FieldVector< typename Vector::block_type::value_type, Vector::block_type::dimension > > VType
Definition: amgtraits.hh:113
typename SolverTraits::LinearOperator LinearOperator
Definition: amgtraits.hh:116
typename SolverTraits::Smoother Smoother
Definition: amgtraits.hh:118
typename SolverTraits::ScalarProduct ScalarProduct
Definition: amgtraits.hh:117
Matrix MType
Definition: amgtraits.hh:112
typename GridGeometry::VertexMapper DofMapper
Definition: amgtraits.hh:120
typename SolverTraits::Comm Comm
Definition: amgtraits.hh:115
OverlappingSolverTraits used by discretization with overlapping parallel model.
Definition: amgtraits.hh:126
Dune::SeqScalarProduct< VType > ScalarProduct
Definition: amgtraits.hh:130
Dune::MatrixAdapter< MType, VType, VType > LinearOperator
Definition: amgtraits.hh:129
Dune::SeqSSOR< MType, VType, VType > Smoother
Definition: amgtraits.hh:131
Dune::Amg::SequentialInformation Comm
Definition: amgtraits.hh:128
Dune::OverlappingSchwarzScalarProduct< VType, Comm > ScalarProduct
Definition: amgtraits.hh:141
Dune::BlockPreconditioner< VType, VType, Comm, Dune::SeqSSOR< MType, VType, VType > > Smoother
Definition: amgtraits.hh:142
Dune::OwnerOverlapCopyCommunication< Dune::bigunsignedint< 96 >, int > Comm
Definition: amgtraits.hh:139
Dune::OverlappingSchwarzOperator< MType, VType, VType, Comm > LinearOperator
Definition: amgtraits.hh:140
typename SolverTraits::LinearOperator LinearOperator
Definition: amgtraits.hh:162
typename GridGeometry::GridView::Traits::Grid Grid
Definition: amgtraits.hh:150
typename SolverTraits::ScalarProduct ScalarProduct
Definition: amgtraits.hh:163
Dune::BlockVector< Dune::FieldVector< typename Vector::block_type::value_type, Vector::block_type::dimension > > VType
Definition: amgtraits.hh:159
typename GridGeometry::ElementMapper DofMapper
Definition: amgtraits.hh:166
Matrix MType
Definition: amgtraits.hh:158
typename SolverTraits::Comm Comm
Definition: amgtraits.hh:161
typename SolverTraits::Smoother Smoother
Definition: amgtraits.hh:164