WARPXM v1.10.0
Loading...
Searching...
No Matches
diagnostics_writer.h
Go to the documentation of this file.
1#ifndef WXM_DIAGNOSTICS_WRITER_H
2#define WXM_DIAGNOSTICS_WRITER_H
3
6
7#include <memory>
8#include <vector>
9#include <fstream>
10
11namespace wxm
12{
13namespace diagnostics
14{
27{
31 real _write_interval;
32
36 real _next_write_time;
37
42 real _start_time;
43
48 size_t _written;
49
53 std::vector<std::unique_ptr<Diagnostic>> _diagnostics;
54
58 std::ofstream _out;
59
63 std::vector<real> _samples;
64
65public:
66 DiagnosticsWriter(const WmConstOpaquePtr& parent_solver) : WmHostAction(parent_solver)
67 {
68 }
69
70 bool needsDomain() const override
71 {
72 return false;
73 }
74
75 void setup(const WxCryptSet& wxc) override;
76
78
79 void typeCheck() override
80 {
81 }
82};
83} // namespace diagnostics
84} // namespace wxm
85
86#endif
Opaque Pointer object that carries the referenced data type, but does not expose this payload type as...
Definition: wmopaqueptr.h:81
The WmHostAction class is a base class for sub-solvers in the WARPXM system.
Definition: wmhostaction.h:35
WxCryptSet extends WxCrypt by providing, in addition to name-value pairs, an set of named WxCryptSets...
Definition: wxcryptset.h:35
Represents important parameters for the efficacy of a completing simulation step.
Definition: wxstepperstatus.h:19
Writes a collection of diagnostics to a CSV file.
Definition: diagnostics_writer.h:27
void typeCheck() override
Check that the provided variables meet the expected variable types for this hostaction.
Definition: diagnostics_writer.h:79
void setup(const WxCryptSet &wxc) override
Setup object using supplied crypset.
WxStepperStatus step() override
Advance the stepper by assigned time step.
bool needsDomain() const override
Return true if this updater needs a domain to work on.
Definition: diagnostics_writer.h:70
DiagnosticsWriter(const WmConstOpaquePtr &parent_solver)
Definition: diagnostics_writer.h:66
Base namespace for everything not included in the global namespace.
Definition: field_source.h:8
#define real
Definition: wmoclunstructuredreconstruction.h:11