-
Notifications
You must be signed in to change notification settings - Fork 9
/
FullDataFile.h
95 lines (93 loc) · 2.58 KB
/
FullDataFile.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#ifndef FULLDATAFILE_H
#define FULLDATAFILE_H
#include <iostream>
#include <iomanip>
#include <fstream>
#include "Definitions.h"
#include "Utilities.h"
#include "TimingDataFile.h"
#include "Vec.h"
#include "VecOperators.h"
#include "VecBlas.h"
namespace Daetk
{
class FullDataFile : public TimingDataFile
{
public:
FullDataFile(const real& t0=0.0,const char* filename="data.txt");
virtual ~FullDataFile();
void functionEvaluation();
void jacobianEvaluation();
void linearSolverIteration();
void setLinearSolverIterations(int i);
void nonlinearSolverIteration();
void lineSearch();
virtual void stepTaken(int k,real h, real tn, real errorEstimate=0);
virtual void includeSolution(const real& t,const Vec& y);
void errorFailure();
void nonlinearSolverFailure();
void linearSolverFailure();
void conditionNumber(real& cond);
int getLinearSolverIterations();
int getGlobalLinearSolverIterations();
int getTotalLinearSolverIterations();
int getNonlinearSolverIterations();
int getGlobalNonlinearSolverIterations();
int getTotalNonlinearSolverIterations();
int getGlobalFunctionEvaluations ();
int getTotalFunctionEvaluations ();
//mwf added for convenience
int getGlobalJacobianEvaluations();
int getGlobalStepsTaken();
int getGlobalStepsFailed();
int getGlobalLinesearches();
int getGlobalLinearSolverFailures();
int getGlobalNonlinearSolverFailures();
//mwf end additions
void omitSolution();
void reset();
protected:
bool INCLUDE_SOLUTION;
real tlast, condition, avgCondition;
int functionEvaluations,
jacobianEvaluations,
linearSolverIterations,
nonlinearSolverIterations,
lineSearches,
stepsTaken,
orderOneStepsTaken,
orderTwoStepsTaken,
orderThreeStepsTaken,
orderFourStepsTaken,
orderFiveStepsTaken,
errorFailures,
nonlinearSolverFailures,
linearSolverFailures,
totalJacobianEvaluations,
totalFunctionEvaluations,
totalStepsTaken,
totalStepsFailed,
totalNonlinearSolverIterations,
totalNonlinearSolverFailures,
totalLinearSolverIterations,
totalLinearSolverFailures,
totalLinesearches,
totalErrorFailures,
globalJacobianEvaluations,
globalFunctionEvaluations,
globalStepsTaken,
globalStepsFailed,
globalNonlinearSolverIterations,
globalNonlinearSolverFailures,
globalLinearSolverIterations,
globalLinearSolverFailures,
globalLinesearches,
globalErrorFailures,
globalOrderOneStepsTaken,
globalOrderTwoStepsTaken,
globalOrderThreeStepsTaken,
globalOrderFourStepsTaken,
globalOrderFiveStepsTaken;
};
}//Daetk
#endif