From ba8689bc90bf844460c70129b98dba35342966ba Mon Sep 17 00:00:00 2001 From: Martin Beck <martin.beck@iws.uni-stuttgart.de> Date: Wed, 22 Oct 2014 13:18:57 +0000 Subject: [PATCH] [el2p] switch from SuperLU to AMG Switched solver from SuperLU to AMG. (reviewed by natalies) git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@13544 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/geomechanics/el2p/el2passembler.hh | 13 +++++++++++++ dumux/geomechanics/el2p/el2pnewtoncontroller.hh | 4 ++-- test/geomechanics/el2p/el2pproblem.hh | 4 ++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/dumux/geomechanics/el2p/el2passembler.hh b/dumux/geomechanics/el2p/el2passembler.hh index f65a750a1a..9f9fb05424 100644 --- a/dumux/geomechanics/el2p/el2passembler.hh +++ b/dumux/geomechanics/el2p/el2passembler.hh @@ -502,6 +502,12 @@ public: const JacobianMatrix& matrix() const { return *matrix_; } + /*! + * \brief Return reference to global Jacobian matrix. + */ + JacobianMatrix& matrix() + { return *matrix_; } + /*! * \brief Return constant reference to global residual vector. */ @@ -509,6 +515,13 @@ public: { return *residual_; } + /*! + * \brief Return reference to global residual vector. + */ + SolutionVector& residual() + { return *residual_; } + + private: #if !HAVE_DUNE_PDELAB // Construct the BCRS matrix for the global jacobian diff --git a/dumux/geomechanics/el2p/el2pnewtoncontroller.hh b/dumux/geomechanics/el2p/el2pnewtoncontroller.hh index 377709f4bc..cf48c2ddb4 100644 --- a/dumux/geomechanics/el2p/el2pnewtoncontroller.hh +++ b/dumux/geomechanics/el2p/el2pnewtoncontroller.hh @@ -96,9 +96,9 @@ public: * \param x The vector which solves the linear system * \param b The right hand side of the linear system */ - void newtonSolveLinear(const JacobianMatrix &A, + void newtonSolveLinear(JacobianMatrix &A, SolutionVector &x, - const SolutionVector &b) + SolutionVector &b) { try { if (this->numSteps_ == 0) diff --git a/test/geomechanics/el2p/el2pproblem.hh b/test/geomechanics/el2p/el2pproblem.hh index e9b3589bcc..bad48992e8 100644 --- a/test/geomechanics/el2p/el2pproblem.hh +++ b/test/geomechanics/el2p/el2pproblem.hh @@ -31,6 +31,7 @@ #include <dumux/material/fluidsystems/brineco2fluidsystem.hh> #include <dumux/implicit/common/implicitporousmediaproblem.hh> #include <dumux/geomechanics/el2p/el2pmodel.hh> +#include <dumux/linear/amgbackend.hh> #include "el2pco2tables.hh" #include "el2pspatialparams.hh" @@ -133,6 +134,9 @@ SET_BOOL_PROP(El2P_TestProblem, ImplicitEnablePartialReassemble, false); // Enable gravity SET_BOOL_PROP(El2P_TestProblem, ProblemEnableGravity, true); +// use the algebraic multigrid +SET_TYPE_PROP(El2P_TestProblem, LinearSolver, Dumux::AMGBackend<TypeTag> ); + // central differences to calculate the jacobian by default SET_INT_PROP(El2P_TestProblem, ImplicitNumericDifferenceMethod, 0); -- GitLab