3.4
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Loading...
Searching...
No Matches
Dumux::MultiDomainNewtonSolver< Assembler, LinearSolver, CouplingManager, Reassembler, Comm > Class Template Reference

Newton sover for coupled problems. More...

#include <dumux/multidomain/newtonsolver.hh>

Inheritance diagram for Dumux::MultiDomainNewtonSolver< Assembler, LinearSolver, CouplingManager, Reassembler, Comm >:

Description

template<class Assembler, class LinearSolver, class CouplingManager, class Reassembler = DefaultPartialReassembler, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
class Dumux::MultiDomainNewtonSolver< Assembler, LinearSolver, CouplingManager, Reassembler, Comm >

Newton sover for coupled problems.

Public Types

using Communication = Comm
using Assembler
 export the assembler and linear solver types
using LinearSolver
using Variables
 export the type of variables that represent a numerical solution

Public Member Functions

 MultiDomainNewtonSolver (std::shared_ptr< Assembler > assembler, std::shared_ptr< LinearSolver > linearSolver, std::shared_ptr< CouplingManager > couplingManager, const Comm &comm=Dune::MPIHelper::getCollectiveCommunication(), const std::string &paramGroup="")
 The constructor.
void newtonBeginStep (const Variables &varsCurrentIter) override
 Indicates the beginning of a Newton iteration.
void newtonBegin (Variables &vars) override
 Called before the Newton method is applied to an non-linear system of equations.
bool newtonConverged () const override
 Returns true if the error of the solution is below the tolerance.
void newtonEndStep (Variables &varsCurrentIter, const SolutionVector &uLastIter) override
 Indicates that one Newton iteration was finished.
const Communicationcomm () const
 the communicator for parallel runs
void setMaxRelativeShift (Scalar tolerance)
 Set the maximum acceptable difference of any primary variable between two iterations for declaring convergence.
void setMaxAbsoluteResidual (Scalar tolerance)
 Set the maximum acceptable absolute residual for declaring convergence.
void setResidualReduction (Scalar tolerance)
 Set the maximum acceptable residual norm reduction.
void setTargetSteps (int targetSteps)
 Set the number of iterations at which the Newton method should aim at.
void setMinSteps (int minSteps)
 Set the number of minimum iterations for the Newton method.
void setMaxSteps (int maxSteps)
 Set the number of iterations after which the Newton method gives up.
void solve (Variables &vars, TimeLoop &timeLoop) override
 Run the Newton method to solve a non-linear system. Does time step control when the Newton fails to converge.
void solve (Variables &vars) override
 Run the Newton method to solve a non-linear system. The solver is responsible for all the strategic decisions.
virtual bool newtonProceed (const Variables &varsCurrentIter, bool converged)
 Returns true if another iteration should be done.
virtual void assembleLinearSystem (const Variables &vars)
 Assemble the linear system of equations \(\mathbf{A}x - b = 0\).
void solveLinearSystem (SolutionVector &deltaU)
 Solve the linear system of equations \(\mathbf{A}x - b = 0\).
void newtonUpdate (Variables &vars, const SolutionVector &uLastIter, const SolutionVector &deltaU)
 Update the current solution with a delta vector.
virtual void newtonEnd ()
 Called if the Newton method ended (not known yet if we failed or succeeded).
virtual void newtonFail (Variables &u)
 Called if the Newton method broke down. This method is called after newtonEnd().
virtual void newtonSucceed ()
 Called if the Newton method ended successfully This method is called after newtonEnd().
void report (std::ostream &sout=std::cout) const
 output statistics / report
void resetReport ()
 reset the statistics
void reportParams (std::ostream &sout=std::cout) const
 Report the options and parameters this Newton is configured with.
Scalar suggestTimeStepSize (Scalar oldTimeStep) const
 Suggest a new time-step size based on the old time-step size.
void setVerbosity (int val)
 Specifies the verbosity level.
int verbosity () const
 Return the verbosity level.
const std::string & paramGroup () const
 Returns the parameter group.
void attachConvergenceWriter (std::shared_ptr< ConvergenceWriter > convWriter)
 Attach a convergence writer to write out intermediate results after each iteration.
void detachConvergenceWriter ()
 Detach the convergence writer to stop the output.
Scalar retryTimeStepReductionFactor () const
 Return the factor for reducing the time step after a Newton iteration has failed.
void setRetryTimeStepReductionFactor (const Scalar factor)
 Set the factor for reducing the time step after a Newton iteration has failed.
const Assemblerassembler () const
 Access the assembler.
Assemblerassembler ()
 Access the assembler.
const LinearSolverlinearSolver () const
 Access the linear solver.

Protected Member Functions

void solutionChanged_ (Variables &vars, const SolutionVector &uCurrentIter) override
 Update solution-depended quantities like grid variables after the solution has changed.
void computeResidualReduction_ (const Variables &vars)
bool enableResidualCriterion () const
LinearSolverlinearSolver ()
 Access the linear solver.
bool checkSizesOfSubMatrices (const Dune::MultiTypeBlockMatrix< FirstRow, Args... > &matrix) const
 Helper function to assure the MultiTypeBlockMatrix's sub-blocks have the correct sizes.

Protected Attributes

int targetSteps_
 optimal number of iterations we want to achieve
int minSteps_
 minimum number of iterations we do
int maxSteps_
 maximum number of iterations we do before giving up
int numSteps_
 actual number of steps done so far
Scalar reduction_
Scalar residualNorm_
Scalar lastReduction_
Scalar initialResidual_
Scalar shift_
Scalar lastShift_
std::ostringstream endIterMsgStream_
 message stream to be displayed at the end of iterations

Member Typedef Documentation

◆ Assembler

using Dumux::PDESolver< Assembler, LinearSolver >::Assembler
inherited

export the assembler and linear solver types

◆ Communication

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
using Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::Communication = Comm
inherited

◆ LinearSolver

◆ Variables

using Dumux::PDESolver< Assembler, LinearSolver >::Variables
inherited

export the type of variables that represent a numerical solution

Constructor & Destructor Documentation

◆ MultiDomainNewtonSolver()

template<class Assembler, class LinearSolver, class CouplingManager, class Reassembler = DefaultPartialReassembler, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
Dumux::MultiDomainNewtonSolver< Assembler, LinearSolver, CouplingManager, Reassembler, Comm >::MultiDomainNewtonSolver ( std::shared_ptr< Assembler > assembler,
std::shared_ptr< LinearSolver > linearSolver,
std::shared_ptr< CouplingManager > couplingManager,
const Comm & comm = Dune::MPIHelper::getCollectiveCommunication(),
const std::string & paramGroup = "" )
inline

The constructor.

Member Function Documentation

◆ assembleLinearSystem()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
virtual void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::assembleLinearSystem ( const Variables & vars)
inlinevirtualinherited

Assemble the linear system of equations \(\mathbf{A}x - b = 0\).

Parameters
varsThe current iteration's variables

◆ assembler() [1/2]

Assembler & Dumux::PDESolver< Assembler, LinearSolver >::assembler ( )
inlineinherited

Access the assembler.

◆ assembler() [2/2]

const Assembler & Dumux::PDESolver< Assembler, LinearSolver >::assembler ( ) const
inlineinherited

Access the assembler.

◆ attachConvergenceWriter()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::attachConvergenceWriter ( std::shared_ptr< ConvergenceWriter > convWriter)
inlineinherited

Attach a convergence writer to write out intermediate results after each iteration.

◆ checkSizesOfSubMatrices()

bool Dumux::PDESolver< Assembler, LinearSolver >::checkSizesOfSubMatrices ( const Dune::MultiTypeBlockMatrix< FirstRow, Args... > & matrix) const
inlineprotectedinherited

Helper function to assure the MultiTypeBlockMatrix's sub-blocks have the correct sizes.

◆ comm()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
const Communication & Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::comm ( ) const
inlineinherited

the communicator for parallel runs

◆ computeResidualReduction_()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::computeResidualReduction_ ( const Variables & vars)
inlineprotectedinherited

◆ detachConvergenceWriter()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::detachConvergenceWriter ( )
inlineinherited

Detach the convergence writer to stop the output.

◆ enableResidualCriterion()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
bool Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::enableResidualCriterion ( ) const
inlineprotectedinherited

◆ linearSolver() [1/2]

LinearSolver & Dumux::PDESolver< Assembler, LinearSolver >::linearSolver ( )
inlineprotectedinherited

Access the linear solver.

◆ linearSolver() [2/2]

const LinearSolver & Dumux::PDESolver< Assembler, LinearSolver >::linearSolver ( ) const
inlineinherited

Access the linear solver.

◆ newtonBegin()

template<class Assembler, class LinearSolver, class CouplingManager, class Reassembler = DefaultPartialReassembler, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::MultiDomainNewtonSolver< Assembler, LinearSolver, CouplingManager, Reassembler, Comm >::newtonBegin ( Variables & vars)
inlineoverridevirtual

Called before the Newton method is applied to an non-linear system of equations.

Parameters
varsThe variables representing the initial solution

Reimplemented from Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >.

◆ newtonBeginStep()

template<class Assembler, class LinearSolver, class CouplingManager, class Reassembler = DefaultPartialReassembler, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::MultiDomainNewtonSolver< Assembler, LinearSolver, CouplingManager, Reassembler, Comm >::newtonBeginStep ( const Variables & varsCurrentIter)
inlineoverridevirtual

Indicates the beginning of a Newton iteration.

Reimplemented from Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >.

◆ newtonConverged()

template<class Assembler, class LinearSolver, class CouplingManager, class Reassembler = DefaultPartialReassembler, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
bool Dumux::MultiDomainNewtonSolver< Assembler, LinearSolver, CouplingManager, Reassembler, Comm >::newtonConverged ( ) const
inlineoverridevirtual

Returns true if the error of the solution is below the tolerance.

Reimplemented from Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >.

◆ newtonEnd()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
virtual void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::newtonEnd ( )
inlinevirtualinherited

Called if the Newton method ended (not known yet if we failed or succeeded).

◆ newtonEndStep()

template<class Assembler, class LinearSolver, class CouplingManager, class Reassembler = DefaultPartialReassembler, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::MultiDomainNewtonSolver< Assembler, LinearSolver, CouplingManager, Reassembler, Comm >::newtonEndStep ( Variables & varsCurrentIter,
const SolutionVector & uLastIter )
inlineoverridevirtual

Indicates that one Newton iteration was finished.

Parameters
varsCurrentIterThe variables after the current Newton iteration
uLastIterThe solution at the beginning of the current Newton iteration

Reimplemented from Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >.

◆ newtonFail()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
virtual void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::newtonFail ( Variables & u)
inlinevirtualinherited

Called if the Newton method broke down. This method is called after newtonEnd().

◆ newtonProceed()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
virtual bool Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::newtonProceed ( const Variables & varsCurrentIter,
bool converged )
inlinevirtualinherited

Returns true if another iteration should be done.

Parameters
varsCurrentIterThe variables of the current Newton iteration
convergedif the Newton method's convergence criterion was met in this step

◆ newtonSucceed()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
virtual void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::newtonSucceed ( )
inlinevirtualinherited

Called if the Newton method ended successfully This method is called after newtonEnd().

Reimplemented in Dumux::PoreNetwork::TwoPNewtonSolver< Assembler, LinearSolver, NewtonConsistencyChecks >.

◆ newtonUpdate()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::newtonUpdate ( Variables & vars,
const SolutionVector & uLastIter,
const SolutionVector & deltaU )
inlineinherited

Update the current solution with a delta vector.

The error estimates required for the newtonConverged() and newtonProceed() methods should be updated inside this method.

Different update strategies, such as line search and chopped updates can be implemented. The default behavior is just to subtract deltaU from uLastIter, i.e.

\[ u^{k+1} = u^k - \Delta u^k \]

Parameters
varsThe variables after the current iteration
uLastIterThe solution vector after the last iteration
deltaUThe delta as calculated from solving the linear system of equations. This parameter also stores the updated solution.

◆ paramGroup()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
const std::string & Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::paramGroup ( ) const
inlineinherited

Returns the parameter group.

◆ report()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::report ( std::ostream & sout = std::cout) const
inlineinherited

output statistics / report

◆ reportParams()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::reportParams ( std::ostream & sout = std::cout) const
inlineinherited

Report the options and parameters this Newton is configured with.

◆ resetReport()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::resetReport ( )
inlineinherited

reset the statistics

◆ retryTimeStepReductionFactor()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
Scalar Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::retryTimeStepReductionFactor ( ) const
inlineinherited

Return the factor for reducing the time step after a Newton iteration has failed.

◆ setMaxAbsoluteResidual()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::setMaxAbsoluteResidual ( Scalar tolerance)
inlineinherited

Set the maximum acceptable absolute residual for declaring convergence.

Parameters
toleranceThe maximum absolute residual at which the scheme is considered finished

◆ setMaxRelativeShift()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::setMaxRelativeShift ( Scalar tolerance)
inlineinherited

Set the maximum acceptable difference of any primary variable between two iterations for declaring convergence.

Parameters
toleranceThe maximum relative shift between two Newton iterations at which the scheme is considered finished

◆ setMaxSteps()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::setMaxSteps ( int maxSteps)
inlineinherited

Set the number of iterations after which the Newton method gives up.

Parameters
maxStepsNumber of iterations after we give up

◆ setMinSteps()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::setMinSteps ( int minSteps)
inlineinherited

Set the number of minimum iterations for the Newton method.

Parameters
minStepsMinimum number of iterations

◆ setResidualReduction()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::setResidualReduction ( Scalar tolerance)
inlineinherited

Set the maximum acceptable residual norm reduction.

Parameters
toleranceThe maximum reduction of the residual norm at which the scheme is considered finished

◆ setRetryTimeStepReductionFactor()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::setRetryTimeStepReductionFactor ( const Scalar factor)
inlineinherited

Set the factor for reducing the time step after a Newton iteration has failed.

◆ setTargetSteps()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::setTargetSteps ( int targetSteps)
inlineinherited

Set the number of iterations at which the Newton method should aim at.

This is used to control the time-step size. The heuristic used is to scale the last time-step size by the deviation of the number of iterations used from the target steps.

Parameters
targetStepsNumber of iterations which are considered "optimal"

◆ setVerbosity()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::setVerbosity ( int val)
inlineinherited

Specifies the verbosity level.

◆ solutionChanged_()

template<class Assembler, class LinearSolver, class CouplingManager, class Reassembler = DefaultPartialReassembler, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::MultiDomainNewtonSolver< Assembler, LinearSolver, CouplingManager, Reassembler, Comm >::solutionChanged_ ( Variables & vars,
const SolutionVector & uCurrentIter )
inlineoverrideprotectedvirtual

Update solution-depended quantities like grid variables after the solution has changed.

Reimplemented from Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >.

◆ solve() [1/2]

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::solve ( Variables & vars)
inlineoverridevirtualinherited

Run the Newton method to solve a non-linear system. The solver is responsible for all the strategic decisions.

Parameters
varsThe variables object representing the current state of the numerical solution (primary and possibly secondary variables).

Implements Dumux::PDESolver< Assembler, LinearSolver >.

◆ solve() [2/2]

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::solve ( Variables & vars,
TimeLoop & timeLoop )
inlineoverridevirtualinherited

Run the Newton method to solve a non-linear system. Does time step control when the Newton fails to converge.

Parameters
varsThe variables object representing the current state of the numerical solution (primary and possibly secondary variables).
timeLoopThe time loop.

Reimplemented from Dumux::PDESolver< Assembler, LinearSolver >.

◆ solveLinearSystem()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
void Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::solveLinearSystem ( SolutionVector & deltaU)
inlineinherited

Solve the linear system of equations \(\mathbf{A}x - b = 0\).

Throws Dumux::NumericalProblem if the linear solver didn't converge.

If the linear solver doesn't accept multitype matrices we copy the matrix into a 1x1 block BCRS matrix for solving.

Parameters
deltaUThe difference between the current and the next solution

◆ suggestTimeStepSize()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
Scalar Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::suggestTimeStepSize ( Scalar oldTimeStep) const
inlineinherited

Suggest a new time-step size based on the old time-step size.

The default behavior is to suggest the old time-step size scaled by the ratio between the target iterations and the iterations required to actually solve the last time-step.

◆ verbosity()

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
int Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::verbosity ( ) const
inlineinherited

Return the verbosity level.

Member Data Documentation

◆ endIterMsgStream_

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
std::ostringstream Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::endIterMsgStream_
protectedinherited

message stream to be displayed at the end of iterations

◆ initialResidual_

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
Scalar Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::initialResidual_
protectedinherited

◆ lastReduction_

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
Scalar Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::lastReduction_
protectedinherited

◆ lastShift_

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
Scalar Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::lastShift_
protectedinherited

◆ maxSteps_

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
int Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::maxSteps_
protectedinherited

maximum number of iterations we do before giving up

◆ minSteps_

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
int Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::minSteps_
protectedinherited

minimum number of iterations we do

◆ numSteps_

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
int Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::numSteps_
protectedinherited

actual number of steps done so far

◆ reduction_

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
Scalar Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::reduction_
protectedinherited

◆ residualNorm_

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
Scalar Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::residualNorm_
protectedinherited

◆ shift_

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
Scalar Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::shift_
protectedinherited

◆ targetSteps_

template<class Assembler, class LinearSolver, class Reassembler = PartialReassembler<Assembler>, class Comm = Dune::CollectiveCommunication<Dune::MPIHelper::MPICommunicator>>
int Dumux::NewtonSolver< Assembler, LinearSolver, Reassembler, Comm >::targetSteps_
protectedinherited

optimal number of iterations we want to achieve


The documentation for this class was generated from the following file: