27 #ifndef SCHNEK_DIAGNOSTIC_HPP_ 28 #define SCHNEK_DIAGNOSTIC_HPP_ 30 #include "../variables/block.hpp" 31 #include "../util/singleton.hpp" 61 virtual void open(
const std::string &) {}
67 virtual bool singleOut() {
return false; }
71 std::string parsedFileName(
int rank,
int timeCounter);
72 std::string parsedFileName(
int rank,
double physicalTime);
82 void execute(
bool master,
int rank,
int timeCounter);
97 void execute(
bool master,
int rank,
double physicalTime);
98 double getNextOutput();
99 double getDeltaTime();
104 typedef std::shared_ptr<DiagnosticInterface> pDiagnosticInterface;
105 typedef std::list<pDiagnosticInterface> DiagList;
110 std::list<IntervalDiagnostic*> intervalDiags;
111 std::list<DeltaTimeDiagnostic*> deltaTimeDiags;
115 double *physicalTime;
116 bool usePhysicalTime;
120 friend class Singleton<DiagnosticManager>;
127 void setTimeCounter(
int *timecounter);
128 void setPhysicalTime(
double *physicalTime);
129 void setMaster(
bool master);
130 void setRank(
int rank);
132 double adjustDeltaT(
double deltaT);
137 template<
class Type,
typename Po
interType = std::shared_ptr<Type>,
class DiagnosticType = IntervalDiagnostic>
142 std::string fieldName;
150 bool singleOut() {
return single_out; }
153 std::string getFieldName() {
return fieldName; }
164 void setSingleOut(
bool single_out_) { single_out = single_out_; }
167 template<
class Type,
typename Po
interType = std::shared_ptr<Type>,
class DiagnosticType = IntervalDiagnostic >
171 std::ofstream output;
173 void open(
const std::string &);
181 #include "diagnostic.t" 183 #endif // SCHNEK_DIAGNOSTIC_HPP_ virtual void open(const std::string &)
Open the output file.
Definition: diagnostic.hpp:61
Definition: diagnostic.hpp:47
virtual bool isDerived()
Definition: diagnostic.hpp:162
virtual void close()
Close the output file.
Definition: diagnostic.hpp:65
virtual void write()
Write into the touput file.
Definition: diagnostic.hpp:63
Definition: singleton.hpp:80
Definition: singleton.hpp:42
Definition: diagnostic.hpp:168
DiagnosticInterface()
Default constructor.
Definition: diagnostic.cpp:36
virtual ~DiagnosticInterface()
Virtual destructor.
Definition: diagnostic.hpp:58
Definition: diagnostic.hpp:107
Definition: diagnostic.hpp:138
std::string fname
The file name into which to write.
Definition: diagnostic.hpp:51
int append
Append data at every write to the same file?
Definition: diagnostic.hpp:53
Definition: blockparameters.hpp:149
Definition: diagnostic.hpp:75