00001 //@HEADER 00002 // ************************************************************************ 00003 // 00004 // NOX: An Object-Oriented Nonlinear Solver Package 00005 // Copyright (2002) Sandia Corporation 00006 // 00007 // LOCA: Library of Continuation Algorithms Package 00008 // Copyright (2005) Sandia Corporation 00009 // 00010 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00011 // license for use of this work by or on behalf of the U.S. Government. 00012 // 00013 // This library is free software; you can redistribute it and/or modify 00014 // it under the terms of the GNU Lesser General Public License as 00015 // published by the Free Software Foundation; either version 2.1 of the 00016 // License, or (at your option) any later version. 00017 // 00018 // This library is distributed in the hope that it will be useful, but 00019 // WITHOUT ANY WARRANTY; without even the implied warranty of 00020 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00021 // Lesser General Public License for more details. 00022 // 00023 // You should have received a copy of the GNU Lesser General Public 00024 // License along with this library; if not, write to the Free Software 00025 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00026 // USA 00027 // 00028 // Questions? Contact Roger Pawlowski (rppawlo@sandia.gov) or 00029 // Eric Phipps (etphipp@sandia.gov), Sandia National Laboratories. 00030 // ************************************************************************ 00031 // CVS Information 00032 // $Source: /space/CVS/Trilinos/packages/nox/src/NOX_StatusTest_Divergence.H,v $ 00033 // $Author: rppawlo $ 00034 // $Date: 2006/08/22 00:01:27 $ 00035 // $Revision: 1.4 $ 00036 // ************************************************************************ 00037 //@HEADER 00038 00039 #ifndef NOX_STATUS_DIVERGENCE_H 00040 #define NOX_STATUS_DIVERGENCE_H 00041 00042 #include "NOX_StatusTest_Generic.H" // base class 00043 00044 // Forward declarations 00045 namespace NOX { 00046 namespace Solver { 00047 class Generic; 00048 } 00049 } 00050 00051 namespace NOX { 00052 00053 namespace StatusTest { 00054 00056 00071 class Divergence : public Generic { 00072 00073 public: 00074 00076 00080 Divergence(double thresh, int n = 1); 00081 00083 virtual ~Divergence(); 00084 00092 virtual NOX::StatusTest::StatusType 00093 checkStatus(const NOX::Solver::Generic& problem, 00094 NOX::StatusTest::CheckType checkType); 00095 00096 virtual NOX::StatusTest::StatusType getStatus() const; 00097 00098 virtual ostream& print(ostream& stream, int indent = 0) const; 00099 00105 virtual int getMaxNumSteps() const; 00106 00108 virtual int getCurrentNumSteps() const; 00109 00111 virtual double getThreshold() const; 00112 00113 private: 00114 00116 int maxSteps; 00117 00119 int numSteps; 00120 00122 00125 int lastIteration; 00126 00128 double threshold; 00129 00131 NOX::StatusTest::StatusType status; 00132 00133 00134 }; 00135 00136 } // namespace Status 00137 } // namespace NOX 00138 00139 #endif