ABLATE Source Documentation  0.12.34
timeStepMonitor.hpp
1 #ifndef ABLATELIBRARY_TIMESTEPMONITOR_HPP
2 #define ABLATELIBRARY_TIMESTEPMONITOR_HPP
3 #include <memory>
4 #include "io/interval/interval.hpp"
5 #include "monitor.hpp"
6 #include "monitors/logs/log.hpp"
7 
8 namespace ablate::monitors {
9 class TimeStepMonitor : public Monitor {
10  private:
11  static PetscErrorCode MonitorTimeStep(TS ts, PetscInt step, PetscReal crtime, Vec u, void *ctx);
12  const std::shared_ptr<logs::Log> log;
13  const std::shared_ptr<io::interval::Interval> interval;
14 
15  public:
16  explicit TimeStepMonitor(std::shared_ptr<logs::Log> log = {}, std::shared_ptr<io::interval::Interval> interval = {});
17 
18  PetscMonitorFunction GetPetscFunction() override { return MonitorTimeStep; }
19 };
20 } // namespace ablate::monitors
21 #endif // ABLATELIBRARY_TIMESTEPMONITOR_HPP
Definition: monitor.hpp:12
Definition: timeStepMonitor.hpp:9
PetscMonitorFunction GetPetscFunction() override
Definition: timeStepMonitor.hpp:18
Definition: boundarySolverMonitor.hpp:16