From 632bc7a809236ab57e03cbd29c61b05d784105fc Mon Sep 17 00:00:00 2001 From: Robert Kloefkorn Date: Tue, 31 Mar 2015 12:42:58 +0200 Subject: [PATCH] CPR: FastAMG seems not to be faster, so use regular AMG. --- opm/autodiff/CPRPreconditioner.hpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/opm/autodiff/CPRPreconditioner.hpp b/opm/autodiff/CPRPreconditioner.hpp index 344752810..eda10e29d 100644 --- a/opm/autodiff/CPRPreconditioner.hpp +++ b/opm/autodiff/CPRPreconditioner.hpp @@ -97,7 +97,9 @@ struct CPRSelector typedef std::unique_ptr EllipticPreconditionerPointer; /// \brief type of AMG used to precondition the elliptic system. - typedef Dune::Amg::FastAMG AMG; + typedef EllipticPreconditioner Smoother; + typedef Dune::Amg::AMG AMG; + //typedef Dune::Amg::FastAMG AMG; /// \brief creates an Operator from the matrix /// \param M The matrix to use. @@ -347,10 +349,6 @@ createEllipticPreconditionerPointer(const M& Ae, double relax, //! \brief preconditioner for the whole system (here either ILU(0) or ILU(n) typedef Dune::Preconditioner WholeSystemPreconditioner; - //! \brief the ilu-0 preconditioner used the for the elliptic system - typedef typename CPRSelector::EllipticPreconditioner - EllipticPreconditioner; - //! \brief type of the unique pointer to the ilu-0 preconditioner //! used the for the elliptic system typedef typename CPRSelector::EllipticPreconditionerPointer @@ -540,23 +538,20 @@ createEllipticPreconditionerPointer(const M& Ae, double relax, { if( amg ) { - //! \brief The coupling metric used in the AMG + // The coupling metric used in the AMG typedef Dune::Amg::FirstDiagonal CouplingMetric; - //! \brief The coupling criterion used in the AMG + // The coupling criterion used in the AMG typedef Dune::Amg::SymmetricCriterion CritBase; - //! \brief The coarsening criterion used in the AMG + // The coarsening criterion used in the AMG typedef Dune::Amg::CoarsenCriterion Criterion; + // TODO: revise choice of parameters int coarsenTarget=1200; Criterion criterion(15,coarsenTarget); criterion.setDebugLevel( 0 ); // no debug information, 1 for printing hierarchy information criterion.setDefaultValuesIsotropic(2); - //criterion.setAlpha(.67); - //criterion.setGamma(1); - //criterion.setBeta(1.0e-6); - //criterion.setMaxLevel(10); criterion.setNoPostSmoothSteps( 1 ); criterion.setNoPreSmoothSteps( 1 ); amg_ = std::unique_ptr< AMG > (new AMG(*opAe_, criterion));//, smootherArgs));