From 60841d89831a946cccbe7200a977faf0cd64471a Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Tue, 16 Jan 2018 10:53:32 +0100 Subject: [PATCH] Make Newtoncontroller independent of TypeTag * [test][richards] Fix solver include (Used to compile before due to indirect include over newtoncontroller. --- dumux/nonlinear/newtoncontroller.hh | 100 +++++++++--------- dumux/nonlinear/staggerednewtoncontroller.hh | 83 ++++++--------- .../privarswitchnewtoncontroller.hh | 35 ++---- .../nonequilibrium/newtoncontroller.hh | 10 +- .../richards/newtoncontroller.hh | 34 ++---- test/freeflow/navierstokes/test_angeli.cc | 4 +- test/freeflow/navierstokes/test_channel.cc | 4 +- .../navierstokes/test_closedsystem.cc | 4 +- test/freeflow/navierstokes/test_donea.cc | 5 +- test/freeflow/navierstokes/test_kovasznay.cc | 5 +- test/freeflow/navierstokesnc/test_channel.cc | 4 +- .../navierstokesnc/test_densitydrivenflow.cc | 4 +- .../navierstokesnc/test_msfreeflow.cc | 4 +- .../1p/implicit/compressible/test_1p.cc | 4 +- .../compressible/test_1p_stationary.cc | 5 +- .../pointsources/test_1pfv_pointsources.cc | 4 +- .../test_1pfv_pointsources_timedependent.cc | 4 +- .../porousmediumflow/1p/implicit/test_1pfv.cc | 4 +- .../1p/implicit/test_1pfv_fracture2d3d.cc | 4 +- .../1p/implicit/test_1pfv_network1d3d.cc | 4 +- .../1p/implicit/test_1pnifv.cc | 4 +- .../1pnc/implicit/test_1p2c_fv.cc | 4 +- .../implicit/test_1p2cni_conduction_fv.cc | 4 +- .../implicit/test_1p2cni_convection_fv.cc | 4 +- .../1pncmin/implicit/test_1pncminni_fv.cc | 4 +- .../implicit/adaptive/test_2p_adaptive_fv.cc | 4 +- .../implicit/fracture/test_2p_fracture_fv.cc | 4 +- .../2p/implicit/incompressible/test_2p_fv.cc | 4 +- .../2p/implicit/nonisothermal/test_2pni_fv.cc | 4 +- .../2p1c/implicit/test_2p1c_fv.cc | 2 +- .../2p2c/implicit/test_2p2c_fv.cc | 2 +- .../2pnc/implicit/test_2pnc_fv.cc | 2 +- .../2pnc/implicit/test_cc2pnc_diffusion.cc | 2 +- .../2pncmin/implicit/test_2pncmin_fv.cc | 2 +- .../3p/implicit/test_3p_fv.cc | 4 +- .../3p/implicit/test_3pni_fv_conduction.cc | 4 +- .../3p/implicit/test_3pni_fv_convection.cc | 4 +- .../3p3c/implicit/test_3p3c_fv.cc | 2 +- .../3pwateroil/implicit/test_box3pwateroil.cc | 2 +- .../co2/implicit/test_co2_fv.cc | 2 +- .../mpnc/implicit/test_boxmpnckinetic.cc | 4 +- .../implicit/test_boxmpncthermalnonequil.cc | 4 +- .../mpnc/implicit/test_mpnc_obstacle_fv.cc | 4 +- .../implicit/test_ccrichardsanalytical.cc | 4 +- .../richards/implicit/test_richardslens_fv.cc | 2 +- .../implicit/test_richardsniconduction_fv.cc | 4 +- .../implicit/test_richardsniconvection_fv.cc | 4 +- .../richardsnc/implicit/test_richardsnc_fv.cc | 4 +- .../multicomp/test_tracer_maxwellstefan.cc | 4 +- tutorial/ex1/exercise1.cc | 4 +- tutorial/ex1/exercise1_2p.cc | 4 +- tutorial/ex1/exercise1_2p2c.cc | 2 +- tutorial/ex2/exercise2.cc | 2 +- tutorial/ex3/exercise3.cc | 4 +- tutorial/solution/ex1/exercise1_2p2c.cc | 2 +- .../solution/ex1/exercise1_2pni_solution.cc | 4 +- tutorial/solution/ex2/exercise2_solution.cc | 2 +- 57 files changed, 201 insertions(+), 246 deletions(-) diff --git a/dumux/nonlinear/newtoncontroller.hh b/dumux/nonlinear/newtoncontroller.hh index 4a5513fb17..4a793a7b4d 100644 --- a/dumux/nonlinear/newtoncontroller.hh +++ b/dumux/nonlinear/newtoncontroller.hh @@ -26,59 +26,64 @@ #ifndef DUMUX_NEWTON_CONTROLLER_HH #define DUMUX_NEWTON_CONTROLLER_HH +#include <cmath> + #include <dune/common/exceptions.hh> +#include <dune/common/parallel/mpicollectivecommunication.hh> +#include <dune/common/parallel/mpihelper.hh> #include <dune/istl/bvector.hh> -#include <dumux/common/properties.hh> #include <dumux/common/exceptions.hh> -#include <dumux/common/math.hh> #include <dumux/common/timeloop.hh> -#include <dumux/linear/seqsolverbackend.hh> namespace Dumux { /*! * \ingroup Nonlinear * \brief An implementation of a Newton controller - * + * \tparam Scalar the scalar type + * \tparam Comm the communication object used to communicate with all processes * \note If you want to specialize only some methods but are happy with the * defaults of the reference controller, derive your controller from * this class and simply overload the required methods. */ -template <class TypeTag> +template <class Scalar, + class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator> > class NewtonController { - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Communicator = typename GridView::CollectiveCommunication; - using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector); - - static constexpr int numEq = GET_PROP_VALUE(TypeTag, NumEq); public: + //! the communication type used to communicate with all processes + using Communication = Comm; + /*! * \brief Constructor for stationary problems */ - NewtonController(const Communicator& comm) + NewtonController(const Communication& comm = Dune::MPIHelper::getCollectiveCommunication(), + const std::string& paramGroup = "") : comm_(comm) , endIterMsgStream_(std::ostringstream::out) + , paramGroup_(paramGroup) { - initParams_(); + initParams_(paramGroup); } /*! * \brief Constructor for instationary problems */ - NewtonController(const Communicator& comm, std::shared_ptr<TimeLoop<Scalar>> timeLoop) + NewtonController(std::shared_ptr<TimeLoop<Scalar>> timeLoop, + const Communication& comm = Dune::MPIHelper::getCollectiveCommunication(), + const std::string& paramGroup = "") : comm_(comm) , timeLoop_(timeLoop) , endIterMsgStream_(std::ostringstream::out) + , paramGroup_(paramGroup) { - initParams_(); + initParams_(paramGroup); } //! the communicator for parallel runs - const Communicator& communicator() const + const Communication& comm() const { return comm_; } /*! @@ -251,8 +256,8 @@ public: shift_ = max(shift_, shiftAtDof); } - if (communicator().size() > 1) - shift_ = communicator().max(shift_); + if (comm().size() > 1) + shift_ = comm().max(shift_); } /*! @@ -289,34 +294,37 @@ public: if (numSteps_ == 0) { Scalar norm2 = b.two_norm2(); - if (communicator().size() > 1) - norm2 = communicator().sum(norm2); + if (comm().size() > 1) + norm2 = comm().sum(norm2); using std::sqrt; initialResidual_ = sqrt(norm2); } - //! Copy into a standard block vector. This is necessary for all model _not_ using a FieldVector<Scalar, numEq> as + //! Copy into a standard block vector. + //! This is necessary for all model _not_ using a FieldVector<Scalar, blockSize> as //! primary variables vector in combination with UMFPack or SuperLU as their interfaces are hard coded //! to this field vector type in Dune ISTL //! Could be avoided for vectors that already have the right type using SFINAE //! but it shouldn't impact performance too much - Dune::BlockVector<NumEqVector> xTmp; xTmp.resize(b.size()); - Dune::BlockVector<NumEqVector> bTmp(xTmp); + constexpr auto blockSize = JacobianMatrix::block_type::rows; + using BlockType = Dune::FieldVector<Scalar, blockSize>; + Dune::BlockVector<BlockType> xTmp; xTmp.resize(b.size()); + Dune::BlockVector<BlockType> bTmp(xTmp); for (unsigned int i = 0; i < b.size(); ++i) - for (unsigned int j = 0; j < numEq; ++j) + for (unsigned int j = 0; j < blockSize; ++j) bTmp[i][j] = b[i][j]; int converged = ls.solve(A, xTmp, bTmp); for (unsigned int i = 0; i < x.size(); ++i) - for (unsigned int j = 0; j < numEq; ++j) + for (unsigned int j = 0; j < blockSize; ++j) x[i][j] = xTmp[i][j]; // make sure all processes converged int convergedRemote = converged; - if (communicator().size() > 1) - convergedRemote = communicator().min(converged); + if (comm().size() > 1) + convergedRemote = comm().min(converged); if (!converged) { DUNE_THROW(NumericalProblem, @@ -327,24 +335,11 @@ public: "Linear solver did not converge on a remote process"); } } - catch (Dune::MatrixBlockError e) { - // make sure all processes converged - int converged = 0; - if (communicator().size() > 1) - converged = communicator().min(converged); - - NumericalProblem p; - std::string msg; - std::ostringstream ms(msg); - ms << e.what() << "M=" << A[e.r][e.c]; - p.message(ms.str()); - throw p; - } catch (const Dune::Exception &e) { // make sure all processes converged int converged = 0; - if (communicator().size() > 1) - converged = communicator().min(converged); + if (comm().size() > 1) + converged = comm().min(converged); NumericalProblem p; p.message(e.what()); @@ -515,15 +510,19 @@ public: * \brief Returns true if the Newton method ought to be chatty. */ bool verbose() const - { return verbose_ && communicator().rank() == 0; } + { return verbose_ && comm().rank() == 0; } + + /*! + * \brief Returns the parameter group + */ + const std::string& paramGroup() const + { return paramGroup_; } protected: //! initialize the parameters by reading from the parameter tree - void initParams_() + void initParams_(const std::string& group = "") { - const std::string group = GET_PROP_VALUE(TypeTag, ModelParameterGroup); - useLineSearch_ = getParamFromGroup<bool>(group, "Newton.UseLineSearch"); enableAbsoluteResidualCriterion_ = getParamFromGroup<bool>(group, "Newton.EnableAbsoluteResidualCriterion"); enableShiftCriterion_ = getParamFromGroup<bool>(group, "Newton.EnableShiftCriterion"); @@ -590,8 +589,6 @@ protected: using std::abs; using std::max; // iterate over all primary variables - // note: we use PrimaryVariables::dimension (== numEq) - // for compatibility with the staggered grid implementation for (int j = 0; j < PrimaryVariables::dimension; ++j) { Scalar eqErr = abs(priVars1[j] - priVars2[j]); eqErr /= max<Scalar>(1.0,abs(priVars1[j] + priVars2[j])/2); @@ -601,8 +598,8 @@ protected: return result; } - //! The grid view's communicator - const Communicator& comm_; + //! The communication object + Communication comm_; //! The time loop for stationary simulations std::shared_ptr<TimeLoop<Scalar>> timeLoop_; @@ -640,6 +637,9 @@ protected: bool enableShiftCriterion_; bool enableResidualCriterion_; bool satisfyResidualAndShiftCriterion_; + + //! the parameter group for getting parameters from the parameter tree + std::string paramGroup_; }; } // end namespace Dumux diff --git a/dumux/nonlinear/staggerednewtoncontroller.hh b/dumux/nonlinear/staggerednewtoncontroller.hh index ca427733d8..c063044b7a 100644 --- a/dumux/nonlinear/staggerednewtoncontroller.hh +++ b/dumux/nonlinear/staggerednewtoncontroller.hh @@ -25,9 +25,12 @@ #ifndef DUMUX_STAGGERED_NEWTON_CONTROLLER_HH #define DUMUX_STAGGERED_NEWTON_CONTROLLER_HH -#include <dumux/common/properties.hh> -#include <dumux/common/exceptions.hh> +#include <dune/common/indices.hh> +#include <dune/common/hybridutilities.hh> +#include <dune/common/fvector.hh> +#include <dune/istl/bvector.hh> +#include <dumux/common/exceptions.hh> #include <dumux/nonlinear/newtoncontroller.hh> #include <dumux/linear/linearsolveracceptsmultitypematrix.hh> #include <dumux/linear/matrixconverter.hh> @@ -40,26 +43,11 @@ namespace Dumux { * \brief A newton controller for staggered finite volume schemes */ -template <class TypeTag> -class StaggeredNewtonController : public NewtonController<TypeTag> +template <class Scalar, + class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator> > +class StaggeredNewtonController : public NewtonController<Scalar, Comm> { - using ParentType = NewtonController<TypeTag>; - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector); - using JacobianMatrix = typename GET_PROP_TYPE(TypeTag, JacobianMatrix); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Communicator = typename GridView::CollectiveCommunication; - - using DofTypeIndices = typename GET_PROP(TypeTag, DofTypeIndices); - typename DofTypeIndices::CellCenterIdx cellCenterIdx; - typename DofTypeIndices::FaceIdx faceIdx; - - enum { - numEqCellCenter = GET_PROP_VALUE(TypeTag, NumEqCellCenter), - numEqFace = GET_PROP_VALUE(TypeTag, NumEqFace) - }; + using ParentType = NewtonController<Scalar, Comm>; public: using ParentType::ParentType; @@ -90,8 +78,9 @@ public: this->initialResidual_ = b.two_norm(); // check matrix sizes - assert(A[cellCenterIdx][cellCenterIdx].N() == A[cellCenterIdx][faceIdx].N()); - assert(A[faceIdx][cellCenterIdx].N() == A[faceIdx][faceIdx].N()); + using namespace Dune::Indices; + assert(A[_0][_0].N() == A[_0][_1].N()); + assert(A[_1][_0].N() == A[_1][_1].N()); // create the bcrs matrix the IterativeSolver backend can handle const auto M = MatrixConverter<JacobianMatrix>::multiTypeToBCRSMatrix(A); @@ -158,14 +147,15 @@ public: this->lineSearchUpdate_(assembler, uCurrentIter, uLastIter, deltaU); } else { - for (unsigned int i = 0; i < uLastIter[cellCenterIdx].size(); ++i) { - uCurrentIter[cellCenterIdx][i] = uLastIter[cellCenterIdx][i]; - uCurrentIter[cellCenterIdx][i] -= deltaU[cellCenterIdx][i]; - } - for (unsigned int i = 0; i < uLastIter[faceIdx].size(); ++i) { - uCurrentIter[faceIdx][i] = uLastIter[faceIdx][i]; - uCurrentIter[faceIdx][i] -= deltaU[faceIdx][i]; - } + using namespace Dune::Hybrid; + forEach(integralRange(Dune::Hybrid::size(uLastIter)), [&](const auto dofTypeIdx) + { + for (unsigned int i = 0; i < uLastIter[dofTypeIdx].size(); ++i) + { + uCurrentIter[dofTypeIdx][i] = uLastIter[dofTypeIdx][i]; + uCurrentIter[dofTypeIdx][i] -= deltaU[dofTypeIdx][i]; + } + }); if (this->enableResidualCriterion_) { @@ -186,30 +176,27 @@ public: * \param uLastIter The current iterative solution * \param deltaU The difference between the current and the next solution */ + template<class SolutionVector> void newtonUpdateShift(const SolutionVector &uLastIter, const SolutionVector &deltaU) { this->shift_ = 0; - for (int i = 0; i < int(uLastIter[cellCenterIdx].size()); ++i) { - auto uNewI = uLastIter[cellCenterIdx][i]; - uNewI -= deltaU[cellCenterIdx][i]; - - Scalar shiftAtDof = this->relativeShiftAtDof_(uLastIter[cellCenterIdx][i], - uNewI); - this->shift_ = std::max(this->shift_, shiftAtDof); - } - for (int i = 0; i < int(uLastIter[faceIdx].size()); ++i) { - auto uNewI = uLastIter[faceIdx][i]; - uNewI -= deltaU[faceIdx][i]; + using namespace Dune::Hybrid; + forEach(integralRange(Dune::Hybrid::size(uLastIter)), [&](const auto dofTypeIdx) + { + for (int i = 0; i < int(uLastIter[dofTypeIdx].size()); ++i) + { + auto uNewI = uLastIter[dofTypeIdx][i]; + uNewI -= deltaU[dofTypeIdx][i]; - Scalar shiftAtDof = this->relativeShiftAtDof_(uLastIter[faceIdx][i], - uNewI); - this->shift_ = std::max(this->shift_, shiftAtDof); - } + Scalar shiftAtDof = this->relativeShiftAtDof_(uLastIter[dofTypeIdx][i], uNewI); + this->shift_ = std::max(this->shift_, shiftAtDof); + } + }); - if (this->communicator().size() > 1) - this->shift_ = this->communicator().max(this->shift_); + if (this->comm().size() > 1) + this->shift_ = this->comm().max(this->shift_); } }; diff --git a/dumux/porousmediumflow/compositional/privarswitchnewtoncontroller.hh b/dumux/porousmediumflow/compositional/privarswitchnewtoncontroller.hh index 7b9dee7443..4b992507f5 100644 --- a/dumux/porousmediumflow/compositional/privarswitchnewtoncontroller.hh +++ b/dumux/porousmediumflow/compositional/privarswitchnewtoncontroller.hh @@ -40,39 +40,22 @@ namespace Dumux /*! * \ingroup PorousmediumCompositional * \brief A newton controller that handles primary variable switches + * \todo make this independent of TypeTag by making PrimaryVariableSwitch a template argument + * and extracting everything model specific from there + * \todo Implement for volume variable caching enabled */ template <class TypeTag> -class PriVarSwitchNewtonController : public NewtonController<TypeTag> +class PriVarSwitchNewtonController : public NewtonController<typename GET_PROP_TYPE(TypeTag, Scalar)> { - using ParentType = NewtonController<TypeTag>; using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Communicator = typename GridView::CollectiveCommunication; - using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector); + using ParentType = NewtonController<Scalar>; using PrimaryVariableSwitch = typename GET_PROP_TYPE(TypeTag, PrimaryVariableSwitch); - using ElementSolution = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector); - static constexpr int numEq = GET_PROP_VALUE(TypeTag, NumEq); - - static constexpr bool isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == DiscretizationMethods::Box; + // using ElementSolution = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector); + // static constexpr bool isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == DiscretizationMethods::Box; public: - /*! - * \ingroup Newton - * \brief Constructor for stationary problems - */ - PriVarSwitchNewtonController(const Communicator& comm) - : ParentType(comm) - , switchedInLastIteration_(false) - {} - - /*! - * \brief Constructor for stationary problems - */ - PriVarSwitchNewtonController(const Communicator& comm, std::shared_ptr<TimeLoop<Scalar>> timeLoop) - : ParentType(comm, timeLoop) - , switchedInLastIteration_(false) - {} + using ParentType::ParentType; /*! * \brief Returns true if the error of the solution is below the @@ -201,7 +184,7 @@ private: //! the class handling the primary variable switch std::unique_ptr<PrimaryVariableSwitch> priVarSwitch_; //! if we switched primary variables in the last iteration - bool switchedInLastIteration_; + bool switchedInLastIteration_ = false; }; } // end namespace Dumux diff --git a/dumux/porousmediumflow/nonequilibrium/newtoncontroller.hh b/dumux/porousmediumflow/nonequilibrium/newtoncontroller.hh index 704aeb28c8..b1bfec283b 100644 --- a/dumux/porousmediumflow/nonequilibrium/newtoncontroller.hh +++ b/dumux/porousmediumflow/nonequilibrium/newtoncontroller.hh @@ -35,13 +35,11 @@ namespace Dumux { * \brief A nonequilibrium specific controller for the newton solver. * This controller calls the velocity averaging in the problem after each iteration. */ -template <class TypeTag> -class NonEquilibriumNewtonController : public NewtonController<TypeTag> +template <class Scalar, + class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator> > +class NonEquilibriumNewtonController : public NewtonController<Scalar, Comm> { - using ParentType = NewtonController<TypeTag>; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Communicator = typename GridView::CollectiveCommunication; + using ParentType = NewtonController<Scalar, Comm>; public: using ParentType::ParentType; diff --git a/dumux/porousmediumflow/richards/newtoncontroller.hh b/dumux/porousmediumflow/richards/newtoncontroller.hh index 305b4839c4..5ff4807f36 100644 --- a/dumux/porousmediumflow/richards/newtoncontroller.hh +++ b/dumux/porousmediumflow/richards/newtoncontroller.hh @@ -34,38 +34,23 @@ namespace Dumux { * * This controller 'knows' what a 'physically meaningful' solution is * and can thus do update smarter than the plain Newton controller. + * + * \todo make this typetag independent by extracting anything model specific from assembler + * or from possible ModelTraits. */ template <class TypeTag> -class RichardsNewtonController : public NewtonController<TypeTag> +class RichardsNewtonController : public NewtonController<typename GET_PROP_TYPE(TypeTag, Scalar)> { - using ParentType = NewtonController<TypeTag>; using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector); - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); - using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); + using ParentType = NewtonController<Scalar>; + using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Communicator = typename GridView::CollectiveCommunication; using ElementSolution = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector); - using Indices = typename GET_PROP_TYPE(TypeTag, Indices); enum { pressureIdx = Indices::pressureIdx }; public: - /*! - * \brief Constructor for stationary problems - */ - RichardsNewtonController(const Communicator& comm) - : ParentType(comm) - {} - - /*! - * \brief Constructor for stationary problems - */ - RichardsNewtonController(const Communicator& comm, std::shared_ptr<TimeLoop<Scalar>> timeLoop) - : ParentType(comm, timeLoop) - {} + using ParentType::ParentType; /*! * \brief Update the current solution of the newton method @@ -73,7 +58,7 @@ public: * This is basically the step * \f[ u^{k+1} = u^k - \Delta u^k \f] * - * \param assembler TODO docme! + * \param assembler The Jacobian assembler * \param uCurrentIter The solution after the current Newton iteration \f$ u^{k+1} \f$ * \param uLastIter The solution after the last Newton iteration \f$ u^k \f$ * \param deltaU The vector of differences between the last @@ -86,8 +71,7 @@ public: const SolutionVector &deltaU) { ParentType::newtonUpdate(assembler, uCurrentIter, uLastIter, deltaU); - const std::string group = GET_PROP_VALUE(TypeTag, ModelParameterGroup); - if (!this->useLineSearch_ && getParamFromGroup<bool>(group, "Newton.EnableChop")) + if (!this->useLineSearch_ && getParamFromGroup<bool>(this->paramGroup(), "Newton.EnableChop")) { // do not clamp anything after 5 iterations if (this->numSteps_ > 4) diff --git a/test/freeflow/navierstokes/test_angeli.cc b/test/freeflow/navierstokes/test_angeli.cc index 237c477396..2681f699f4 100644 --- a/test/freeflow/navierstokes/test_angeli.cc +++ b/test/freeflow/navierstokes/test_angeli.cc @@ -176,9 +176,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver - using NewtonController = StaggeredNewtonController<TypeTag>; + using NewtonController = StaggeredNewtonController<Scalar>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/freeflow/navierstokes/test_channel.cc b/test/freeflow/navierstokes/test_channel.cc index b67cb331b1..965489f3ca 100644 --- a/test/freeflow/navierstokes/test_channel.cc +++ b/test/freeflow/navierstokes/test_channel.cc @@ -174,9 +174,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver - using NewtonController = StaggeredNewtonController<TypeTag>; + using NewtonController = StaggeredNewtonController<Scalar>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // set up two planes over which fluxes are calculated diff --git a/test/freeflow/navierstokes/test_closedsystem.cc b/test/freeflow/navierstokes/test_closedsystem.cc index d264159c6a..7fab685052 100644 --- a/test/freeflow/navierstokes/test_closedsystem.cc +++ b/test/freeflow/navierstokes/test_closedsystem.cc @@ -171,9 +171,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver - using NewtonController = StaggeredNewtonController<TypeTag>; + using NewtonController = StaggeredNewtonController<Scalar>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/freeflow/navierstokes/test_donea.cc b/test/freeflow/navierstokes/test_donea.cc index 0ae1ff2297..ad38c89e5f 100644 --- a/test/freeflow/navierstokes/test_donea.cc +++ b/test/freeflow/navierstokes/test_donea.cc @@ -158,9 +158,10 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver - using NewtonController = StaggeredNewtonController<TypeTag>; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using NewtonController = StaggeredNewtonController<Scalar>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm()); + auto newtonController = std::make_shared<NewtonController>(); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // linearize & solve diff --git a/test/freeflow/navierstokes/test_kovasznay.cc b/test/freeflow/navierstokes/test_kovasznay.cc index 21ffd30708..eb9da8a9ea 100644 --- a/test/freeflow/navierstokes/test_kovasznay.cc +++ b/test/freeflow/navierstokes/test_kovasznay.cc @@ -157,9 +157,10 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver - using NewtonController = StaggeredNewtonController<TypeTag>; + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using NewtonController = StaggeredNewtonController<Scalar>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm()); + auto newtonController = std::make_shared<NewtonController>(); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // linearize & solve diff --git a/test/freeflow/navierstokesnc/test_channel.cc b/test/freeflow/navierstokesnc/test_channel.cc index 53ac33e9d2..efd6b5752e 100644 --- a/test/freeflow/navierstokesnc/test_channel.cc +++ b/test/freeflow/navierstokesnc/test_channel.cc @@ -173,9 +173,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver - using NewtonController = StaggeredNewtonController<TypeTag>; + using NewtonController = StaggeredNewtonController<Scalar>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/freeflow/navierstokesnc/test_densitydrivenflow.cc b/test/freeflow/navierstokesnc/test_densitydrivenflow.cc index 3b90fe85fd..d18532777d 100644 --- a/test/freeflow/navierstokesnc/test_densitydrivenflow.cc +++ b/test/freeflow/navierstokesnc/test_densitydrivenflow.cc @@ -172,9 +172,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver - using NewtonController = StaggeredNewtonController<TypeTag>; + using NewtonController = StaggeredNewtonController<Scalar>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/freeflow/navierstokesnc/test_msfreeflow.cc b/test/freeflow/navierstokesnc/test_msfreeflow.cc index af2672b58a..e65afdc07b 100644 --- a/test/freeflow/navierstokesnc/test_msfreeflow.cc +++ b/test/freeflow/navierstokesnc/test_msfreeflow.cc @@ -171,9 +171,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver - using NewtonController = StaggeredNewtonController<TypeTag>; + using NewtonController = StaggeredNewtonController<Scalar>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/1p/implicit/compressible/test_1p.cc b/test/porousmediumflow/1p/implicit/compressible/test_1p.cc index 6f213b0406..f04896d35e 100644 --- a/test/porousmediumflow/1p/implicit/compressible/test_1p.cc +++ b/test/porousmediumflow/1p/implicit/compressible/test_1p.cc @@ -130,8 +130,8 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + using NewtonController = Dumux::NewtonController<Scalar>; + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod<NewtonController, Assembler, LinearSolver> nonLinearSolver(newtonController, assembler, linearSolver); // set some check points for the time loop diff --git a/test/porousmediumflow/1p/implicit/compressible/test_1p_stationary.cc b/test/porousmediumflow/1p/implicit/compressible/test_1p_stationary.cc index 712b2dc570..ca5a0d328a 100644 --- a/test/porousmediumflow/1p/implicit/compressible/test_1p_stationary.cc +++ b/test/porousmediumflow/1p/implicit/compressible/test_1p_stationary.cc @@ -115,8 +115,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm()); + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using NewtonController = Dumux::NewtonController<Scalar>; + auto newtonController = std::make_shared<NewtonController>(); NewtonMethod<NewtonController, Assembler, LinearSolver> nonLinearSolver(newtonController, assembler, linearSolver); // linearize & solve diff --git a/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources.cc b/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources.cc index d0e41825d5..d15462abb6 100644 --- a/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources.cc +++ b/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources.cc @@ -132,9 +132,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; + using NewtonController = Dumux::NewtonController<Scalar>; using NewtonMethod = NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources_timedependent.cc b/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources_timedependent.cc index dabe20b670..077d34ad20 100644 --- a/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources_timedependent.cc +++ b/test/porousmediumflow/1p/implicit/pointsources/test_1pfv_pointsources_timedependent.cc @@ -132,9 +132,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; + using NewtonController = Dumux::NewtonController<Scalar>; using NewtonMethod = NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/1p/implicit/test_1pfv.cc b/test/porousmediumflow/1p/implicit/test_1pfv.cc index 39052a1121..527af70e84 100644 --- a/test/porousmediumflow/1p/implicit/test_1pfv.cc +++ b/test/porousmediumflow/1p/implicit/test_1pfv.cc @@ -167,9 +167,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; + using NewtonController = Dumux::NewtonController<Scalar>; using NewtonMethod = NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/1p/implicit/test_1pfv_fracture2d3d.cc b/test/porousmediumflow/1p/implicit/test_1pfv_fracture2d3d.cc index 51da32020b..957420d572 100644 --- a/test/porousmediumflow/1p/implicit/test_1pfv_fracture2d3d.cc +++ b/test/porousmediumflow/1p/implicit/test_1pfv_fracture2d3d.cc @@ -156,9 +156,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; + using NewtonController = Dumux::NewtonController<Scalar>; using NewtonMethod = NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/1p/implicit/test_1pfv_network1d3d.cc b/test/porousmediumflow/1p/implicit/test_1pfv_network1d3d.cc index f258f7228b..6b61ab1ce5 100644 --- a/test/porousmediumflow/1p/implicit/test_1pfv_network1d3d.cc +++ b/test/porousmediumflow/1p/implicit/test_1pfv_network1d3d.cc @@ -156,9 +156,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; + using NewtonController = Dumux::NewtonController<Scalar>; using NewtonMethod = NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/1p/implicit/test_1pnifv.cc b/test/porousmediumflow/1p/implicit/test_1pnifv.cc index 98b6563d55..f9f83626eb 100644 --- a/test/porousmediumflow/1p/implicit/test_1pnifv.cc +++ b/test/porousmediumflow/1p/implicit/test_1pnifv.cc @@ -162,9 +162,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; + using NewtonController = Dumux::NewtonController<Scalar>; using NewtonMethod = NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/1pnc/implicit/test_1p2c_fv.cc b/test/porousmediumflow/1pnc/implicit/test_1p2c_fv.cc index ec5573e01e..769d29c184 100644 --- a/test/porousmediumflow/1pnc/implicit/test_1p2c_fv.cc +++ b/test/porousmediumflow/1pnc/implicit/test_1p2c_fv.cc @@ -130,8 +130,8 @@ auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + using NewtonController = Dumux::NewtonController<Scalar>; + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod<NewtonController, Assembler, LinearSolver> nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/1pnc/implicit/test_1p2cni_conduction_fv.cc b/test/porousmediumflow/1pnc/implicit/test_1p2cni_conduction_fv.cc index 3d1a250599..4e6ad962d2 100644 --- a/test/porousmediumflow/1pnc/implicit/test_1p2cni_conduction_fv.cc +++ b/test/porousmediumflow/1pnc/implicit/test_1p2cni_conduction_fv.cc @@ -134,8 +134,8 @@ auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + using NewtonController = Dumux::NewtonController<Scalar>; + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod<NewtonController, Assembler, LinearSolver> nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/1pnc/implicit/test_1p2cni_convection_fv.cc b/test/porousmediumflow/1pnc/implicit/test_1p2cni_convection_fv.cc index 78e1b7a462..7af83c6bea 100644 --- a/test/porousmediumflow/1pnc/implicit/test_1p2cni_convection_fv.cc +++ b/test/porousmediumflow/1pnc/implicit/test_1p2cni_convection_fv.cc @@ -134,8 +134,8 @@ auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + using NewtonController = Dumux::NewtonController<Scalar>; + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod<NewtonController, Assembler, LinearSolver> nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/1pncmin/implicit/test_1pncminni_fv.cc b/test/porousmediumflow/1pncmin/implicit/test_1pncminni_fv.cc index 0b29abe6b8..10c78fa35c 100644 --- a/test/porousmediumflow/1pncmin/implicit/test_1pncminni_fv.cc +++ b/test/porousmediumflow/1pncmin/implicit/test_1pncminni_fv.cc @@ -164,8 +164,8 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + using NewtonController = Dumux::NewtonController<Scalar>; + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod<NewtonController, Assembler, LinearSolver> nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/2p/implicit/adaptive/test_2p_adaptive_fv.cc b/test/porousmediumflow/2p/implicit/adaptive/test_2p_adaptive_fv.cc index 161900bd12..6b08d95bbc 100644 --- a/test/porousmediumflow/2p/implicit/adaptive/test_2p_adaptive_fv.cc +++ b/test/porousmediumflow/2p/implicit/adaptive/test_2p_adaptive_fv.cc @@ -201,9 +201,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; + using NewtonController = Dumux::NewtonController<Scalar>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/2p/implicit/fracture/test_2p_fracture_fv.cc b/test/porousmediumflow/2p/implicit/fracture/test_2p_fracture_fv.cc index fedc3d2d92..d56429596d 100644 --- a/test/porousmediumflow/2p/implicit/fracture/test_2p_fracture_fv.cc +++ b/test/porousmediumflow/2p/implicit/fracture/test_2p_fracture_fv.cc @@ -145,9 +145,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; + using NewtonController = Dumux::NewtonController<Scalar>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/2p/implicit/incompressible/test_2p_fv.cc b/test/porousmediumflow/2p/implicit/incompressible/test_2p_fv.cc index 2628abaa29..c5e12c7142 100644 --- a/test/porousmediumflow/2p/implicit/incompressible/test_2p_fv.cc +++ b/test/porousmediumflow/2p/implicit/incompressible/test_2p_fv.cc @@ -163,9 +163,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; + using NewtonController = Dumux::NewtonController<Scalar>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/2p/implicit/nonisothermal/test_2pni_fv.cc b/test/porousmediumflow/2p/implicit/nonisothermal/test_2pni_fv.cc index 0c184ca26c..570cbd1f02 100644 --- a/test/porousmediumflow/2p/implicit/nonisothermal/test_2pni_fv.cc +++ b/test/porousmediumflow/2p/implicit/nonisothermal/test_2pni_fv.cc @@ -156,9 +156,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; + using NewtonController = Dumux::NewtonController<Scalar>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/2p1c/implicit/test_2p1c_fv.cc b/test/porousmediumflow/2p1c/implicit/test_2p1c_fv.cc index 034d9b213c..9f469eacf9 100644 --- a/test/porousmediumflow/2p1c/implicit/test_2p1c_fv.cc +++ b/test/porousmediumflow/2p1c/implicit/test_2p1c_fv.cc @@ -131,7 +131,7 @@ // the non-linear solver using NewtonController = Dumux::PriVarSwitchNewtonController<TypeTag>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod<NewtonController, Assembler, LinearSolver> nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/2p2c/implicit/test_2p2c_fv.cc b/test/porousmediumflow/2p2c/implicit/test_2p2c_fv.cc index 1cfe2691f6..5651d2a05c 100644 --- a/test/porousmediumflow/2p2c/implicit/test_2p2c_fv.cc +++ b/test/porousmediumflow/2p2c/implicit/test_2p2c_fv.cc @@ -134,7 +134,7 @@ int main(int argc, char** argv) try // the non-linear solver using NewtonController = PriVarSwitchNewtonController<TypeTag>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/2pnc/implicit/test_2pnc_fv.cc b/test/porousmediumflow/2pnc/implicit/test_2pnc_fv.cc index 760eb80e1f..9b75b3116f 100644 --- a/test/porousmediumflow/2pnc/implicit/test_2pnc_fv.cc +++ b/test/porousmediumflow/2pnc/implicit/test_2pnc_fv.cc @@ -159,7 +159,7 @@ int main(int argc, char** argv) try // the non-linear solver using NewtonController = PriVarSwitchNewtonController<TypeTag>; using NewtonMethod = NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/2pnc/implicit/test_cc2pnc_diffusion.cc b/test/porousmediumflow/2pnc/implicit/test_cc2pnc_diffusion.cc index c039c68028..7e5ebb88d3 100644 --- a/test/porousmediumflow/2pnc/implicit/test_cc2pnc_diffusion.cc +++ b/test/porousmediumflow/2pnc/implicit/test_cc2pnc_diffusion.cc @@ -156,7 +156,7 @@ int main(int argc, char** argv) try // the non-linear solver using NewtonController = PriVarSwitchNewtonController<TypeTag>; using NewtonMethod = NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/2pncmin/implicit/test_2pncmin_fv.cc b/test/porousmediumflow/2pncmin/implicit/test_2pncmin_fv.cc index e121f1d7a1..c937d4c6a4 100644 --- a/test/porousmediumflow/2pncmin/implicit/test_2pncmin_fv.cc +++ b/test/porousmediumflow/2pncmin/implicit/test_2pncmin_fv.cc @@ -161,7 +161,7 @@ int main(int argc, char** argv) try // the non-linear solver using NewtonController = PriVarSwitchNewtonController<TypeTag>; using NewtonMethod = NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/3p/implicit/test_3p_fv.cc b/test/porousmediumflow/3p/implicit/test_3p_fv.cc index 90517031de..8f7a7eda6a 100644 --- a/test/porousmediumflow/3p/implicit/test_3p_fv.cc +++ b/test/porousmediumflow/3p/implicit/test_3p_fv.cc @@ -161,9 +161,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; + using NewtonController = Dumux::NewtonController<Scalar>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/3p/implicit/test_3pni_fv_conduction.cc b/test/porousmediumflow/3p/implicit/test_3pni_fv_conduction.cc index 38ff031ed6..d57c83212c 100644 --- a/test/porousmediumflow/3p/implicit/test_3pni_fv_conduction.cc +++ b/test/porousmediumflow/3p/implicit/test_3pni_fv_conduction.cc @@ -164,9 +164,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; + using NewtonController = Dumux::NewtonController<Scalar>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/3p/implicit/test_3pni_fv_convection.cc b/test/porousmediumflow/3p/implicit/test_3pni_fv_convection.cc index 0da9bcc0a5..b608af5e75 100644 --- a/test/porousmediumflow/3p/implicit/test_3pni_fv_convection.cc +++ b/test/porousmediumflow/3p/implicit/test_3pni_fv_convection.cc @@ -164,9 +164,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; + using NewtonController = Dumux::NewtonController<Scalar>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/3p3c/implicit/test_3p3c_fv.cc b/test/porousmediumflow/3p3c/implicit/test_3p3c_fv.cc index 9b68aacd92..a9d8a49efb 100644 --- a/test/porousmediumflow/3p3c/implicit/test_3p3c_fv.cc +++ b/test/porousmediumflow/3p3c/implicit/test_3p3c_fv.cc @@ -164,7 +164,7 @@ int main(int argc, char** argv) try // the non-linear solver using NewtonController = PriVarSwitchNewtonController<TypeTag>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/3pwateroil/implicit/test_box3pwateroil.cc b/test/porousmediumflow/3pwateroil/implicit/test_box3pwateroil.cc index ef46ef7d47..a6244cd36d 100644 --- a/test/porousmediumflow/3pwateroil/implicit/test_box3pwateroil.cc +++ b/test/porousmediumflow/3pwateroil/implicit/test_box3pwateroil.cc @@ -161,7 +161,7 @@ int main(int argc, char** argv) try // the non-linear solver using NewtonController = PriVarSwitchNewtonController<TypeTag>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/co2/implicit/test_co2_fv.cc b/test/porousmediumflow/co2/implicit/test_co2_fv.cc index 6192ed1bc5..88162d0d80 100644 --- a/test/porousmediumflow/co2/implicit/test_co2_fv.cc +++ b/test/porousmediumflow/co2/implicit/test_co2_fv.cc @@ -134,7 +134,7 @@ int main(int argc, char** argv) try // the non-linear solver using NewtonController = PriVarSwitchNewtonController<TypeTag>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/mpnc/implicit/test_boxmpnckinetic.cc b/test/porousmediumflow/mpnc/implicit/test_boxmpnckinetic.cc index 9478439173..8fd4d91754 100644 --- a/test/porousmediumflow/mpnc/implicit/test_boxmpnckinetic.cc +++ b/test/porousmediumflow/mpnc/implicit/test_boxmpnckinetic.cc @@ -162,9 +162,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); // the non-linear solver - using NewtonController = Dumux::NonEquilibriumNewtonController<TypeTag>; + using NewtonController = NonEquilibriumNewtonController<Scalar>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/mpnc/implicit/test_boxmpncthermalnonequil.cc b/test/porousmediumflow/mpnc/implicit/test_boxmpncthermalnonequil.cc index 27e921b8ce..8974eecafa 100644 --- a/test/porousmediumflow/mpnc/implicit/test_boxmpncthermalnonequil.cc +++ b/test/porousmediumflow/mpnc/implicit/test_boxmpncthermalnonequil.cc @@ -161,9 +161,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); // the non-linear solver - using NewtonController = Dumux::NonEquilibriumNewtonController<TypeTag>; + using NewtonController = NonEquilibriumNewtonController<Scalar>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/mpnc/implicit/test_mpnc_obstacle_fv.cc b/test/porousmediumflow/mpnc/implicit/test_mpnc_obstacle_fv.cc index 664daa0e1c..fc999af2a1 100644 --- a/test/porousmediumflow/mpnc/implicit/test_mpnc_obstacle_fv.cc +++ b/test/porousmediumflow/mpnc/implicit/test_mpnc_obstacle_fv.cc @@ -163,9 +163,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); // the non-linear solver - using NewtonController = NewtonController<TypeTag>; + using NewtonController = Dumux::NewtonController<Scalar>; using NewtonMethod = NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/richards/implicit/test_ccrichardsanalytical.cc b/test/porousmediumflow/richards/implicit/test_ccrichardsanalytical.cc index 41b6568b06..eb0a02a232 100644 --- a/test/porousmediumflow/richards/implicit/test_ccrichardsanalytical.cc +++ b/test/porousmediumflow/richards/implicit/test_ccrichardsanalytical.cc @@ -40,7 +40,7 @@ #include <dumux/common/dumuxmessage.hh> #include <dumux/common/defaultusagemessage.hh> -#include <dumux/linear/amgbackend.hh> +#include <dumux/linear/seqsolverbackend.hh> #include <dumux/nonlinear/newtonmethod.hh> #include <dumux/nonlinear/newtoncontroller.hh> #include <dumux/porousmediumflow/richards/newtoncontroller.hh> @@ -159,7 +159,7 @@ int main(int argc, char** argv) try // the non-linear solver using NewtonController = Dumux::RichardsNewtonController<TypeTag>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/richards/implicit/test_richardslens_fv.cc b/test/porousmediumflow/richards/implicit/test_richardslens_fv.cc index 61234f44ab..f43e186ec5 100644 --- a/test/porousmediumflow/richards/implicit/test_richardslens_fv.cc +++ b/test/porousmediumflow/richards/implicit/test_richardslens_fv.cc @@ -159,7 +159,7 @@ int main(int argc, char** argv) try // the non-linear solver using NewtonController = Dumux::RichardsNewtonController<TypeTag>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/richards/implicit/test_richardsniconduction_fv.cc b/test/porousmediumflow/richards/implicit/test_richardsniconduction_fv.cc index 0323d1b9ba..ef788a8587 100644 --- a/test/porousmediumflow/richards/implicit/test_richardsniconduction_fv.cc +++ b/test/porousmediumflow/richards/implicit/test_richardsniconduction_fv.cc @@ -40,7 +40,7 @@ #include <dumux/common/dumuxmessage.hh> #include <dumux/common/defaultusagemessage.hh> -#include <dumux/linear/amgbackend.hh> +#include <dumux/linear/seqsolverbackend.hh> #include <dumux/nonlinear/newtonmethod.hh> #include <dumux/nonlinear/newtoncontroller.hh> #include <dumux/porousmediumflow/richards/newtoncontroller.hh> @@ -160,7 +160,7 @@ int main(int argc, char** argv) try // the non-linear solver using NewtonController = Dumux::RichardsNewtonController<TypeTag>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/richards/implicit/test_richardsniconvection_fv.cc b/test/porousmediumflow/richards/implicit/test_richardsniconvection_fv.cc index 38941e54e9..e072b660ef 100644 --- a/test/porousmediumflow/richards/implicit/test_richardsniconvection_fv.cc +++ b/test/porousmediumflow/richards/implicit/test_richardsniconvection_fv.cc @@ -40,7 +40,7 @@ #include <dumux/common/dumuxmessage.hh> #include <dumux/common/defaultusagemessage.hh> -#include <dumux/linear/amgbackend.hh> +#include <dumux/linear/seqsolverbackend.hh> #include <dumux/nonlinear/newtonmethod.hh> #include <dumux/nonlinear/newtoncontroller.hh> #include <dumux/porousmediumflow/richards/newtoncontroller.hh> @@ -160,7 +160,7 @@ int main(int argc, char** argv) try // the non-linear solver using NewtonController = Dumux::RichardsNewtonController<TypeTag>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/richardsnc/implicit/test_richardsnc_fv.cc b/test/porousmediumflow/richardsnc/implicit/test_richardsnc_fv.cc index 915f4e27e6..cc7d35d403 100644 --- a/test/porousmediumflow/richardsnc/implicit/test_richardsnc_fv.cc +++ b/test/porousmediumflow/richardsnc/implicit/test_richardsnc_fv.cc @@ -40,7 +40,7 @@ #include <dumux/common/dumuxmessage.hh> #include <dumux/common/defaultusagemessage.hh> -#include <dumux/linear/amgbackend.hh> +#include <dumux/linear/seqsolverbackend.hh> #include <dumux/nonlinear/newtonmethod.hh> #include <dumux/nonlinear/newtoncontroller.hh> #include <dumux/porousmediumflow/richards/newtoncontroller.hh> @@ -159,7 +159,7 @@ int main(int argc, char** argv) try // the non-linear solver using NewtonController = Dumux::RichardsNewtonController<TypeTag>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/test/porousmediumflow/tracer/multicomp/test_tracer_maxwellstefan.cc b/test/porousmediumflow/tracer/multicomp/test_tracer_maxwellstefan.cc index 3d90cd9697..07d3eb609d 100644 --- a/test/porousmediumflow/tracer/multicomp/test_tracer_maxwellstefan.cc +++ b/test/porousmediumflow/tracer/multicomp/test_tracer_maxwellstefan.cc @@ -163,9 +163,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; + using NewtonController = Dumux::NewtonController<Scalar>; using NewtonMethod = Dumux::NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/tutorial/ex1/exercise1.cc b/tutorial/ex1/exercise1.cc index eb382278d3..b7655dac87 100644 --- a/tutorial/ex1/exercise1.cc +++ b/tutorial/ex1/exercise1.cc @@ -125,9 +125,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; + using NewtonController = Dumux::NewtonController<Scalar>; using NewtonMethod = NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/tutorial/ex1/exercise1_2p.cc b/tutorial/ex1/exercise1_2p.cc index eb382278d3..b7655dac87 100644 --- a/tutorial/ex1/exercise1_2p.cc +++ b/tutorial/ex1/exercise1_2p.cc @@ -125,9 +125,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; + using NewtonController = Dumux::NewtonController<Scalar>; using NewtonMethod = NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/tutorial/ex1/exercise1_2p2c.cc b/tutorial/ex1/exercise1_2p2c.cc index 540215ccaa..313486242d 100644 --- a/tutorial/ex1/exercise1_2p2c.cc +++ b/tutorial/ex1/exercise1_2p2c.cc @@ -127,7 +127,7 @@ int main(int argc, char** argv) try // the non-linear solver using NewtonController = PriVarSwitchNewtonController<TypeTag>; using NewtonMethod = NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/tutorial/ex2/exercise2.cc b/tutorial/ex2/exercise2.cc index 989056afa3..dba708fbc1 100644 --- a/tutorial/ex2/exercise2.cc +++ b/tutorial/ex2/exercise2.cc @@ -130,7 +130,7 @@ int main(int argc, char** argv)try // the non-linear solver using NewtonController = PriVarSwitchNewtonController<TypeTag>; using NewtonMethod = NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/tutorial/ex3/exercise3.cc b/tutorial/ex3/exercise3.cc index 6e3ddffa06..f5c9b5d039 100644 --- a/tutorial/ex3/exercise3.cc +++ b/tutorial/ex3/exercise3.cc @@ -167,9 +167,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; + using NewtonController = Dumux::NewtonController<Scalar>; using NewtonMethod = NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/tutorial/solution/ex1/exercise1_2p2c.cc b/tutorial/solution/ex1/exercise1_2p2c.cc index 540215ccaa..313486242d 100644 --- a/tutorial/solution/ex1/exercise1_2p2c.cc +++ b/tutorial/solution/ex1/exercise1_2p2c.cc @@ -127,7 +127,7 @@ int main(int argc, char** argv) try // the non-linear solver using NewtonController = PriVarSwitchNewtonController<TypeTag>; using NewtonMethod = NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/tutorial/solution/ex1/exercise1_2pni_solution.cc b/tutorial/solution/ex1/exercise1_2pni_solution.cc index 40f5470d31..bd2b3e8357 100644 --- a/tutorial/solution/ex1/exercise1_2pni_solution.cc +++ b/tutorial/solution/ex1/exercise1_2pni_solution.cc @@ -125,9 +125,9 @@ int main(int argc, char** argv) try auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); // the non-linear solver - using NewtonController = Dumux::NewtonController<TypeTag>; + using NewtonController = Dumux::NewtonController<Scalar>; using NewtonMethod = NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop diff --git a/tutorial/solution/ex2/exercise2_solution.cc b/tutorial/solution/ex2/exercise2_solution.cc index 989056afa3..dba708fbc1 100644 --- a/tutorial/solution/ex2/exercise2_solution.cc +++ b/tutorial/solution/ex2/exercise2_solution.cc @@ -130,7 +130,7 @@ int main(int argc, char** argv)try // the non-linear solver using NewtonController = PriVarSwitchNewtonController<TypeTag>; using NewtonMethod = NewtonMethod<NewtonController, Assembler, LinearSolver>; - auto newtonController = std::make_shared<NewtonController>(leafGridView.comm(), timeLoop); + auto newtonController = std::make_shared<NewtonController>(timeLoop); NewtonMethod nonLinearSolver(newtonController, assembler, linearSolver); // time loop -- GitLab