27 #ifndef SCHNEK_DIAGNOSTIC_HPP_ 28 #define SCHNEK_DIAGNOSTIC_HPP_ 30 #include "../variables/block.hpp" 31 #include "../util/singleton.hpp" 33 #include <boost/shared_ptr.hpp> 60 virtual void open(
const std::string &) {}
61 virtual void write() {}
62 virtual void close() {}
63 virtual bool singleOut() {
return false; }
67 std::string parsedFileName(
int rank,
int timeCounter);
68 std::string parsedFileName(
int rank,
double physicalTime);
78 void execute(
bool master,
int rank,
int timeCounter);
92 void execute(
bool master,
int rank,
double physicalTime);
93 double getNextOutput();
98 typedef boost::shared_ptr<DiagnosticInterface> pDiagnosticInterface;
99 typedef std::list<pDiagnosticInterface> DiagList;
104 std::list<IntervalDiagnostic*> intervalDiags;
105 std::list<DeltaTimeDiagnostic*> deltaTimeDiags;
109 double *physicalTime;
110 bool usePhysicalTime;
114 friend class Singleton<DiagnosticManager>;
121 void setTimeCounter(
int *timecounter);
122 void setPhysicalTime(
double *physicalTime);
123 void setMaster(
bool master);
124 void setRank(
int rank);
126 double adjustDeltaT(
double deltaT);
131 template<
class Type,
typename Po
interType = boost::shared_ptr<Type>,
class DiagnosticType = IntervalDiagnostic>
136 std::string fieldName;
144 bool singleOut() {
return single_out; }
147 std::string getFieldName() {
return fieldName; }
158 void setSingleOut(
bool single_out_) { single_out = single_out_; }
161 template<
class Type,
typename Po
interType = boost::shared_ptr<Type>,
class DiagnosticType = IntervalDiagnostic >
165 std::ofstream output;
167 void open(
const std::string &);
175 #include "diagnostic.t" 177 #endif // SCHNEK_DIAGNOSTIC_HPP_ Definition: diagnostic.hpp:46
virtual bool isDerived()
Definition: diagnostic.hpp:156
Definition: singleton.hpp:79
Definition: diagnostic.hpp:162
DiagnosticInterface()
Default constructor.
Definition: diagnostic.cpp:36
virtual ~DiagnosticInterface()
Virtual destructor.
Definition: diagnostic.hpp:57
Definition: diagnostic.hpp:101
Definition: singleton.hpp:42
Definition: diagnostic.hpp:132
std::string fname
The file name into which to write.
Definition: diagnostic.hpp:50
int append
Append data at every write to the same file?
Definition: diagnostic.hpp:52
Definition: blockparameters.hpp:150
Definition: diagnostic.hpp:71