diff --git a/dumux/geomechanics/el2p/el2passembler.hh b/dumux/geomechanics/el2p/el2passembler.hh index f65a750a1a847d7f276372158a18b95f7c179f06..9f9fb05424cc26c6641fef71942534eb9ffe804d 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 377709f4bca0f99ad785d22053dfe26c89b20009..cf48c2ddb42e8ef2590029e756bbe64871e805db 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 e9b3589bcc3af6ad9acf11ad81f162436dcb4063..bad48992e8f5c22f64873f67eabb63dc0afa4193 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);