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

List of all members.

Public Member Functions

def __init__
def checkStatus
def getStatus
def getNormUpdate
def getTolerance

Public Attributes

 this

Static Public Attributes

 Unscaled = _StatusTest.NormUpdate_Unscaled
 Scaled = _StatusTest.NormUpdate_Scaled

Detailed Description

Various convergence tests based on the norm of the change in the
solution vector, $ x $, between outer iterations.

If checkStatusEfficiently is called with the type set to
NOX::StatusTest::None, then the status is set to
NOX::StatusTest::Unevaluated and returned. (Also #normUpdate is set to
-1.0.)

If checkStatusEfficiently is called on the first iteration, then the
status is set to NOX::StatusTest::Unconverged and returned. (Also
#normUpdate is set to -1.0.)

If checkStatusEfficiently is called on a problem where the solution
group does not have F evaluated (i.e.,
problem.getSolutionGroup().isF() is false), then the status is set to
NOX::StatusTest::Unconverged and returned. (Also #normUpdate is set to
-1.0.)

Finally, we return NOX::StatusTest::Converged if $\\alpha <
\\beta$ and NOX::StatusTest::Uncoverged otherwise. Here $\\alpha$
represents the norm of $ \\Delta x $ and $\\beta$ represents the
tolerance. We define:

\\[ \\Delta x = x_k - x_{k-1} \\]

where $ x_k $ is the solution vector of the $ k $-th nonlinear
iterate.

Let $\\gamma$ denote an optional scale factor defined as

$\\gamma = \\frac{1}{n}$ if sType in the constructor is
NOX::NormF::Scaled, and

$\\gamma = 1$ if sType in the constructor is NOX::NormF::Unscaled.

Then $\\alpha$ is defined as follows:

If nType in the constructor is Abstract::Vector::TWO, then \\[
\\alpha = \\sqrt{ \\gamma \\sum_{i=1}^n \\Delta x_i^2 }
\\]

If nType in the constructor is Abstract::Vector::ONE, then \\[
\\alpha = \\gamma \\sum_{i=1}^n | \\Delta x_i | \\]

If nType in the constructor is Abstract::Vector::INF, then \\[
\\alpha = \\gamma \\max_{i} | \\Delta x_i | \\]

Finally, $\\beta$ is set to the tolerance in the constructor, i.e.,

\\[ \\beta = \\mbox{tolerance} \\]

C++ includes: NOX_StatusTest_NormUpdate.H 

Constructor & Destructor Documentation

__init__(NOX::StatusTest::NormUpdate self, double tolerance, NOX::Abstract::Vector::NormType ntype, NOX::StatusTest::NormUpdate::ScaleType stype=Scaled) -> NormUpdate
__init__(NOX::StatusTest::NormUpdate self, double tolerance, NOX::StatusTest::NormUpdate::ScaleType stype=Scaled) -> NormUpdate

NormUpdate::NormUpdate(double tolerance, ScaleType stype=Scaled)

Constructor for absolute norm.

This constructor defaults to the Absolute ToleranceType and TWO
NormType. 

Member Function Documentation

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

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

Test the stopping criterion

The test can (and should, if possible) be skipped if checkType is
NOX::StatusType::None. If the test is skipped, then the status should
be set to NOX::StatusTest::Unevaluated. 

Reimplemented from PyTrilinos.NOX.StatusTest.Generic.

getNormUpdate(NormUpdate self) -> double

double NOX::StatusTest::NormUpdate::getNormUpdate() const

Returns the value of the Update-norm computed in the last call to
checkStatus. 
getStatus(NormUpdate self) -> NOX::StatusTest::StatusType

StatusType NormUpdate::getStatus() const

Return the result of the most recent checkStatus call. 

Reimplemented from PyTrilinos.NOX.StatusTest.Generic.

getTolerance(NormUpdate self) -> double

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

Returns the true tolerance. 

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