Xyce  6.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
N_NLS_NOX_PseudoTransientTest.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // Copyright Notice
3 //
4 // Copyright 2002 Sandia Corporation. Under the terms
5 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
6 // Government retains certain rights in this software.
7 //
8 // Xyce(TM) Parallel Electrical Simulator
9 // Copyright (C) 2002-2014 Sandia Corporation
10 //
11 // This program is free software: you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation, either version 3 of the License, or
14 // (at your option) any later version.
15 //
16 // This program is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 //-----------------------------------------------------------------------------
24 
25 #ifndef Xyce_N_NLS_NOX_PseudoTransientTest_h
26 #define Xyce_N_NLS_NOX_PseudoTransientTest_h
27 
28 // ---------- Standard Includes ----------
29 
30 // ---------- Xyce Includes ----------
31 
32 // ---------- NOX Includes ----------
33 
34 #include "NOX_StatusTest_Generic.H" // base class
35 
36 // ---------- Forward Declarations ----------
37 
38 namespace N_NLS_LOCA {
39  class Group;
40 }
41 
42 // ---------- Namespace Declarations ----------
43 
44 // N_NLS namespace is for the Xyce Nonlinear Solver Package
45 namespace N_NLS_NOX {
46 
47 //-----------------------------------------------------------------------------
48 // Class : N_NLS_NOX::PseudoTransientTest
49 //
50 // Purpose : a NOX-compatiable status test
51 // for pseudo transient continuation.
52 //
53 //
54 //
55 // Creator : Roger Pawlowski
56 //
57 // Creation Date : 2/1/02
58 //-----------------------------------------------------------------------------
59 
60 class PseudoTransientTest : public NOX::StatusTest::Generic {
61 
62 public:
63 
64  //---------------------------------------------------------------------------
65  // Function : PseudoTransientTest (constructor)
66  //
67  // Purpose : Constructs a NOX-compatiable status test
68  // for pseudo transient continuation.
69  //
70  //---------------------------------------------------------------------------
71  PseudoTransientTest(double maxStepSize, double minNormF);
72 
73  //---------------------------------------------------------------------------
74  // Function : Destructor
75  //---------------------------------------------------------------------------
77 
78  //---------------------------------------------------------------------------
79  // Purpose : Test stopping criterion given the current
80  // nonlinear problem
81  //---------------------------------------------------------------------------
82  NOX::StatusTest::StatusType
83  checkStatus(const NOX::Solver::Generic& problem,
84  NOX::StatusTest::CheckType checkType);
85  //---------------------------------------------------------------------------
86  // Purpose : Test stopping criterion given the current
87  // nonlinear problem
88  //---------------------------------------------------------------------------
89  NOX::StatusTest::StatusType getStatus() const { return status_; };
90 
91  //---------------------------------------------------------------------------
92  // Purpose : Output formatted description of stopping test to
93  // output stream.
94  //---------------------------------------------------------------------------
95  std::ostream& print(std::ostream& stream, int indent = 0) const;
96 
97 private:
98 
99  NOX::StatusTest::StatusType status_;
100  double maxStepSize_;
102  double minNormF_;
104 
105 };
106 } // namespace N_NLS_NOX
107 
108 #endif
109