3#ifndef DUNE_PDELAB_BACKEND_ISTL_OVLPISTLSOLVERBACKEND_HH
4#define DUNE_PDELAB_BACKEND_ISTL_OVLPISTLSOLVERBACKEND_HH
10#include <dune/istl/solvercategory.hh>
16#include <dune/istl/paamg/pinfo.hh>
20#include <dune/pdelab/constraints/common/constraints.hh>
21#include <dune/pdelab/gridfunctionspace/genericdatahandle.hh>
22#include <dune/pdelab/backend/istl/vector.hh>
23#include <dune/pdelab/backend/istl/bcrsmatrix.hh>
24#include <dune/pdelab/backend/istl/parallelhelper.hh>
25#include <dune/pdelab/backend/istl/seqistlsolverbackend.hh>
40 template<
class CC,
class M,
class X,
class Y>
41 class OverlappingOperator
46 typedef M matrix_type;
47 typedef X domain_type;
49 typedef typename X::ElementType field_type;
51 OverlappingOperator (
const CC& cc_,
const M& A)
56 virtual void apply (
const domain_type& x, range_type& y)
const override
58 using Backend::native;
59 native(_A_).mv(native(x),native(y));
64 virtual void applyscaleadd (field_type alpha,
const domain_type& x, range_type& y)
const override
66 using Backend::native;
67 native(_A_).usmv(alpha,native(x),native(y));
77 virtual const M& getmat ()
const override
89 template<
class GFS,
class X>
90 class OverlappingScalarProduct
95 typedef X domain_type;
96 typedef typename X::ElementType field_type;
100 OverlappingScalarProduct (
const GFS& gfs_,
const ISTL::ParallelHelper<GFS>& helper_)
101 : gfs(gfs_), helper(helper_)
109 virtual field_type
dot (
const X& x,
const X& y)
const override
112 field_type sum = helper.disjointDot(x,y);
115 return gfs.gridView().comm().sum(sum);
121 virtual double norm (
const X& x)
const override
124 return sqrt(
static_cast<double>(this->
dot(x,x)));
134 const ISTL::ParallelHelper<GFS>& helper;
138 template<
class CC,
class GFS,
class P>
139 class OverlappingWrappedPreconditioner
140 :
public Dune::Preconditioner<Dune::PDELab::Backend::Vector<GFS,typename P::domain_type::field_type>,
141 Dune::PDELab::Backend::Vector<GFS,typename P::range_type::field_type>>
145 using domain_type = Dune::PDELab::Backend::Vector<GFS,typename P::domain_type::field_type>;
147 using range_type = Dune::PDELab::Backend::Vector<GFS,typename P::range_type::field_type>;
150 OverlappingWrappedPreconditioner (
const GFS& gfs_, P& prec_,
const CC& cc_,
151 const ISTL::ParallelHelper<GFS>& helper_)
152 : gfs(gfs_), prec(prec_), cc(cc_), helper(helper_)
158 virtual void pre (domain_type& x, range_type& b)
override
166 virtual void apply (domain_type& v,
const range_type& d)
override
170 prec.apply(Backend::native(v),Backend::native(dd));
171 Dune::PDELab::AddDataHandle<GFS,domain_type> adddh(gfs,v);
172 if (gfs.gridView().comm().size()>1)
184 virtual void post (domain_type& x)
override
186 prec.post(Backend::native(x));
193 const ISTL::ParallelHelper<GFS>& helper;
197#if HAVE_SUITESPARSE_UMFPACK || DOXYGEN
199 template<
class GFS,
class M,
class X,
class Y>
202 typedef Backend::Native<M> ISTLM;
206 typedef X domain_type;
208 typedef Y range_type;
210 typedef typename X::ElementType field_type;
218 UMFPackSubdomainSolver (
const GFS& gfs_,
const M& A_)
219 : gfs(gfs_), solver(Backend::native(A_),false)
225 virtual void pre (X& x, Y& b)
override {}
230 virtual void apply (X& v,
const Y& d)
override
234 solver.apply(Backend::native(v),Backend::native(b),stat);
235 if (gfs.gridView().comm().size()>1)
237 AddDataHandle<GFS,X> adddh(gfs,v);
250 virtual void post (X& x)
override {}
260 template<
class GFS,
class M,
class X,
class Y>
263 typedef Backend::Native<M> ISTLM;
267 typedef X domain_type;
269 typedef Y range_type;
271 typedef typename X::ElementType field_type;
279 SuperLUSubdomainSolver (
const GFS& gfs_,
const M& A_)
280 : gfs(gfs_), solver(Backend::native(A_),false)
286 virtual void pre (X& x, Y& b)
override {}
291 virtual void apply (X& v,
const Y& d)
override
295 solver.apply(Backend::native(v),Backend::native(b),stat);
296 if (gfs.gridView().comm().size()>1)
298 AddDataHandle<GFS,X> adddh(gfs,v);
311 virtual void post (X& x)
override {}
319 template<
class GFS,
class M,
class X,
class Y>
322 typedef typename M::Container ISTLM;
326 typedef X domain_type;
328 typedef Y range_type;
330 typedef typename X::ElementType field_type;
339 RestrictedSuperLUSubdomainSolver (
const GFS& gfs_,
const M& A_,
340 const ISTL::ParallelHelper<GFS>& helper_)
341 : gfs(gfs_), solver(Backend::native(A_),false), helper(helper_)
347 virtual void pre (X& x, Y& b)
override {}
352 virtual void apply (X& v,
const Y& d)
override
354 using Backend::native;
357 solver.apply(native(v),native(b),stat);
358 if (gfs.gridView().comm().size()>1)
360 helper.maskForeignDOFs(native(v));
361 AddDataHandle<GFS,X> adddh(gfs,v);
374 virtual void post (X& x)
override {}
379 const ISTL::ParallelHelper<GFS>& helper;
383 template<
typename GFS>
384 class OVLPScalarProductImplementation
387 OVLPScalarProductImplementation(
const GFS& gfs_)
388 : gfs(gfs_), helper(gfs_)
396 typename X::ElementType
dot (
const X& x,
const X& y)
const
399 typename X::ElementType sum = helper.disjointDot(x,y);
402 return gfs.gridView().comm().sum(sum);
409 typename Dune::template FieldTraits<typename X::ElementType >::real_type norm (
const X& x)
const
412 return sqrt(
static_cast<double>(this->
dot(x,x)));
415 const ISTL::ParallelHelper<GFS>& parallelHelper()
const
421 ISTL::ParallelHelper<GFS>& parallelHelper()
428 ISTL::ParallelHelper<GFS> helper;
432 template<
typename GFS,
typename X>
433 class OVLPScalarProduct
434 :
public ScalarProduct<X>
442 OVLPScalarProduct(
const OVLPScalarProductImplementation<GFS>& implementation_)
443 : implementation(implementation_)
446 virtual typename X::Container::field_type
dot(
const X& x,
const X& y)
const override
448 return implementation.dot(x,y);
451 virtual typename X::Container::field_type norm (
const X& x)
const override
454 return sqrt(
static_cast<double>(this->
dot(x,x)));
458 const OVLPScalarProductImplementation<GFS>& implementation;
461 template<
class GFS,
class C,
462 template<
class,
class,
class,
int>
class Preconditioner,
463 template<
class>
class Solver>
464 class ISTLBackend_OVLP_Base
465 :
public OVLPScalarProductImplementation<GFS>,
public LinearResultStorage
476 ISTLBackend_OVLP_Base (
const GFS& gfs_,
const C& c_,
unsigned maxiter_=5000,
477 int steps_=5,
int verbose_=1)
478 : OVLPScalarProductImplementation<GFS>(gfs_), gfs(gfs_), c(c_), maxiter(maxiter_), steps(steps_), verbose(verbose_)
488 template<
class M,
class V,
class W>
489 void apply(M& A, V& z, W& r,
typename Dune::template FieldTraits<typename V::ElementType >::real_type reduction)
491 using Backend::Native;
492 using Backend::native;
493 typedef OverlappingOperator<C,M,V,W> POP;
495 typedef OVLPScalarProduct<GFS,V> PSP;
497 typedef Preconditioner<
503 SeqPrec seqprec(native(A),steps,1.0);
504 typedef OverlappingWrappedPreconditioner<C,GFS,SeqPrec> WPREC;
505 WPREC wprec(gfs,seqprec,c,this->parallelHelper());
507 if (gfs.gridView().comm().rank()==0) verb=verbose;
508 Solver<V> solver(pop,psp,wprec,reduction,maxiter,verb);
510 solver.apply(z,r,stat);
526 template<
class GFS,
class C,
527 template<
class>
class Solver>
528 class ISTLBackend_OVLP_ILU0_Base
529 :
public OVLPScalarProductImplementation<GFS>,
public LinearResultStorage
539 ISTLBackend_OVLP_ILU0_Base (
const GFS& gfs_,
const C& c_,
unsigned maxiter_=5000,
int verbose_=1)
540 : OVLPScalarProductImplementation<GFS>(gfs_), gfs(gfs_), c(c_), maxiter(maxiter_), verbose(verbose_)
550 template<
class M,
class V,
class W>
551 void apply(M& A, V& z, W& r,
typename Dune::template FieldTraits<typename V::ElementType >::real_type reduction)
553 using Backend::Native;
554 using Backend::native;
555 typedef OverlappingOperator<C,M,V,W> POP;
557 typedef OVLPScalarProduct<GFS,V> PSP;
565 SeqPrec seqprec(native(A),1.0);
566 typedef OverlappingWrappedPreconditioner<C,GFS,SeqPrec> WPREC;
567 WPREC wprec(gfs,seqprec,c,this->parallelHelper());
569 if (gfs.gridView().comm().rank()==0) verb=verbose;
570 Solver<V> solver(pop,psp,wprec,reduction,maxiter,verb);
572 solver.apply(z,r,stat);
588 template<
class GFS,
class C,
589 template<
class>
class Solver>
590 class ISTLBackend_OVLP_ILUn_Base
591 :
public OVLPScalarProductImplementation<GFS>,
public LinearResultStorage
602 ISTLBackend_OVLP_ILUn_Base (
const GFS& gfs_,
const C& c_,
int n_=1,
unsigned maxiter_=5000,
int verbose_=1)
603 : OVLPScalarProductImplementation<GFS>(gfs_), gfs(gfs_), c(c_), n(n_), maxiter(maxiter_), verbose(verbose_)
613 template<
class M,
class V,
class W>
614 void apply(M& A, V& z, W& r,
typename Dune::template FieldTraits<typename V::ElementType >::real_type reduction)
616 using Backend::Native;
617 using Backend::native;
618 typedef OverlappingOperator<C,M,V,W> POP;
620 typedef OVLPScalarProduct<GFS,V> PSP;
628 SeqPrec seqprec(native(A),n,1.0);
629 typedef OverlappingWrappedPreconditioner<C,GFS,SeqPrec> WPREC;
630 WPREC wprec(gfs,seqprec,c,this->parallelHelper());
632 if (gfs.gridView().comm().rank()==0) verb=verbose;
633 Solver<V> solver(pop,psp,wprec,reduction,maxiter,verb);
635 solver.apply(z,r,stat);
659 template<
class GFS,
class CC>
661 :
public ISTLBackend_OVLP_Base<GFS,CC,Dune::SeqSSOR, Dune::BiCGSTABSolver>
673 int steps=5,
int verbose=1)
682 template<
class GFS,
class CC>
684 :
public ISTLBackend_OVLP_ILU0_Base<GFS,CC,Dune::BiCGSTABSolver>
703 template<
class GFS,
class CC>
705 :
public ISTLBackend_OVLP_ILUn_Base<GFS,CC,Dune::BiCGSTABSolver>
717 : ISTLBackend_OVLP_ILUn_Base<GFS,CC,
Dune::
BiCGSTABSolver>(gfs, cc, n, maxiter, verbose)
725 template<
class GFS,
class CC>
727 :
public ISTLBackend_OVLP_Base<GFS,CC,Dune::SeqSSOR, Dune::CGSolver>
739 int steps=5,
int verbose=1)
749 template<
class GFS,
class CC>
751 :
public OVLPScalarProductImplementation<GFS>,
public LinearResultStorage
763 : OVLPScalarProductImplementation<GFS>(gfs_), gfs(gfs_), cc(cc_), maxiter(maxiter_), verbose(verbose_),
773 template<
class M,
class V,
class W>
774 void apply(M& A, V& z, W& r,
typename Dune::template FieldTraits<typename V::ElementType >::real_type reduction)
776 using Backend::Native;
777 using Backend::native;
778 typedef OverlappingOperator<CC,M,V,W> POP;
780 typedef OVLPScalarProduct<GFS,V> PSP;
788 SeqPrec seqprec(native(A),1.0);
789 typedef OverlappingWrappedPreconditioner<CC,GFS,SeqPrec> WPREC;
790 WPREC wprec(gfs,seqprec,cc,this->parallelHelper());
792 if (gfs.gridView().comm().rank()==0) verb=verbose;
795 solver.
apply(z,r,stat);
814 template<
class GFS,
class C,
template<
typename>
class Solver>
815 class ISTLBackend_OVLP_SuperLU_Base
816 :
public OVLPScalarProductImplementation<GFS>,
public LinearResultStorage
826 ISTLBackend_OVLP_SuperLU_Base (
const GFS& gfs_,
const C& c_,
unsigned maxiter_=5000,
828 : OVLPScalarProductImplementation<GFS>(gfs_), gfs(gfs_), c(c_), maxiter(maxiter_), verbose(verbose_)
838 template<
class M,
class V,
class W>
839 void apply(M& A, V& z, W& r,
typename Dune::template FieldTraits<typename V::ElementType >::real_type reduction)
841 typedef OverlappingOperator<C,M,V,W> POP;
843 typedef OVLPScalarProduct<GFS,V> PSP;
846 typedef SuperLUSubdomainSolver<GFS,M,V,W> PREC;
849 if (gfs.gridView().comm().rank()==0) verb=verbose;
850 Solver<V> solver(pop,psp,prec,reduction,maxiter,verb);
852 solver.apply(z,r,stat);
859 std::cout <<
"No superLU support, please install and configure it." << std::endl;
872 template<
class GFS,
class C,
template<
typename>
class Solver>
873 class ISTLBackend_OVLP_UMFPack_Base
874 :
public OVLPScalarProductImplementation<GFS>,
public LinearResultStorage
884 ISTLBackend_OVLP_UMFPack_Base (
const GFS& gfs_,
const C& c_,
unsigned maxiter_=5000,
886 : OVLPScalarProductImplementation<GFS>(gfs_), gfs(gfs_), c(c_), maxiter(maxiter_), verbose(verbose_)
896 template<
class M,
class V,
class W>
897 void apply(M& A, V& z, W& r,
typename Dune::template FieldTraits<typename V::ElementType >::real_type reduction)
899 typedef OverlappingOperator<C,M,V,W> POP;
901 typedef OVLPScalarProduct<GFS,V> PSP;
903#if HAVE_SUITESPARSE_UMFPACK || DOXYGEN
904 typedef UMFPackSubdomainSolver<GFS,M,V,W> PREC;
907 if (gfs.gridView().comm().rank()==0) verb=verbose;
908 Solver<V> solver(pop,psp,prec,reduction,maxiter,verb);
910 solver.apply(z,r,stat);
917 std::cout <<
"No UMFPack support, please install and configure it." << std::endl;
935 template<
class GFS,
class CC>
937 :
public ISTLBackend_OVLP_SuperLU_Base<GFS,CC,Dune::BiCGSTABSolver>
950 : ISTLBackend_OVLP_SuperLU_Base<GFS,CC,
Dune::
BiCGSTABSolver>(gfs_,cc_,maxiter_,verbose_)
959 template<
class GFS,
class CC>
961 :
public ISTLBackend_OVLP_SuperLU_Base<GFS,CC,Dune::CGSolver>
973 unsigned maxiter_=5000,
975 : ISTLBackend_OVLP_SuperLU_Base<GFS,CC,
Dune::
CGSolver>(gfs_,cc_,maxiter_,verbose_)
984 template<
class GFS,
class CC>
986 :
public ISTLBackend_OVLP_UMFPack_Base<GFS,CC,Dune::CGSolver>
998 unsigned maxiter_=5000,
1000 : ISTLBackend_OVLP_UMFPack_Base<GFS,CC,
Dune::
CGSolver>(gfs_,cc_,maxiter_,verbose_)
1010 :
public LinearResultStorage
1030 typename V::ElementType
norm(
const V& v)
const
1034 "ISTLBackend_OVLP_ExplicitDiagonal::norm() should not be "
1035 "neccessary, so we skipped the implementation. If you have a "
1036 "scenario where you need it, please implement it or report back to "
1047 template<
class M,
class V,
class W>
1048 void apply(M& A, V& z, W& r,
typename Dune::template FieldTraits<typename W::ElementType >::real_type reduction)
1050 using Backend::Native;
1051 using Backend::native;
1056 > jac(native(A),1,1.0);
1057 jac.pre(native(z),native(r));
1058 jac.apply(native(z),native(r));
1059 jac.post(native(z));
1060 if (gfs.gridView().comm().size()>1)
1062 CopyDataHandle<GFS,V> copydh(gfs,z);
1065 res.converged =
true;
1068 res.reduction =
static_cast<double>(reduction);
1069 res.conv_rate =
static_cast<double>(reduction);
1077 template<
class GO,
int s,
template<
class,
class,
class,
int>
class Preconditioner,
1078 template<
class>
class Solver>
1079 class ISTLBackend_AMG :
public LinearResultStorage
1081 typedef typename GO::Traits::TrialGridFunctionSpace GFS;
1082 typedef ISTL::ParallelHelper<GFS> PHELPER;
1083 typedef typename GO::Traits::Jacobian M;
1084 typedef Backend::Native<M> MatrixType;
1085 typedef typename GO::Traits::Domain V;
1086 typedef Backend::Native<V> VectorType;
1087 typedef typename ISTL::CommSelector<s,Dune::MPIHelper::isFake>::type Comm;
1099 typedef typename V::ElementType RF;
1109 ISTLBackend_AMG(
const GFS& gfs_,
unsigned maxiter_=5000,
1110 int verbose_=1,
bool reuse_=
false,
1111 bool usesuperlu_=
true)
1112 : gfs(gfs_), phelper(gfs,verbose_), maxiter(maxiter_), params(15,2000),
1113 verbose(verbose_), reuse(reuse_), firstapply(true),
1114 usesuperlu(usesuperlu_)
1116 params.setDefaultValuesIsotropic(GFS::Traits::GridViewType::Traits::Grid::dimension);
1117 params.setDebugLevel(verbose_);
1119 if (gfs.gridView().comm().rank() == 0 && usesuperlu ==
true)
1121 std::cout <<
"WARNING: You are using AMG without SuperLU!"
1122 <<
" Please consider installing SuperLU,"
1123 <<
" or set the usesuperlu flag to false"
1124 <<
" to suppress this warning." << std::endl;
1133 void setParameters(
const Parameters& params_)
1151 void setReuse(
bool reuse_)
1157 bool getReuse()
const
1166 typename V::ElementType norm (
const V& v)
const
1168 typedef OverlappingScalarProduct<GFS,V> PSP;
1169 PSP psp(gfs,phelper);
1180 void apply(M& A, V& z, V& r,
typename Dune::template FieldTraits<typename V::ElementType >::real_type reduction)
1183 Comm oocc(gfs.gridView().comm());
1184 MatrixType& mat=Backend::native(A);
1188 phelper.createIndexSetAndProjectForAMG(A, oocc);
1189 Operator oop(mat, oocc);
1195 SmootherArgs smootherArgs;
1196 smootherArgs.iterations = 1;
1197 smootherArgs.relaxationFactor = 1;
1198 Criterion criterion(params);
1199 stats.tprepare=watch.elapsed();
1203 if (gfs.gridView().comm().rank()==0) verb=verbose;
1205 if (reuse==
false || firstapply==
true){
1206 amg.reset(
new AMG(oop, criterion, smootherArgs, oocc));
1208 stats.tsetup = watch.elapsed();
1209 stats.levels = amg->maxlevels();
1210 stats.directCoarseLevelSolver=amg->usesDirectCoarseLevelSolver();
1213 Solver<VectorType> solver(oop,sp,*amg,RF(reduction),maxiter,verb);
1216 solver.apply(Backend::native(z),Backend::native(r),stat);
1217 stats.tsolve= watch.
elapsed();
1229 const ISTLAMGStatistics& statistics()
const
1243 std::shared_ptr<AMG> amg;
1244 ISTLAMGStatistics stats;
1256 template<
class GO,
int s=96>
1258 :
public ISTLBackend_AMG<GO, s, Dune::SeqSSOR, Dune::CGSolver>
1260 typedef typename GO::Traits::TrialGridFunctionSpace GFS;
1272 int verbose_=1,
bool reuse_=
false,
1273 bool usesuperlu_=
true)
1275 (gfs_, maxiter_, verbose_, reuse_, usesuperlu_)
1285 template<
class GO,
int s=96>
1287 :
public ISTLBackend_AMG<GO, s, Dune::SeqSSOR, Dune::BiCGSTABSolver>
1289 typedef typename GO::Traits::TrialGridFunctionSpace GFS;
1301 int verbose_=1,
bool reuse_=
false,
1302 bool usesuperlu_=
true)
1304 (gfs_, maxiter_, verbose_, reuse_, usesuperlu_)
1314 template<
class GO,
int s=96>
1316 :
public ISTLBackend_AMG<GO, s, Dune::SeqILU, Dune::BiCGSTABSolver>
1318 typedef typename GO::Traits::TrialGridFunctionSpace GFS;
1330 int verbose_=1,
bool reuse_=
false,
1331 bool usesuperlu_=
true)
1333 (gfs_, maxiter_, verbose_, reuse_, usesuperlu_)
Parallel algebraic multigrid based on agglomeration.
Definition: amg.hh:66
The criterion describing the stop criteria for the coarsening process.
Definition: matrixhierarchy.hh:283
Norm that uses only the [0][0] entry of the block to determine couplings.
Definition: aggregates.hh:455
All parameters for AMG.
Definition: parameters.hh:416
Criterion taking advantage of symmetric matrices.
Definition: aggregates.hh:519
A linear operator exporting itself in matrix form.
Definition: operators.hh:110
Bi-conjugate Gradient Stabilized (BiCG-STAB)
Definition: solvers.hh:419
Block parallel preconditioner.
Definition: schwarz.hh:278
conjugate gradient method
Definition: solvers.hh:193
Adapter to turn a matrix into a linear operator.
Definition: operators.hh:135
An overlapping Schwarz operator.
Definition: schwarz.hh:75
Scalar product for overlapping Schwarz methods.
Definition: scalarproducts.hh:201
Overlapping parallel BiCGStab solver preconditioned with AMG smoothed by ILU0.
Definition: ovlpistlsolverbackend.hh:1317
ISTLBackend_BCGS_AMG_ILU0(const GFS &gfs_, unsigned maxiter_=5000, int verbose_=1, bool reuse_=false, bool usesuperlu_=true)
Constructor.
Definition: ovlpistlsolverbackend.hh:1329
Overlapping parallel BiCGStab solver preconditioned with AMG smoothed by SSOR.
Definition: ovlpistlsolverbackend.hh:1288
ISTLBackend_BCGS_AMG_SSOR(const GFS &gfs_, unsigned maxiter_=5000, int verbose_=1, bool reuse_=false, bool usesuperlu_=true)
Constructor.
Definition: ovlpistlsolverbackend.hh:1300
Overlapping parallel conjugate gradient solver preconditioned with AMG smoothed by SSOR.
Definition: ovlpistlsolverbackend.hh:1259
ISTLBackend_CG_AMG_SSOR(const GFS &gfs_, unsigned maxiter_=5000, int verbose_=1, bool reuse_=false, bool usesuperlu_=true)
Constructor.
Definition: ovlpistlsolverbackend.hh:1271
Overlapping parallel BiCGStab solver with ILU0 preconditioner.
Definition: ovlpistlsolverbackend.hh:685
ISTLBackend_OVLP_BCGS_ILU0(const GFS &gfs, const CC &cc, unsigned maxiter=5000, int verbose=1)
make a linear solver object
Definition: ovlpistlsolverbackend.hh:694
Overlapping parallel BiCGStab solver with ILU0 preconditioner.
Definition: ovlpistlsolverbackend.hh:706
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:716
Overlapping parallel BiCGStab solver with SSOR preconditioner.
Definition: ovlpistlsolverbackend.hh:662
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:672
Overlapping parallel BiCGStab solver with SuperLU preconditioner.
Definition: ovlpistlsolverbackend.hh:938
ISTLBackend_OVLP_BCGS_SuperLU(const GFS &gfs_, const CC &cc_, unsigned maxiter_=5000, int verbose_=1)
make a linear solver object
Definition: ovlpistlsolverbackend.hh:948
Overlapping parallel CGS solver with SSOR preconditioner.
Definition: ovlpistlsolverbackend.hh:728
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:738
Overlapping parallel CG solver with SuperLU preconditioner.
Definition: ovlpistlsolverbackend.hh:962
ISTLBackend_OVLP_CG_SuperLU(const GFS &gfs_, const CC &cc_, unsigned maxiter_=5000, int verbose_=1)
make a linear solver object
Definition: ovlpistlsolverbackend.hh:972
Overlapping parallel CG solver with UMFPack preconditioner.
Definition: ovlpistlsolverbackend.hh:987
ISTLBackend_OVLP_CG_UMFPack(const GFS &gfs_, const CC &cc_, unsigned maxiter_=5000, int verbose_=1)
make a linear solver object
Definition: ovlpistlsolverbackend.hh:997
Solver to be used for explicit time-steppers with (block-)diagonal mass matrix.
Definition: ovlpistlsolverbackend.hh:1011
ISTLBackend_OVLP_ExplicitDiagonal(const GFS &gfs_)
make a linear solver object
Definition: ovlpistlsolverbackend.hh:1017
V::ElementType norm(const V &v) const
compute global norm of a vector
Definition: ovlpistlsolverbackend.hh:1030
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:1048
Overlapping parallel restarted GMRes solver with ILU0 preconditioner.
Definition: ovlpistlsolverbackend.hh:752
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:761
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:774
Base class for matrix free definition of preconditioners.
Definition: preconditioner.hh:33
virtual void post(Dune::PDELab::Backend::Vector< GFS, P::domain_type::field_type > &x)=0
Clean up.
virtual void apply(Dune::PDELab::Backend::Vector< GFS, P::domain_type::field_type > &v, const Dune::PDELab::Backend::Vector< GFS, P::range_type::field_type > &d)=0
Apply one step of the preconditioner to the system A(v)=d.
virtual void pre(Dune::PDELab::Backend::Vector< GFS, P::domain_type::field_type > &x, Dune::PDELab::Backend::Vector< GFS, P::range_type::field_type > &b)=0
Prepare the preconditioner.
implements the Generalized Minimal Residual (GMRes) method
Definition: solvers.hh:827
void apply(X &x, Y &b, InverseOperatorResult &res) override
Apply inverse operator.
Definition: solvers.hh:910
Base class for scalar product and norm computation.
Definition: scalarproducts.hh:52
Sequential ILU preconditioner.
Definition: preconditioners.hh:697
The sequential jacobian preconditioner.
Definition: preconditioners.hh:413
Sequential SSOR preconditioner.
Definition: preconditioners.hh:142
Default implementation for the scalar case.
Definition: scalarproducts.hh:168
Definition: recipe-operator-splitting.cc:108
Definition of the DUNE_NO_DEPRECATED_* macros.
Some generic functions for pretty printing vectors and matrices.
Implementations of the inverse operator interface.
auto dot(const A &a, const B &b) -> typename std::enable_if< IsNumber< A >::value &&!IsVector< A >::value &&!std::is_same< typename FieldTraits< A >::field_type, typename FieldTraits< A >::real_type > ::value, decltype(conj(a) *b)>::type
computes the dot product for fundamental data types according to Petsc's VectDot function: dot(a,...
Definition: dotproduct.hh:42
void set_constrained_dofs(const CG &cg, typename XG::ElementType x, XG &xg)
construct constraints from given boundary condition function
Definition: constraints.hh:796
Helpers for dealing with MPI.
Dune namespace.
Definition: alignedallocator.hh:13
Define general, extensible interface for operators. The available implementation wraps a matrix.
Classes providing communication interfaces for overlapping Schwarz methods.
Define general preconditioner interface.
Define base class for scalar product and norm.
template which always yields a false value
Definition: typetraits.hh:124
The default class for the smoother arguments.
Definition: smoother.hh:38
Statistics about the application of an inverse operator.
Definition: solver.hh:50
double elapsed
Elapsed time in seconds.
Definition: solver.hh:84
int iterations
Number of iterations.
Definition: solver.hh:69
double reduction
Reduction achieved: .
Definition: solver.hh:72
double conv_rate
Convergence rate (average reduction per step)
Definition: solver.hh:78
bool converged
True if convergence criterion has been met.
Definition: solver.hh:75
Category
Definition: solvercategory.hh:23
@ overlapping
Category for overlapping solvers.
Definition: solvercategory.hh:29
Classes for using SuperLU with ISTL matrices.