-
Notifications
You must be signed in to change notification settings - Fork 298
/
NOX_StatusTest_SgnChange.H
52 lines (39 loc) · 1.16 KB
/
NOX_StatusTest_SgnChange.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef NOX_STATUSTEST_SGNCHANGE_H
#define NOX_STATUSTEST_SGNCHANGE_H
#include "NOX_Solver_Generic.H"
#include "NOX_StatusTest_Generic.H" // base class
#include "NOX_LAPACK_Vector.H"
namespace NOX{
namespace StatusTest{
class SgnChange : public Generic {
public:
//! Constructor
SgnChange() = delete;//avoid default constructor, only available in C++-11
SgnChange(double tol);
//! Destructor
~SgnChange();
// derived
virtual StatusType checkStatus(const NOX::Solver::Generic& problem, NOX::StatusTest::CheckType checkType);
// derived
virtual StatusType getStatus() const;
// derived
virtual std::ostream& print(std::ostream& stream, int indent = 0) const;
private:
//! %do initialization in checkStatus only once
void initialize(const NOX::Solver::Generic& problem);
//! %Status
StatusType _status;
//! %Tolerance
double _tol;
//! %Number of sign changes
int _numSignChanges;
//! %Only initialize once
bool _firstCall;
//! %Dimension of solution and function
unsigned int _dimSys;
//! %solution/function vector pointers
Teuchos::RCP<NOX::LAPACK::Vector> _x0,_x1,_f0,_f1;
};
}//namespace StatusTest
}//namespace NOX
#endif