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