NOX Development
Loading...
Searching...
No Matches
NOX::Solver::PseudoTransient Class Reference

Pseudo-transient solver. More...

#include <NOX_Solver_PseudoTransient.hpp>

Inheritance diagram for NOX::Solver::PseudoTransient:
Collaboration diagram for NOX::Solver::PseudoTransient:

Public Member Functions

 PseudoTransient (const Teuchos::RCP< NOX::Abstract::Group > &xGrp, const Teuchos::RCP< NOX::StatusTest::Generic > &tests, const Teuchos::RCP< Teuchos::ParameterList > &params)
void setParameterList (const Teuchos::RCP< Teuchos::ParameterList > &paramList)
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters () const
void reset (const NOX::Abstract::Vector &initialGuess, const Teuchos::RCP< NOX::StatusTest::Generic > &tests)
 Resets the solver, sets a new status test, and sets a new initial guess.
void reset (const NOX::Abstract::Vector &initialGuess)
 Resets the solver and sets a new initial guess.
void reset ()
 Resets the solver for another solve. This resets the counters and status only. Uses the final solution from the last solve as the initial guess for the next solve.
NOX::StatusTest::StatusType step ()
 Do one nonlinear step in the iteration sequence and return status.
NOX::StatusTest::StatusType solve ()
 Solve the nonlinear problem and return final status.
const NOX::Abstract::GroupgetSolutionGroup () const
 Return a reference to the current solution group.
const NOX::Abstract::GroupgetPreviousSolutionGroup () const
 Return a reference to the previous solution group.
NOX::StatusTest::StatusType getStatus () const
 Returns the current status of the solver.
int getNumIterations () const
 Get number of iterations.
const Teuchos::ParameterList & getList () const
 Return a reference to the solver parameters.
double getStepSize () const
Teuchos::RCP< const NOX::Abstract::GroupgetSolutionGroupPtr () const
 Return a RCP to the solution group.
Teuchos::RCP< const NOX::Abstract::GroupgetPreviousSolutionGroupPtr () const
 Return a RCP to the previous solution group.
Teuchos::RCP< const Teuchos::ParameterList > getListPtr () const
 Return a RCP to the solver parameters.
Teuchos::RCP< const NOX::SolverStatsgetSolverStatistics () const
 Return a RCP to the solver statistics.
Public Member Functions inherited from NOX::Solver::Generic
 Generic ()
 Constructor (does nothing).
virtual ~Generic ()
 Destructor (does nothing).

Protected Member Functions

virtual void init ()
virtual void printUpdate ()

Protected Attributes

Teuchos::RCP< NOX::GlobalDataglobalDataPtr
 Pointer to the global data object.
Teuchos::RCP< NOX::UtilsutilsPtr
 Utils.
Teuchos::RCP< NOX::Abstract::GroupsolnPtr
 Current solution.
Teuchos::RCP< NOX::Abstract::GroupoldSolnPtr
 Previous solution pointer.
Teuchos::RCP< NOX::Abstract::GrouptransientResidualGroup
 Group used to evaluate a transient residual.
Teuchos::RCP< NOX::Abstract::VectordirPtr
 Current search direction pointer.
Teuchos::RCP< NOX::StatusTest::GenerictestPtr
 Stopping test.
Teuchos::RCP< NOX::LineSearch::GenericlineSearchPtr
 Input parameters.
Teuchos::RCP< NOX::Direction::GenericdirectionPtr
 Search Direction.
double stepSize
 Current step.
int nIter
 Number of nonlinear iterations.
NOX::StatusTest::StatusType status
 Status of nonlinear solver.
NOX::StatusTest::CheckType checkType
 Type of check to use for status tests. See NOX::StatusTest for more details.
Teuchos::RCP< NOX::Observerobserver
 Pointer to a user defined NOX::Observer object.
Teuchos::RCP< NOX::Thyra::GroupthyraSolnGroup
 Pointer to solnPtr casted back to a thyra group.
Teuchos::RCP< NOX::Thyra::GroupthyraOldSolnGroup
 Pointer to oldSolnPtr casted back to a thyra group.
Teuchos::RCP< NOX::Thyra::GroupthyraTransientResidualGroup
 Group used to evaluate a transient residual.
double delta
 Step size for pseudo-transient stepping.
double inv_delta
 Inverse step size for pseudo-transient stepping.
double deltaInit
 Initial step size.
double deltaMax
 Maximum step size.
double deltaMin
 Minimum step size.
double deltaOld
 Step size from previous iteration.
double time
 Pseudo-transient time.
Teuchos::RCP< ::Thyra::VectorBase< double > > x_dot
 solution time derivative used for scaling operator V in pseudo-transient paper
bool use_transient_residual
 If set to true, the candidate direction will use the transient residual instead of the steady-state residual. This is a modification of the Kelley-Keyes paper.
int max_pseudo_transient_iterations
 Maximum number of iterations before pseudo-transient is disabled and the algorithm switches to a line search-based direct to steady state solve.
Teuchos::RCP< Teuchos::ParameterList > validParameters
 Parameters that are valid for this solver.

Detailed Description

Pseudo-transient solver.

Requires that the Thyra::ModelEvaluator implement transient support (uses alpha, beta, Jacobian evaluation and optionally x_dot in residual).

Based on the 1998 Kelley Keyes paper, with minor modifications.

Member Function Documentation

◆ getList()

const Teuchos::ParameterList & NOX::Solver::PseudoTransient::getList ( ) const
virtual

Return a reference to the solver parameters.

Implements NOX::Solver::Generic.

◆ getListPtr()

Teuchos::RCP< const Teuchos::ParameterList > NOX::Solver::PseudoTransient::getListPtr ( ) const
virtual

Return a RCP to the solver parameters.

Implements NOX::Solver::Generic.

◆ getNumIterations()

int NOX::Solver::PseudoTransient::getNumIterations ( ) const
virtual

Get number of iterations.

Implements NOX::Solver::Generic.

References nIter.

◆ getPreviousSolutionGroup()

const NOX::Abstract::Group & NOX::Solver::PseudoTransient::getPreviousSolutionGroup ( ) const
virtual

Return a reference to the previous solution group.

Implements NOX::Solver::Generic.

References oldSolnPtr.

◆ getPreviousSolutionGroupPtr()

Teuchos::RCP< const NOX::Abstract::Group > NOX::Solver::PseudoTransient::getPreviousSolutionGroupPtr ( ) const
virtual

Return a RCP to the previous solution group.

Implements NOX::Solver::Generic.

References oldSolnPtr.

◆ getSolutionGroup()

const NOX::Abstract::Group & NOX::Solver::PseudoTransient::getSolutionGroup ( ) const
virtual

Return a reference to the current solution group.

Implements NOX::Solver::Generic.

References solnPtr.

◆ getSolutionGroupPtr()

Teuchos::RCP< const NOX::Abstract::Group > NOX::Solver::PseudoTransient::getSolutionGroupPtr ( ) const
virtual

Return a RCP to the solution group.

Implements NOX::Solver::Generic.

References solnPtr.

◆ getSolverStatistics()

Teuchos::RCP< const NOX::SolverStats > NOX::Solver::PseudoTransient::getSolverStatistics ( ) const
virtual

Return a RCP to the solver statistics.

Implements NOX::Solver::Generic.

References globalDataPtr.

◆ getStatus()

NOX::StatusTest::StatusType NOX::Solver::PseudoTransient::getStatus ( ) const
virtual

Returns the current status of the solver.

Implements NOX::Solver::Generic.

References status.

◆ reset() [1/3]

void NOX::Solver::PseudoTransient::reset ( )
virtual

Resets the solver for another solve. This resets the counters and status only. Uses the final solution from the last solve as the initial guess for the next solve.

NOTE: All NOX solvers will call reset() automatically at teh beginning of the solve() method. We add the reset() method to the solver interface for the application to call in case the application needs to reset counters and status manually before the next call to solve() is made.

Implements NOX::Solver::Generic.

References globalDataPtr, nIter, status, stepSize, time, and NOX::StatusTest::Unconverged.

◆ reset() [2/3]

void NOX::Solver::PseudoTransient::reset ( const NOX::Abstract::Vector & initial_guess)
virtual

Resets the solver and sets a new initial guess.

Implements NOX::Solver::Generic.

References globalDataPtr, nIter, solnPtr, status, stepSize, time, and NOX::StatusTest::Unconverged.

◆ reset() [3/3]

void NOX::Solver::PseudoTransient::reset ( const NOX::Abstract::Vector & initial_guess,
const Teuchos::RCP< NOX::StatusTest::Generic > & test )
virtual

Resets the solver, sets a new status test, and sets a new initial guess.

Implements NOX::Solver::Generic.

References globalDataPtr, nIter, solnPtr, status, stepSize, testPtr, time, and NOX::StatusTest::Unconverged.

Referenced by solve().

◆ solve()

NOX::StatusTest::StatusType NOX::Solver::PseudoTransient::solve ( )
virtual

Solve the nonlinear problem and return final status.

By "solve", we call iterate() until the NOX::StatusTest value is either NOX::StatusTest::Converged or NOX::StatusTest::Failed.

Implements NOX::Solver::Generic.

References nIter, observer, reset(), solnPtr, status, step(), and NOX::StatusTest::Unconverged.

◆ step()

Member Data Documentation

◆ checkType

NOX::StatusTest::CheckType NOX::Solver::PseudoTransient::checkType
protected

Type of check to use for status tests. See NOX::StatusTest for more details.

Referenced by step().

◆ delta

double NOX::Solver::PseudoTransient::delta
protected

Step size for pseudo-transient stepping.

Referenced by step().

◆ deltaInit

double NOX::Solver::PseudoTransient::deltaInit
protected

Initial step size.

Referenced by step().

◆ deltaMax

double NOX::Solver::PseudoTransient::deltaMax
protected

Maximum step size.

Referenced by step().

◆ deltaMin

double NOX::Solver::PseudoTransient::deltaMin
protected

Minimum step size.

Referenced by step().

◆ deltaOld

double NOX::Solver::PseudoTransient::deltaOld
protected

Step size from previous iteration.

Referenced by step().

◆ directionPtr

Teuchos::RCP<NOX::Direction::Generic> NOX::Solver::PseudoTransient::directionPtr
protected

Search Direction.

Referenced by step().

◆ dirPtr

Teuchos::RCP<NOX::Abstract::Vector> NOX::Solver::PseudoTransient::dirPtr
protected

Current search direction pointer.

Referenced by step().

◆ globalDataPtr

Teuchos::RCP<NOX::GlobalData> NOX::Solver::PseudoTransient::globalDataPtr
protected

Pointer to the global data object.

Referenced by getSolverStatistics(), reset(), reset(), reset(), and step().

◆ inv_delta

double NOX::Solver::PseudoTransient::inv_delta
protected

Inverse step size for pseudo-transient stepping.

Referenced by step().

◆ lineSearchPtr

Teuchos::RCP<NOX::LineSearch::Generic> NOX::Solver::PseudoTransient::lineSearchPtr
protected

Input parameters.

Linesearch.

Referenced by step().

◆ max_pseudo_transient_iterations

int NOX::Solver::PseudoTransient::max_pseudo_transient_iterations
protected

Maximum number of iterations before pseudo-transient is disabled and the algorithm switches to a line search-based direct to steady state solve.

Referenced by step().

◆ nIter

int NOX::Solver::PseudoTransient::nIter
protected

Number of nonlinear iterations.

Referenced by getNumIterations(), reset(), reset(), reset(), solve(), and step().

◆ observer

Teuchos::RCP<NOX::Observer> NOX::Solver::PseudoTransient::observer
protected

Pointer to a user defined NOX::Observer object.

Referenced by solve(), and step().

◆ oldSolnPtr

Teuchos::RCP<NOX::Abstract::Group> NOX::Solver::PseudoTransient::oldSolnPtr
protected

Previous solution pointer.

Referenced by getPreviousSolutionGroup(), getPreviousSolutionGroupPtr(), and step().

◆ solnPtr

Teuchos::RCP<NOX::Abstract::Group> NOX::Solver::PseudoTransient::solnPtr
protected

Current solution.

Referenced by getSolutionGroup(), getSolutionGroupPtr(), reset(), reset(), solve(), and step().

◆ status

NOX::StatusTest::StatusType NOX::Solver::PseudoTransient::status
protected

Status of nonlinear solver.

Referenced by getStatus(), reset(), reset(), reset(), solve(), and step().

◆ stepSize

double NOX::Solver::PseudoTransient::stepSize
protected

Current step.

Referenced by reset(), reset(), reset(), and step().

◆ testPtr

Teuchos::RCP<NOX::StatusTest::Generic> NOX::Solver::PseudoTransient::testPtr
protected

Stopping test.

Referenced by reset(), and step().

◆ thyraOldSolnGroup

Teuchos::RCP<NOX::Thyra::Group> NOX::Solver::PseudoTransient::thyraOldSolnGroup
protected

Pointer to oldSolnPtr casted back to a thyra group.

Referenced by step().

◆ thyraSolnGroup

Teuchos::RCP<NOX::Thyra::Group> NOX::Solver::PseudoTransient::thyraSolnGroup
protected

Pointer to solnPtr casted back to a thyra group.

Referenced by step().

◆ thyraTransientResidualGroup

Teuchos::RCP<NOX::Thyra::Group> NOX::Solver::PseudoTransient::thyraTransientResidualGroup
protected

Group used to evaluate a transient residual.

Referenced by step().

◆ time

double NOX::Solver::PseudoTransient::time
protected

Pseudo-transient time.

Referenced by reset(), reset(), reset(), and step().

◆ use_transient_residual

bool NOX::Solver::PseudoTransient::use_transient_residual
protected

If set to true, the candidate direction will use the transient residual instead of the steady-state residual. This is a modification of the Kelley-Keyes paper.

Referenced by step().

◆ utilsPtr

Teuchos::RCP<NOX::Utils> NOX::Solver::PseudoTransient::utilsPtr
protected

Utils.

Referenced by step().

◆ x_dot

Teuchos::RCP< ::Thyra::VectorBase<double> > NOX::Solver::PseudoTransient::x_dot
protected

solution time derivative used for scaling operator V in pseudo-transient paper

Referenced by step().


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