3#ifndef DUNE_PDELAB_BACKEND_ISTL_OVLPISTLSOLVERBACKEND_HH
4#define DUNE_PDELAB_BACKEND_ISTL_OVLPISTLSOLVERBACKEND_HH
6#include <dune/common/deprecated.hh>
7#include <dune/common/parallel/mpihelper.hh>
9#include <dune/istl/owneroverlapcopy.hh>
10#include <dune/istl/solvercategory.hh>
11#include <dune/istl/operators.hh>
12#include <dune/istl/solvers.hh>
13#include <dune/istl/preconditioners.hh>
14#include <dune/istl/scalarproducts.hh>
15#include <dune/istl/paamg/amg.hh>
16#include <dune/istl/paamg/pinfo.hh>
17#include <dune/istl/io.hh>
18#include <dune/istl/superlu.hh>
40 template<
class CC,
class M,
class X,
class Y>
42 :
public Dune::AssembledLinearOperator<M,X,Y>
59 native(_A_).mv(native(x),native(y));
67 native(_A_).usmv(alpha,native(x),native(y));
71 SolverCategory::Category
category()
const override
73 return SolverCategory::overlapping;
77 virtual const M&
getmat ()
const override
89 template<
class GFS,
class X>
91 :
public Dune::ScalarProduct<X>
101 : gfs(gfs_), helper(helper_)
115 return gfs.gridView().comm().sum(sum);
121 virtual double norm (
const X& x)
const override
123 return sqrt(
static_cast<double>(this->
dot(x,x)));
128 return SolverCategory::overlapping;
137 template<
class CC,
class GFS,
class P>
139 :
public Dune::Preconditioner<Dune::PDELab::Backend::Vector<GFS,typename P::domain_type::field_type>,
140 Dune::PDELab::Backend::Vector<GFS,typename P::range_type::field_type>>
151 : gfs(gfs_), prec(prec_), cc(cc_), helper(helper_)
171 if (gfs.gridView().comm().size()>1)
172 gfs.gridView().communicate(adddh,Dune::All_All_Interface,Dune::ForwardCommunication);
177 return SolverCategory::overlapping;
196#if HAVE_SUITESPARSE_UMFPACK || DOXYGEN
198 template<
class GFS,
class M,
class X,
class Y>
218 : gfs(gfs_), solver(Backend::native(A_),false)
224 virtual void pre (X& x, Y& b)
override {}
229 virtual void apply (X& v,
const Y& d)
override
231 Dune::InverseOperatorResult stat;
234 if (gfs.gridView().comm().size()>1)
237 gfs.gridView().communicate(adddh,Dune::All_All_Interface,Dune::ForwardCommunication);
243 return SolverCategory::overlapping;
249 virtual void post (X& x)
override {}
253 Dune::UMFPack<ISTLM> solver;
259 template<
class GFS,
class M,
class X,
class Y>
260 class SuperLUSubdomainSolver :
public Dune::Preconditioner<X,Y>
262 typedef Backend::Native<M> ISTLM;
266 typedef X domain_type;
268 typedef Y range_type;
270 typedef typename X::ElementType field_type;
278 SuperLUSubdomainSolver (
const GFS& gfs_,
const M& A_)
279 : gfs(gfs_), solver(Backend::native(A_),false)
285 virtual void pre (X& x, Y& b)
override {}
290 virtual void apply (X& v,
const Y& d)
override
292 Dune::InverseOperatorResult stat;
294 solver.apply(Backend::native(v),Backend::native(b),stat);
295 if (gfs.gridView().comm().size()>1)
297 AddDataHandle<GFS,X> adddh(gfs,v);
298 gfs.gridView().communicate(adddh,Dune::All_All_Interface,Dune::ForwardCommunication);
302 SolverCategory::Category category()
const override
304 return SolverCategory::overlapping;
310 virtual void post (X& x)
override {}
314 Dune::SuperLU<ISTLM> solver;
318 template<
class GFS,
class M,
class X,
class Y>
319 class RestrictedSuperLUSubdomainSolver :
public Dune::Preconditioner<X,Y>
321 typedef typename M::Container ISTLM;
325 typedef X domain_type;
327 typedef Y range_type;
329 typedef typename X::ElementType field_type;
338 RestrictedSuperLUSubdomainSolver (
const GFS& gfs_,
const M& A_,
339 const ISTL::ParallelHelper<GFS>& helper_)
340 : gfs(gfs_), solver(Backend::
native(A_),false), helper(helper_)
346 virtual void pre (X& x, Y& b)
override {}
351 virtual void apply (X& v,
const Y& d)
override
353 using Backend::native;
354 Dune::InverseOperatorResult stat;
357 if (gfs.gridView().comm().size()>1)
359 helper.maskForeignDOFs(
native(v));
360 AddDataHandle<GFS,X> adddh(gfs,v);
361 gfs.gridView().communicate(adddh,Dune::InteriorBorder_All_Interface,Dune::ForwardCommunication);
365 SolverCategory::Category category()
const override
367 return SolverCategory::overlapping;
373 virtual void post (X& x)
override {}
377 Dune::SuperLU<ISTLM> solver;
378 const ISTL::ParallelHelper<GFS>& helper;
382 template<
typename GFS>
387 : gfs(gfs_), helper(gfs_)
395 typename X::ElementType
dot (
const X& x,
const X& y)
const
398 typename X::ElementType sum = helper.disjointDot(x,y);
401 return gfs.gridView().comm().sum(sum);
408 typename Dune::template FieldTraits<typename X::ElementType >::real_type
norm (
const X& x)
const
411 return sqrt(
static_cast<double>(this->
dot(x,x)));
431 template<
typename GFS,
typename X>
433 :
public ScalarProduct<X>
438 return SolverCategory::overlapping;
442 : implementation(implementation_)
445 virtual typename X::Container::field_type
dot(
const X& x,
const X& y)
const override
447 return implementation.dot(x,y);
450 virtual typename X::Container::field_type
norm (
const X& x)
const override
453 return sqrt(
static_cast<double>(this->
dot(x,x)));
460 template<
class GFS,
class C,
461 template<
class,
class,
class,
int>
class Preconditioner,
462 template<
class>
class Solver>
476 int steps_=5,
int verbose_=1)
487 template<
class M,
class V,
class W>
488 void apply(M& A, V& z, W& r,
typename Dune::template FieldTraits<typename V::ElementType >::real_type reduction)
496 typedef Preconditioner<
502 SeqPrec seqprec(native(A),steps,1.0);
506 if (gfs.gridView().comm().rank()==0) verb=verbose;
507 Solver<V> solver(pop,psp,wprec,reduction,maxiter,verb);
508 Dune::InverseOperatorResult stat;
509 solver.apply(z,r,stat);
525 template<
class GFS,
class C,
526 template<
class>
class Solver>
549 template<
class M,
class V,
class W>
550 void apply(M& A, V& z, W& r,
typename Dune::template FieldTraits<typename V::ElementType >::real_type reduction)
564 SeqPrec seqprec(native(A),1.0);
568 if (gfs.gridView().comm().rank()==0) verb=verbose;
569 Solver<V> solver(pop,psp,wprec,reduction,maxiter,verb);
570 Dune::InverseOperatorResult stat;
571 solver.apply(z,r,stat);
587 template<
class GFS,
class C,
588 template<
class>
class Solver>
612 template<
class M,
class V,
class W>
613 void apply(M& A, V& z, W& r,
typename Dune::template FieldTraits<typename V::ElementType >::real_type reduction)
627 SeqPrec seqprec(native(A),n,1.0);
631 if (gfs.gridView().comm().rank()==0) verb=verbose;
632 Solver<V> solver(pop,psp,wprec,reduction,maxiter,verb);
633 Dune::InverseOperatorResult stat;
634 solver.apply(z,r,stat);
658 template<
class GFS,
class CC>
672 int steps=5,
int verbose=1)
681 template<
class GFS,
class CC>
702 template<
class GFS,
class CC>
724 template<
class GFS,
class CC>
738 int steps=5,
int verbose=1)
748 template<
class GFS,
class CC>
772 template<
class M,
class V,
class W>
773 void apply(M& A, V& z, W& r,
typename Dune::template FieldTraits<typename V::ElementType >::real_type reduction)
787 SeqPrec seqprec(native(A),1.0);
791 if (gfs.gridView().comm().rank()==0) verb=verbose;
792 RestartedGMResSolver<V> solver(pop,psp,wprec,reduction,restart,maxiter,verb);
793 Dune::InverseOperatorResult stat;
794 solver.apply(z,r,stat);
813 template<
class GFS,
class C,
template<
typename>
class Solver>
837 template<
class M,
class V,
class W>
838 void apply(M& A, V& z, W& r,
typename Dune::template FieldTraits<typename V::ElementType >::real_type reduction)
845 typedef SuperLUSubdomainSolver<GFS,M,V,W> PREC;
848 if (gfs.gridView().comm().rank()==0) verb=verbose;
849 Solver<V> solver(pop,psp,prec,reduction,maxiter,verb);
850 Dune::InverseOperatorResult stat;
851 solver.apply(z,r,stat);
858 std::cout <<
"No superLU support, please install and configure it." << std::endl;
871 template<
class GFS,
class C,
template<
typename>
class Solver>
895 template<
class M,
class V,
class W>
896 void apply(M& A, V& z, W& r,
typename Dune::template FieldTraits<typename V::ElementType >::real_type reduction)
902#if HAVE_SUITESPARSE_UMFPACK || DOXYGEN
906 if (gfs.gridView().comm().rank()==0) verb=verbose;
907 Solver<V> solver(pop,psp,prec,reduction,maxiter,verb);
908 Dune::InverseOperatorResult stat;
909 solver.apply(z,r,stat);
916 std::cout <<
"No UMFPack support, please install and configure it." << std::endl;
934 template<
class GFS,
class CC>
958 template<
class GFS,
class CC>
972 unsigned maxiter_=5000,
983 template<
class GFS,
class CC>
997 unsigned maxiter_=5000,
1029 typename V::ElementType
norm(
const V& v)
const
1032 (AlwaysFalse<V>::value,
1033 "ISTLBackend_OVLP_ExplicitDiagonal::norm() should not be "
1034 "neccessary, so we skipped the implementation. If you have a "
1035 "scenario where you need it, please implement it or report back to "
1046 template<
class M,
class V,
class W>
1047 void apply(M& A, V& z, W& r,
typename Dune::template FieldTraits<typename W::ElementType >::real_type reduction)
1055 > jac(native(A),1,1.0);
1056 jac.pre(native(z),native(r));
1057 jac.apply(native(z),native(r));
1058 jac.post(native(z));
1059 if (gfs.gridView().comm().size()>1)
1062 gfs.gridView().communicate(copydh,Dune::InteriorBorder_All_Interface,Dune::ForwardCommunication);
1076 template<
class GO,
int s,
template<
class,
class,
class,
int>
class Preconditioner,
1077 template<
class>
class Solver>
1080 typedef typename GO::Traits::TrialGridFunctionSpace GFS;
1082 typedef typename GO::Traits::Jacobian M;
1084 typedef typename GO::Traits::Domain V;
1088 typedef Preconditioner<MatrixType,VectorType,VectorType,1> Smoother;
1089 typedef Dune::BlockPreconditioner<VectorType,VectorType,Comm,Smoother> ParSmoother;
1090 typedef Dune::OverlappingSchwarzOperator<MatrixType,VectorType,VectorType,Comm> Operator;
1092 typedef Preconditioner<MatrixType,VectorType,VectorType,1> ParSmoother;
1093 typedef Dune::MatrixAdapter<MatrixType,VectorType,VectorType> Operator;
1095 typedef typename Dune::Amg::SmootherTraits<ParSmoother>::Arguments SmootherArgs;
1096 typedef Dune::Amg::AMG<Operator,VectorType,ParSmoother,Comm> AMG;
1098 typedef typename V::ElementType RF;
1109 int verbose_=1,
bool reuse_=
false,
1110 bool usesuperlu_=
true)
1111 : gfs(gfs_), phelper(gfs,verbose_), maxiter(maxiter_), params(15,2000),
1112 verbose(verbose_), reuse(reuse_), firstapply(true),
1113 usesuperlu(usesuperlu_)
1115 params.setDefaultValuesIsotropic(GFS::Traits::GridViewType::Traits::Grid::dimension);
1116 params.setDebugLevel(verbose_);
1118 if (gfs.gridView().comm().rank() == 0 && usesuperlu ==
true)
1120 std::cout <<
"WARNING: You are using AMG without SuperLU!"
1121 <<
" Please consider installing SuperLU,"
1122 <<
" or set the usesuperlu flag to false"
1123 <<
" to suppress this warning." << std::endl;
1165 typename V::ElementType
norm (
const V& v)
const
1168 PSP psp(gfs,phelper);
1179 void apply(M& A, V& z, V& r,
typename Dune::template FieldTraits<typename V::ElementType >::real_type reduction)
1182 Comm oocc(gfs.gridView().comm());
1184 typedef Dune::Amg::CoarsenCriterion<Dune::Amg::SymmetricCriterion<MatrixType,
1185 Dune::Amg::FirstDiagonal> > Criterion;
1188 Operator oop(mat, oocc);
1189 Dune::OverlappingSchwarzScalarProduct<VectorType,Comm> sp(oocc);
1192 Dune::SeqScalarProduct<VectorType> sp;
1194 SmootherArgs smootherArgs;
1195 smootherArgs.iterations = 1;
1196 smootherArgs.relaxationFactor = 1;
1197 Criterion criterion(params);
1202 if (gfs.gridView().comm().rank()==0) verb=verbose;
1204 if (reuse==
false || firstapply==
true){
1205 amg.reset(
new AMG(oop, criterion, smootherArgs, oocc));
1207 stats.
tsetup = watch.elapsed();
1208 stats.
levels = amg->maxlevels();
1212 Solver<VectorType> solver(oop,sp,*amg,RF(reduction),maxiter,verb);
1213 Dune::InverseOperatorResult stat;
1216 stats.
tsolve= watch.elapsed();
1242 std::shared_ptr<AMG> amg;
1255 template<
class GO,
int s=96>
1259 typedef typename GO::Traits::TrialGridFunctionSpace GFS;
1271 int verbose_=1,
bool reuse_=
false,
1272 bool usesuperlu_=
true)
1274 (gfs_, maxiter_, verbose_, reuse_, usesuperlu_)
1284 template<
class GO,
int s=96>
1288 typedef typename GO::Traits::TrialGridFunctionSpace GFS;
1300 int verbose_=1,
bool reuse_=
false,
1301 bool usesuperlu_=
true)
1303 (gfs_, maxiter_, verbose_, reuse_, usesuperlu_)
1313 template<
class GO,
int s=96>
1317 typedef typename GO::Traits::TrialGridFunctionSpace GFS;
1329 int verbose_=1,
bool reuse_=
false,
1330 bool usesuperlu_=
true)
1332 (gfs_, maxiter_, verbose_, reuse_, usesuperlu_)
const std::string s
Definition: function.hh:843
void set_constrained_dofs(const CG &cg, typename XG::ElementType x, XG &xg)
construct constraints from given boundary condition function
Definition: constraints.hh:796
For backward compatibility – Do not use this!
Definition: adaptivity.hh:28
typename impl::BackendVectorSelector< GridFunctionSpace, FieldType >::Type Vector
alias of the return type of BackendVectorSelector
Definition: backend/interface.hh:106
std::enable_if< std::is_base_of< impl::WrapperBase, T >::value, Native< T > & >::type native(T &t)
Definition: backend/interface.hh:192
typename native_type< T >::type Native
Alias of the native container type associated with T or T itself if it is not a backend wrapper.
Definition: backend/interface.hh:176
Definition: ovlpistlsolverbackend.hh:43
X::ElementType field_type
Definition: ovlpistlsolverbackend.hh:49
virtual const M & getmat() const override
get matrix via *
Definition: ovlpistlsolverbackend.hh:77
virtual void apply(const domain_type &x, range_type &y) const override
apply operator to x:
Definition: ovlpistlsolverbackend.hh:56
Y range_type
Definition: ovlpistlsolverbackend.hh:48
OverlappingOperator(const CC &cc_, const M &A)
Definition: ovlpistlsolverbackend.hh:51
X domain_type
Definition: ovlpistlsolverbackend.hh:47
SolverCategory::Category category() const override
Definition: ovlpistlsolverbackend.hh:71
M matrix_type
export types
Definition: ovlpistlsolverbackend.hh:46
virtual void applyscaleadd(field_type alpha, const domain_type &x, range_type &y) const override
apply operator to x, scale and add:
Definition: ovlpistlsolverbackend.hh:64
Definition: ovlpistlsolverbackend.hh:92
SolverCategory::Category category() const override
Definition: ovlpistlsolverbackend.hh:126
X::ElementType field_type
Definition: ovlpistlsolverbackend.hh:96
X domain_type
export types
Definition: ovlpistlsolverbackend.hh:95
OverlappingScalarProduct(const GFS &gfs_, const ISTL::ParallelHelper< GFS > &helper_)
Constructor needs to know the grid function space.
Definition: ovlpistlsolverbackend.hh:100
virtual field_type dot(const X &x, const X &y) const override
Dot product of two vectors. It is assumed that the vectors are consistent on the interior+border part...
Definition: ovlpistlsolverbackend.hh:109
virtual double norm(const X &x) const override
Norm of a right-hand side vector. The vector must be consistent on the interior+border partition.
Definition: ovlpistlsolverbackend.hh:121
Definition: ovlpistlsolverbackend.hh:141
virtual void pre(domain_type &x, range_type &b) override
Prepare the preconditioner.
Definition: ovlpistlsolverbackend.hh:157
Dune::PDELab::Backend::Vector< GFS, typename P::domain_type::field_type > domain_type
The domain type of the preconditioner.
Definition: ovlpistlsolverbackend.hh:144
OverlappingWrappedPreconditioner(const GFS &gfs_, P &prec_, const CC &cc_, const ISTL::ParallelHelper< GFS > &helper_)
Constructor.
Definition: ovlpistlsolverbackend.hh:149
SolverCategory::Category category() const override
Definition: ovlpistlsolverbackend.hh:175
virtual void post(domain_type &x) override
Clean up.
Definition: ovlpistlsolverbackend.hh:183
virtual void apply(domain_type &v, const range_type &d) override
Apply the preconditioner.
Definition: ovlpistlsolverbackend.hh:165
Dune::PDELab::Backend::Vector< GFS, typename P::range_type::field_type > range_type
The range type of the preconditioner.
Definition: ovlpistlsolverbackend.hh:146
Definition: ovlpistlsolverbackend.hh:200
X::ElementType field_type
The field type of the preconditioner.
Definition: ovlpistlsolverbackend.hh:209
virtual void apply(X &v, const Y &d) override
Apply the precondioner.
Definition: ovlpistlsolverbackend.hh:229
Y range_type
The range type of the preconditioner.
Definition: ovlpistlsolverbackend.hh:207
virtual void post(X &x) override
Clean up.
Definition: ovlpistlsolverbackend.hh:249
UMFPackSubdomainSolver(const GFS &gfs_, const M &A_)
Constructor.
Definition: ovlpistlsolverbackend.hh:217
virtual void pre(X &x, Y &b) override
Prepare the preconditioner.
Definition: ovlpistlsolverbackend.hh:224
X domain_type
The domain type of the preconditioner.
Definition: ovlpistlsolverbackend.hh:205
SolverCategory::Category category() const override
Definition: ovlpistlsolverbackend.hh:241
Definition: ovlpistlsolverbackend.hh:384
ISTL::ParallelHelper< GFS > & parallelHelper()
Definition: ovlpistlsolverbackend.hh:420
Dune::template FieldTraits< typenameX::ElementType >::real_type norm(const X &x) const
Norm of a right-hand side vector. The vector must be consistent on the interior+border partition.
Definition: ovlpistlsolverbackend.hh:408
OVLPScalarProductImplementation(const GFS &gfs_)
Definition: ovlpistlsolverbackend.hh:386
const ISTL::ParallelHelper< GFS > & parallelHelper() const
Definition: ovlpistlsolverbackend.hh:414
X::ElementType dot(const X &x, const X &y) const
Dot product of two vectors. It is assumed that the vectors are consistent on the interior+border part...
Definition: ovlpistlsolverbackend.hh:395
Definition: ovlpistlsolverbackend.hh:434
OVLPScalarProduct(const OVLPScalarProductImplementation< GFS > &implementation_)
Definition: ovlpistlsolverbackend.hh:441
virtual X::Container::field_type norm(const X &x) const override
Definition: ovlpistlsolverbackend.hh:450
virtual X::Container::field_type dot(const X &x, const X &y) const override
Definition: ovlpistlsolverbackend.hh:445
SolverCategory::Category category() const override
Definition: ovlpistlsolverbackend.hh:436
Definition: ovlpistlsolverbackend.hh:465
ISTLBackend_OVLP_Base(const GFS &gfs_, const C &c_, unsigned maxiter_=5000, int steps_=5, int verbose_=1)
make a linear solver object
Definition: ovlpistlsolverbackend.hh:475
void apply(M &A, V &z, W &r, typename Dune::template FieldTraits< typename V::ElementType >::real_type reduction)
solve the given linear system
Definition: ovlpistlsolverbackend.hh:488
Definition: ovlpistlsolverbackend.hh:529
void apply(M &A, V &z, W &r, typename Dune::template FieldTraits< typename V::ElementType >::real_type reduction)
solve the given linear system
Definition: ovlpistlsolverbackend.hh:550
ISTLBackend_OVLP_ILU0_Base(const GFS &gfs_, const C &c_, unsigned maxiter_=5000, int verbose_=1)
make a linear solver object
Definition: ovlpistlsolverbackend.hh:538
Definition: ovlpistlsolverbackend.hh:591
ISTLBackend_OVLP_ILUn_Base(const GFS &gfs_, const C &c_, int n_=1, unsigned maxiter_=5000, int verbose_=1)
make a linear solver object
Definition: ovlpistlsolverbackend.hh:601
void apply(M &A, V &z, W &r, typename Dune::template FieldTraits< typename V::ElementType >::real_type reduction)
solve the given linear system
Definition: ovlpistlsolverbackend.hh:613
Overlapping parallel BiCGStab solver with SSOR preconditioner.
Definition: ovlpistlsolverbackend.hh:661
ISTLBackend_OVLP_BCGS_SSORk(const GFS &gfs, const CC &cc, unsigned maxiter=5000, int steps=5, int verbose=1)
make a linear solver object
Definition: ovlpistlsolverbackend.hh:671
Overlapping parallel BiCGStab solver with ILU0 preconditioner.
Definition: ovlpistlsolverbackend.hh:684
ISTLBackend_OVLP_BCGS_ILU0(const GFS &gfs, const CC &cc, unsigned maxiter=5000, int verbose=1)
make a linear solver object
Definition: ovlpistlsolverbackend.hh:693
Overlapping parallel BiCGStab solver with ILU0 preconditioner.
Definition: ovlpistlsolverbackend.hh:705
ISTLBackend_OVLP_BCGS_ILUn(const GFS &gfs, const CC &cc, int n=1, unsigned maxiter=5000, int verbose=1)
make a linear solver object
Definition: ovlpistlsolverbackend.hh:715
Overlapping parallel CGS solver with SSOR preconditioner.
Definition: ovlpistlsolverbackend.hh:727
ISTLBackend_OVLP_CG_SSORk(const GFS &gfs, const CC &cc, unsigned maxiter=5000, int steps=5, int verbose=1)
make a linear solver object
Definition: ovlpistlsolverbackend.hh:737
Overlapping parallel restarted GMRes solver with ILU0 preconditioner.
Definition: ovlpistlsolverbackend.hh:751
ISTLBackend_OVLP_GMRES_ILU0(const GFS &gfs_, const CC &cc_, unsigned maxiter_=5000, int verbose_=1, int restart_=20)
make a linear solver object
Definition: ovlpistlsolverbackend.hh:760
void apply(M &A, V &z, W &r, typename Dune::template FieldTraits< typename V::ElementType >::real_type reduction)
solve the given linear system
Definition: ovlpistlsolverbackend.hh:773
Definition: ovlpistlsolverbackend.hh:816
void apply(M &A, V &z, W &r, typename Dune::template FieldTraits< typename V::ElementType >::real_type reduction)
solve the given linear system
Definition: ovlpistlsolverbackend.hh:838
ISTLBackend_OVLP_SuperLU_Base(const GFS &gfs_, const C &c_, unsigned maxiter_=5000, int verbose_=1)
make a linear solver object
Definition: ovlpistlsolverbackend.hh:825
Definition: ovlpistlsolverbackend.hh:874
ISTLBackend_OVLP_UMFPack_Base(const GFS &gfs_, const C &c_, unsigned maxiter_=5000, int verbose_=1)
make a linear solver object
Definition: ovlpistlsolverbackend.hh:883
void apply(M &A, V &z, W &r, typename Dune::template FieldTraits< typename V::ElementType >::real_type reduction)
solve the given linear system
Definition: ovlpistlsolverbackend.hh:896
Overlapping parallel BiCGStab solver with SuperLU preconditioner.
Definition: ovlpistlsolverbackend.hh:937
ISTLBackend_OVLP_BCGS_SuperLU(const GFS &gfs_, const CC &cc_, unsigned maxiter_=5000, int verbose_=1)
make a linear solver object
Definition: ovlpistlsolverbackend.hh:947
Overlapping parallel CG solver with SuperLU preconditioner.
Definition: ovlpistlsolverbackend.hh:961
ISTLBackend_OVLP_CG_SuperLU(const GFS &gfs_, const CC &cc_, unsigned maxiter_=5000, int verbose_=1)
make a linear solver object
Definition: ovlpistlsolverbackend.hh:971
Overlapping parallel CG solver with UMFPack preconditioner.
Definition: ovlpistlsolverbackend.hh:986
ISTLBackend_OVLP_CG_UMFPack(const GFS &gfs_, const CC &cc_, unsigned maxiter_=5000, int verbose_=1)
make a linear solver object
Definition: ovlpistlsolverbackend.hh:996
Solver to be used for explicit time-steppers with (block-)diagonal mass matrix.
Definition: ovlpistlsolverbackend.hh:1010
ISTLBackend_OVLP_ExplicitDiagonal(const GFS &gfs_)
make a linear solver object
Definition: ovlpistlsolverbackend.hh:1016
V::ElementType norm(const V &v) const
compute global norm of a vector
Definition: ovlpistlsolverbackend.hh:1029
ISTLBackend_OVLP_ExplicitDiagonal(const ISTLBackend_OVLP_ExplicitDiagonal &other_)
Definition: ovlpistlsolverbackend.hh:1020
void apply(M &A, V &z, W &r, typename Dune::template FieldTraits< typename W::ElementType >::real_type reduction)
solve the given linear system
Definition: ovlpistlsolverbackend.hh:1047
Definition: ovlpistlsolverbackend.hh:1079
const Parameters & parameters() const
Get the parameters describing the behaviuour of AMG.
Definition: ovlpistlsolverbackend.hh:1144
V::ElementType norm(const V &v) const
compute global norm of a vector
Definition: ovlpistlsolverbackend.hh:1165
ISTLBackend_AMG(const GFS &gfs_, unsigned maxiter_=5000, int verbose_=1, bool reuse_=false, bool usesuperlu_=true)
Definition: ovlpistlsolverbackend.hh:1108
void apply(M &A, V &z, V &r, typename Dune::template FieldTraits< typename V::ElementType >::real_type reduction)
solve the given linear system
Definition: ovlpistlsolverbackend.hh:1179
void setReuse(bool reuse_)
Set whether the AMG should be reused again during call to apply().
Definition: ovlpistlsolverbackend.hh:1150
void setParameters(const Parameters ¶ms_)
set AMG parameters
Definition: ovlpistlsolverbackend.hh:1132
const ISTLAMGStatistics & statistics() const
Get statistics of the AMG solver (no of levels, timings).
Definition: ovlpistlsolverbackend.hh:1228
Dune::Amg::Parameters Parameters
Parameters object to customize matrix hierachy building.
Definition: ovlpistlsolverbackend.hh:1105
bool getReuse() const
Return whether the AMG is reused during call to apply()
Definition: ovlpistlsolverbackend.hh:1156
Overlapping parallel conjugate gradient solver preconditioned with AMG smoothed by SSOR.
Definition: ovlpistlsolverbackend.hh:1258
ISTLBackend_CG_AMG_SSOR(const GFS &gfs_, unsigned maxiter_=5000, int verbose_=1, bool reuse_=false, bool usesuperlu_=true)
Constructor.
Definition: ovlpistlsolverbackend.hh:1270
Overlapping parallel BiCGStab solver preconditioned with AMG smoothed by SSOR.
Definition: ovlpistlsolverbackend.hh:1287
ISTLBackend_BCGS_AMG_SSOR(const GFS &gfs_, unsigned maxiter_=5000, int verbose_=1, bool reuse_=false, bool usesuperlu_=true)
Constructor.
Definition: ovlpistlsolverbackend.hh:1299
Overlapping parallel BiCGStab solver preconditioned with AMG smoothed by ILU0.
Definition: ovlpistlsolverbackend.hh:1316
ISTLBackend_BCGS_AMG_ILU0(const GFS &gfs_, unsigned maxiter_=5000, int verbose_=1, bool reuse_=false, bool usesuperlu_=true)
Constructor.
Definition: ovlpistlsolverbackend.hh:1328
Definition: parallelhelper.hh:51
void createIndexSetAndProjectForAMG(MatrixType &m, Comm &c)
Makes the matrix consistent and creates the parallel information for AMG.
Dune::Amg::SequentialInformation type
Definition: parallelhelper.hh:429
Class providing some statistics of the AMG solver.
Definition: seqistlsolverbackend.hh:701
double tprepare
The needed for computing the parallel information and for adapting the linear system.
Definition: seqistlsolverbackend.hh:706
double tsetup
The time needed for building the AMG hierarchy (coarsening).
Definition: seqistlsolverbackend.hh:712
double tsolve
The time spent in solving the system (without building the hierarchy.
Definition: seqistlsolverbackend.hh:710
bool directCoarseLevelSolver
True if a direct solver was used on the coarset level.
Definition: seqistlsolverbackend.hh:716
int levels
the number of levels in the AMG hierarchy.
Definition: seqistlsolverbackend.hh:708
RFType conv_rate
Definition: solver.hh:36
bool converged
Definition: solver.hh:32
RFType reduction
Definition: solver.hh:35
unsigned int iterations
Definition: solver.hh:33
double elapsed
Definition: solver.hh:34
Dune::PDELab::LinearSolverResult< double > res
Definition: solver.hh:63
Definition: genericdatahandle.hh:667
Definition: genericdatahandle.hh:730
Definition: recipe-operator-splitting.cc:108