12#ifndef DUMUX_PNM_NEWTON_SOLVER_HH 
   13#define DUMUX_PNM_NEWTON_SOLVER_HH 
   27template<
class Assembler, 
class LinearSolver,
 
   35    using ParentType::ParentType;
 
   44                        const SolutionVector &uLastIter) 
final 
   49        auto& gridVariables = this->
assembler().gridVariables();
 
   50        auto& invasionState = gridVariables.gridFluxVarsCache().invasionState();
 
   51        switchedInLastIteration_ = invasionState.update(uCurrentIter, gridVariables.curGridVolVars(), gridVariables.gridFluxVarsCache());
 
   57            NewtonConsistencyChecks<typename Assembler::GridVariables, SolutionVector> checks;
 
   58            checks.performChecks(gridVariables, uCurrentIter, this->
assembler().prevSol());
 
 
   69        if (switchedInLastIteration_)
 
 
   82        auto& gridVariables = this->
assembler().gridVariables();
 
   83        gridVariables.gridFluxVarsCache().invasionState().reset();
 
 
   92        auto& gridVariables = this->
assembler().gridVariables();
 
   93        gridVariables.gridFluxVarsCache().invasionState().advance();
 
 
   97    bool switchedInLastIteration_{
false};
 
 
An implementation of a Newton solver. The comprehensive documentation is in Newton solver,...
Definition nonlinear/newtonsolver.hh:183
virtual void newtonFail(Variables &u)
Called if the Newton method broke down. This method is called after newtonEnd()
Definition nonlinear/newtonsolver.hh:704
virtual void newtonEndStep(Variables &vars, const SolutionVector &uLastIter)
Indicates that one Newton iteration was finished.
Definition nonlinear/newtonsolver.hh:609
typename Backend::DofVector SolutionVector
Definition nonlinear/newtonsolver.hh:188
virtual bool newtonConverged() const
Returns true if the error of the solution is below the tolerance.
Definition nonlinear/newtonsolver.hh:654
const Assembler & assembler() const
Definition common/pdesolver.hh:121
Consistency checks for the PNM two-phase model.
Definition newtonconsistencychecks.hh:60
A two-phase PNM specific newton solver.
Definition porenetwork/2p/newtonsolver.hh:30
bool newtonConverged() const final
Returns true if the current solution can be considered to be accurate enough. We enforce an additiona...
Definition porenetwork/2p/newtonsolver.hh:67
void newtonFail(SolutionVector &u) final
Called if the Newton method broke down. This method is called after newtonEnd() and resets the invasi...
Definition porenetwork/2p/newtonsolver.hh:79
void newtonSucceed() final
Called if the Newton method ended successfully This method is called after newtonEnd() and advances t...
Definition porenetwork/2p/newtonsolver.hh:90
void newtonEndStep(SolutionVector &uCurrentIter, const SolutionVector &uLastIter) final
Called after each Newton update.
Definition porenetwork/2p/newtonsolver.hh:43
Definition discretization/porenetwork/fvelementgeometry.hh:24
const Scalar PengRobinsonMixture< Scalar, StaticParameters >::u
Definition pengrobinsonmixture.hh:138
Consistency checks for the PNM two-phase model.
Reference implementation of a Newton solver.