From e56fc2e45a04a1e82e4a46b8d63bf39ebd146eff Mon Sep 17 00:00:00 2001 From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de> Date: Mon, 9 Apr 2018 07:27:27 +0200 Subject: [PATCH] [NewtonSolver] Fix docu --- dumux/nonlinear/newtonsolver.hh | 27 ++++++++++--------- dumux/nonlinear/privarswitchnewtonsolver.hh | 8 ++---- .../nonequilibrium/newtonsolver.hh | 2 +- .../porousmediumflow/richards/newtonsolver.hh | 2 +- 4 files changed, 18 insertions(+), 21 deletions(-) diff --git a/dumux/nonlinear/newtonsolver.hh b/dumux/nonlinear/newtonsolver.hh index b50dbd7c63..82f9eca3de 100644 --- a/dumux/nonlinear/newtonsolver.hh +++ b/dumux/nonlinear/newtonsolver.hh @@ -19,9 +19,9 @@ /*! * \file * \ingroup Nonlinear - * \brief Reference implementation of a controller class for the Newton solver. + * \brief Reference implementation of the Newton solver. * - * Usually this controller should be sufficient. + * Usually this solver should be sufficient. */ #ifndef DUMUX_NEWTON_SOLVER_HH #define DUMUX_NEWTON_SOLVER_HH @@ -61,11 +61,12 @@ struct supportsPartialReassembly /*! * \ingroup Nonlinear - * \brief An implementation of a Newton controller - * \tparam Scalar the scalar type + * \brief An implementation of a Newton solver + * \tparam Assembler the assembler + * \tparam LinearSolver the linear solver * \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 + * defaults of the reference solver, derive your solver from * this class and simply overload the required methods. */ template <class Assembler, class LinearSolver, @@ -214,7 +215,7 @@ public: /*! * \brief Run the newton method to solve a non-linear system. - * The controller is responsible for all the strategic decisions. + * The solver is responsible for all the strategic decisions. */ void solve(SolutionVector& uCurrentIter, const std::unique_ptr<ConvergenceWriter>& convWriter = nullptr) { @@ -471,7 +472,7 @@ public: endIterMsgStream_.str(""); // When the Newton iterations are done: ask the model to check whether it makes sense - // TODO: how do we realize this? -> do this here in the newton controller + // TODO: how do we realize this? -> do this here in the newton solver // model_().checkPlausibility(); } @@ -620,7 +621,7 @@ private: /*! * \brief Run the newton method to solve a non-linear system. - * The controller is responsible for all the strategic decisions. + * The solver is responsible for all the strategic decisions. */ bool solve_(SolutionVector& uCurrentIter, const std::unique_ptr<ConvergenceWriter>& convWriter = nullptr) { @@ -643,11 +644,11 @@ private: { newtonBegin(uCurrentIter); - // execute the method as long as the controller thinks + // execute the method as long as the solver thinks // that we should do another iteration while (newtonProceed(uCurrentIter, newtonConverged())) { - // notify the controller that we're about to start + // notify the solver that we're about to start // a new timestep newtonBeginStep(uCurrentIter); @@ -708,7 +709,7 @@ private: newtonUpdate(uCurrentIter, uLastIter, deltaU); updateTimer.stop(); - // tell the controller that we're done with this iteration + // tell the solver that we're done with this iteration newtonEndStep(uCurrentIter, uLastIter); // if a convergence writer was specified compute residual and write output @@ -719,7 +720,7 @@ private: } } - // tell controller we are done + // tell solver we are done newtonEnd(); // reset state if newton failed @@ -729,7 +730,7 @@ private: return false; } - // tell controller we converged successfully + // tell solver we converged successfully newtonSucceed(); if (verbose_) { diff --git a/dumux/nonlinear/privarswitchnewtonsolver.hh b/dumux/nonlinear/privarswitchnewtonsolver.hh index 39359fdc1e..f28bb46a38 100644 --- a/dumux/nonlinear/privarswitchnewtonsolver.hh +++ b/dumux/nonlinear/privarswitchnewtonsolver.hh @@ -19,9 +19,7 @@ /*! * \file * \ingroup PorousmediumCompositional - * \brief Reference implementation of a controller class for the Newton solver. - * - * Usually this controller should be sufficient. + * \copydoc Dumux::PriVarSwitchNewtonSolver */ #ifndef DUMUX_PRIVARSWITCH_NEWTON_SOLVER_HH #define DUMUX_PRIVARSWITCH_NEWTON_SOLVER_HH @@ -37,9 +35,7 @@ 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 + * \brief A newton solver that handles primary variable switches */ template <class Assembler, class LinearSolver, class PrimaryVariableSwitch> class PriVarSwitchNewtonSolver : public NewtonSolver<Assembler, LinearSolver> diff --git a/dumux/porousmediumflow/nonequilibrium/newtonsolver.hh b/dumux/porousmediumflow/nonequilibrium/newtonsolver.hh index f12622d634..838d2f5e1c 100644 --- a/dumux/porousmediumflow/nonequilibrium/newtonsolver.hh +++ b/dumux/porousmediumflow/nonequilibrium/newtonsolver.hh @@ -20,7 +20,7 @@ * \file * \ingroup PorousmediumNonEquilibriumModel * \brief A MpNc specific newton solver. - * This controller calls the velocity averaging in the model after each iteration. + * This solver calls the velocity averaging in the model after each iteration. */ #ifndef DUMUX_NONEQUILIBRIUM_NEWTON_SOLVER_HH #define DUMUX_NONEQUILIBRIUM_NEWTON_SOLVER_HH diff --git a/dumux/porousmediumflow/richards/newtonsolver.hh b/dumux/porousmediumflow/richards/newtonsolver.hh index 1cd9e43786..0c89333066 100644 --- a/dumux/porousmediumflow/richards/newtonsolver.hh +++ b/dumux/porousmediumflow/richards/newtonsolver.hh @@ -33,7 +33,7 @@ namespace Dumux { * \ingroup RichardsModel * \brief A Richards model specific newton solver. * - * This controller 'knows' what a 'physically meaningful' solution is + * This solver 'knows' what a 'physically meaningful' solution is * and can thus do update smarter than the plain Newton solver. * * \todo make this typetag independent by extracting anything model specific from assembler -- GitLab