ABLATE Source Documentation  0.12.34
ignitionDelayPeakYi.hpp
1 #ifndef ABLATELIBRARY_IGNITIONDELAYPEAKYI_HPP
2 #define ABLATELIBRARY_IGNITIONDELAYPEAKYI_HPP
3 
4 #include <monitors/logs/log.hpp>
5 #include "monitor.hpp"
6 
7 namespace ablate::monitors {
8 
12 class IgnitionDelayPeakYi : public Monitor {
13  private:
14  static PetscErrorCode MonitorIgnition(TS ts, PetscInt step, PetscReal crtime, Vec u, void *ctx);
15  const std::shared_ptr<logs::Log> log;
16  const std::shared_ptr<logs::Log> historyLog;
17 
18  const std::string species;
19  const std::vector<double> location;
20 
21  // The offset for the density and mass fractions in the solution array
22  PetscInt eulerId;
23  PetscInt yiId;
24  PetscInt yiOffset;
25  PetscInt cellOfInterest;
26 
27  std::vector<double> timeHistory;
28  std::vector<double> yiHistory;
29 
30  public:
31  explicit IgnitionDelayPeakYi(std::string species, std::vector<double> location, std::shared_ptr<logs::Log> log = {}, std::shared_ptr<logs::Log> historyLogIn = {});
32  ~IgnitionDelayPeakYi() override;
33 
34  void Register(std::shared_ptr<solver::Solver>) override;
35  PetscMonitorFunction GetPetscFunction() override { return MonitorIgnition; }
36 };
37 
38 } // namespace ablate::monitors
39 #endif // ABLATELIBRARY_IGNITIONDELAYPEAKYI_HPP
Definition: ignitionDelayPeakYi.hpp:12
void Register(std::shared_ptr< solver::Solver >) override
Definition: ignitionDelayPeakYi.cpp:26
PetscMonitorFunction GetPetscFunction() override
Definition: ignitionDelayPeakYi.hpp:35
Definition: monitor.hpp:12
Definition: boundarySolverMonitor.hpp:16