NOX::StatusTest::Divergence Class Reference

Failure test based on a threshold value of the norm of F. More...

#include <NOX_StatusTest_Divergence.H>

Inheritance diagram for NOX::StatusTest::Divergence:

Inheritance graph
[legend]
Collaboration diagram for NOX::StatusTest::Divergence:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Divergence (double thresh, int n=1)
 Constructor.
virtual ~Divergence ()
 Destructor.
virtual NOX::StatusTest::StatusType checkStatus (const NOX::Solver::Generic &problem, NOX::StatusTest::CheckType checkType)
 Tests the stopping criterion.
virtual NOX::StatusTest::StatusType getStatus () const
 Return the result of the most recent checkStatus call.
virtual ostream & print (ostream &stream, int indent=0) const
 Output formatted description of stopping test to output stream.
virtual int getMaxNumSteps () const
 Returns the user-specified number of steps that can consecutively fail the threshold test before the test returns a failed status.
virtual int getCurrentNumSteps () const
 Returns the current number of steps that have consecutively failed the threshold test.
virtual double getThreshold () const
 Returns the user-specified threshold.

Private Attributes

int maxSteps
 User supplied value of n.
int numSteps
 Current number of consecutive nonlinear iterations that have failed the specified threshold.
int lastIteration
 The last nonlinear iteration index.
double threshold
 User specified threshold.
NOX::StatusTest::StatusType status
 Status


Detailed Description

Failure test based on a threshold value of the norm of F.

This status test returns NOX::StatusTest::Failed if the norm of F exceeds a threshold value for n consecutive iterations, i.e.

\[ \| F \| > {\rm threshold}\]

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 threshold are specified in the constructor, by n and thresh, respectively. While a value for thresh must be provided, a default value of n = 1 is assumed.

Definition at line 71 of file NOX_StatusTest_Divergence.H.


Constructor & Destructor Documentation

NOX::StatusTest::Divergence::Divergence ( double  thresh,
int  n = 1 
)

Constructor.

Parameters:
thresh - Threshold for divergence test
n - Number of consecutive nonlinear iterations

Definition at line 44 of file NOX_StatusTest_Divergence.C.

References NOX::StatusTest::Unevaluated.

NOX::StatusTest::Divergence::~Divergence (  )  [virtual]

Destructor.

Definition at line 53 of file NOX_StatusTest_Divergence.C.


Member Function Documentation

NOX::StatusTest::StatusType NOX::StatusTest::Divergence::checkStatus ( const NOX::Solver::Generic problem,
NOX::StatusTest::CheckType  checkType 
) [virtual]

Tests the stopping criterion.

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

Implements NOX::StatusTest::Generic.

Definition at line 58 of file NOX_StatusTest_Divergence.C.

References NOX::StatusTest::Failed, NOX::Abstract::Group::getNormF(), NOX::Solver::Generic::getNumIterations(), NOX::Solver::Generic::getSolutionGroup(), lastIteration, maxSteps, numSteps, status, threshold, and NOX::StatusTest::Unconverged.

NOX::StatusTest::StatusType NOX::StatusTest::Divergence::getStatus (  )  const [virtual]

Return the result of the most recent checkStatus call.

Implements NOX::StatusTest::Generic.

Definition at line 103 of file NOX_StatusTest_Divergence.C.

References status.

ostream & NOX::StatusTest::Divergence::print ( ostream &  stream,
int  indent = 0 
) const [virtual]

Output formatted description of stopping test to output stream.

Implements NOX::StatusTest::Generic.

Definition at line 108 of file NOX_StatusTest_Divergence.C.

References maxSteps, numSteps, status, and threshold.

int NOX::StatusTest::Divergence::getMaxNumSteps (  )  const [virtual]

Returns the user-specified number of steps that can consecutively fail the threshold test before the test returns a failed status.

Definition at line 123 of file NOX_StatusTest_Divergence.C.

References maxSteps.

int NOX::StatusTest::Divergence::getCurrentNumSteps (  )  const [virtual]

Returns the current number of steps that have consecutively failed the threshold test.

Definition at line 128 of file NOX_StatusTest_Divergence.C.

References numSteps.

double NOX::StatusTest::Divergence::getThreshold (  )  const [virtual]

Returns the user-specified threshold.

Definition at line 133 of file NOX_StatusTest_Divergence.C.

References threshold.


Member Data Documentation

User supplied value of n.

Definition at line 116 of file NOX_StatusTest_Divergence.H.

Referenced by checkStatus(), getMaxNumSteps(), and print().

Current number of consecutive nonlinear iterations that have failed the specified threshold.

Definition at line 119 of file NOX_StatusTest_Divergence.H.

Referenced by checkStatus(), getCurrentNumSteps(), and print().

The last nonlinear iteration index.

This is used to prevent counting a step multiple times if by chance the status test is called multiple times between iterations.

Definition at line 125 of file NOX_StatusTest_Divergence.H.

Referenced by checkStatus().

User specified threshold.

Definition at line 128 of file NOX_StatusTest_Divergence.H.

Referenced by checkStatus(), getThreshold(), and print().

Status

Definition at line 131 of file NOX_StatusTest_Divergence.H.

Referenced by checkStatus(), getStatus(), and print().


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

Generated on Thu Dec 17 11:03:09 2009 for Nonlinear Solver Project by  doxygen 1.5.9