NOX  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
LOCA::StatusTest::MaxIters Class Reference

Failure test based on the maximum number of continuation steps. More...

#include <LOCA_StatusTest_MaxIters.H>

Inheritance diagram for LOCA::StatusTest::MaxIters:
Inheritance graph
[legend]
Collaboration diagram for LOCA::StatusTest::MaxIters:
Collaboration graph
[legend]

Public Member Functions

 MaxIters (int maxIterations, bool return_failed_on_max_steps=true, const Teuchos::RCP< const LOCA::GlobalData > globalData=Teuchos::null)
 Constructor. Specify the maximum number of nonlinear solver iterations, $k_{\max}$ ands optinally an error stream for printing errors.
 
virtual ~MaxIters ()
 Destructor.
 
virtual
LOCA::StatusTest::StatusType 
checkStatus (const LOCA::Abstract::Iterator &stepper, LOCA::StatusTest::CheckType status)
 Test the stopping criterion More...
 
virtual
LOCA::StatusTest::StatusType 
getStatus () const
 Return the result of the most recent checkStatus call.
 
virtual std::ostream & print (std::ostream &stream, int indent=0) const
 Output formatted description of stopping test to output stream.
 
virtual int getMaxIters () const
 Returns the Maximum number of iterations set in the constructor.
 
virtual int getNumIters () const
 Returns the current number of iterations taken by the solver. More...
 
- Public Member Functions inherited from LOCA::StatusTest::Abstract
 Abstract ()
 Constructor.
 
virtual ~Abstract ()
 Destructor.
 

Detailed Description

Failure test based on the maximum number of continuation steps.

Let $k$ denote the current number of iterations (accessed via LOCA::Stepper::getNumTotalSteps) and $k_{\max}$ denote the tolerance set in the constructor of this status test. This test returns LOCA::StatusTest::Failed if $ k \geq k_{\rm max}. $ Otherwise, it returns LOCA::StatusTest::NotFinished.

Note
If checkStatus is called with the type set to LOCA::StatusTest::None, it then the status is set to to LOCA::Status::Unevaluated and returned. (Also #niters is set to -1.)

Member Function Documentation

virtual LOCA::StatusTest::StatusType LOCA::StatusTest::MaxIters::checkStatus ( const LOCA::Abstract::Iterator stepper,
LOCA::StatusTest::CheckType  checkType 
)
virtual

Test the stopping criterion

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

Implements LOCA::StatusTest::Abstract.

int LOCA::StatusTest::MaxIters::getNumIters ( ) const
virtual

Returns the current number of iterations taken by the solver.

Returns -1 if the status of this test is NOX::StatusTest::Unevaluated.


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