Xyce  6.1
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-2015 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 <N_NLS_fwd.h>
35 
36 #include "NOX_StatusTest_Generic.H" // base class
37 
38 namespace Xyce {
39 namespace Nonlinear {
40 namespace N_NLS_NOX {
41 
42 //-----------------------------------------------------------------------------
43 // Class : PseudoTransientTest
44 //
45 // Purpose : a NOX-compatiable status test
46 // for pseudo transient continuation.
47 //
48 //
49 //
50 // Creator : Roger Pawlowski
51 //
52 // Creation Date : 2/1/02
53 //-----------------------------------------------------------------------------
54 
55 class PseudoTransientTest : public NOX::StatusTest::Generic {
56 
57 public:
58 
59  //---------------------------------------------------------------------------
60  // Function : PseudoTransientTest (constructor)
61  //
62  // Purpose : Constructs a NOX-compatiable status test
63  // for pseudo transient continuation.
64  //
65  //---------------------------------------------------------------------------
66  PseudoTransientTest(double maxStepSize, double minNormF);
67 
68  //---------------------------------------------------------------------------
69  // Function : Destructor
70  //---------------------------------------------------------------------------
72 
73  //---------------------------------------------------------------------------
74  // Purpose : Test stopping criterion given the current
75  // nonlinear problem
76  //---------------------------------------------------------------------------
77  NOX::StatusTest::StatusType
78  checkStatus(const NOX::Solver::Generic& problem,
79  NOX::StatusTest::CheckType checkType);
80  //---------------------------------------------------------------------------
81  // Purpose : Test stopping criterion given the current
82  // nonlinear problem
83  //---------------------------------------------------------------------------
84  NOX::StatusTest::StatusType getStatus() const { return status_; };
85 
86  //---------------------------------------------------------------------------
87  // Purpose : Output formatted description of stopping test to
88  // output stream.
89  //---------------------------------------------------------------------------
90  std::ostream& print(std::ostream& stream, int indent = 0) const;
91 
92 private:
93 
94  NOX::StatusTest::StatusType status_;
95  double maxStepSize_;
97  double minNormF_;
98  double currentNormF_;
99 
100 };
101 }}} // namespace N_NLS_NOX
102 
103 #endif
104 
Pure virtual class to augment a linear system.
NOX::StatusTest::StatusType checkStatus(const NOX::Solver::Generic &problem, NOX::StatusTest::CheckType checkType)
PseudoTransientTest(double maxStepSize, double minNormF)
std::ostream & print(std::ostream &stream, int indent=0) const