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