PyTrilinos  Development
 All Classes Functions
Public Member Functions | Public Attributes
PyTrilinos.NOX.StatusTest.Stagnation Class Reference
Inheritance diagram for PyTrilinos.NOX.StatusTest.Stagnation:
Inheritance graph
[legend]
Collaboration diagram for PyTrilinos.NOX.StatusTest.Stagnation:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def checkStatus
def getStatus
def getMaxNumSteps
def getCurrentNumSteps
def getTolerance
def getConvRate

Public Attributes

 this

Detailed Description

Failure test based on the convergence rate between nonlinear
iterations.

This status test returns NOX::StatusTest::Failed if we fail to reduce
the norm of $F$ by a specified tolerance for n consecutive iterations.
In other words, if

\\[ \\frac{\\| F_k \\|}{\\| F_{k-1} \\|} \\geq {\\rm
tolerance}\\]

for n consecutive iterations, the status is set to
NOX::StatusTest::Failed and returned. Otherwise, the status is set to
NOX::StatusTest::Uncoverged and returned. Both n and the tolerance are
specified in the constructor, by n and tol, respectively.

Based on experience the following values are recommended:

For Newton solves: n = 50, tolerance = 1.0

For Newton solves with a line search: n = 15, tolerance = 0.99

C++ includes: NOX_StatusTest_Stagnation.H 

Constructor & Destructor Documentation

__init__(NOX::StatusTest::Stagnation self, int n=50, double tol=1.0) -> Stagnation

NOX::StatusTest::Stagnation::Stagnation(int n=50, double tol=1.0)

Constructor.

Parameters:
-----------

n:  - Number of consecutive nonlinear iterations

tol:  - Tolerance for stagnation test 

Member Function Documentation

checkStatus(Stagnation self, NOX::Solver::Generic const & problem, NOX::StatusTest::CheckType checkType) -> NOX::StatusTest::StatusType

NOX::StatusTest::StatusType
NOX::StatusTest::Stagnation::checkStatus(const NOX::Solver::Generic
&problem, NOX::StatusTest::CheckType checkType)

Tests the stopping criterion.

The nature of this test is such that it must be executed at every
nonlinear iteration, so we don't use the checkType argument. 

Reimplemented from PyTrilinos.NOX.StatusTest.Generic.

getConvRate(Stagnation self) -> double

double NOX::StatusTest::Stagnation::getConvRate() const

Returns the current convergence rate. 
getCurrentNumSteps(Stagnation self) -> int

int NOX::StatusTest::Stagnation::getCurrentNumSteps() const

Returns the current number of steps that have consecutively failed the
tolerance test. 
getMaxNumSteps(Stagnation self) -> int

int NOX::StatusTest::Stagnation::getMaxNumSteps() const

Returns the used specified number of steps that can consecutively fail
the tolerance test before the test returns a failed status. 
getStatus(Stagnation self) -> NOX::StatusTest::StatusType

NOX::StatusTest::StatusType NOX::StatusTest::Stagnation::getStatus()
const

Return the result of the most recent checkStatus call. 

Reimplemented from PyTrilinos.NOX.StatusTest.Generic.

getTolerance(Stagnation self) -> double

double NOX::StatusTest::Stagnation::getTolerance() const

Returns the user specified tolerance. 

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