ABLATE Source Documentation  0.12.33
boundarySolverMonitor.hpp
1 #ifndef ABLATELIBRARY_BOUNDARYSOLVERMONITOR_HPP
2 #define ABLATELIBRARY_BOUNDARYSOLVERMONITOR_HPP
3 
4 #include <petsc.h>
5 #include "boundarySolver/boundarySolver.hpp"
6 #include "domain/region.hpp"
7 #include "domain/subDomain.hpp"
8 #include "eos/eos.hpp"
9 #include "finiteVolume/boundaryConditions/ghost.hpp"
10 #include "finiteVolume/compressibleFlowFields.hpp"
11 #include "finiteVolume/finiteVolumeSolver.hpp"
12 #include "io/interval/interval.hpp"
13 #include "monitor.hpp"
14 #include "monitors/logs/log.hpp"
15 
16 namespace ablate::monitors {
17 
22  private:
26  std::string name = "_monitor";
27 
31  std::shared_ptr<ablate::boundarySolver::BoundarySolver> boundarySolver;
32 
36  DM boundaryDm = nullptr;
37 
41  DM faceDm = nullptr;
42 
43  public:
47  ~BoundarySolverMonitor() override;
48 
53  void Register(std::shared_ptr<solver::Solver> solver) override;
54 
59  PetscMonitorFunction GetPetscFunction() override { return nullptr; }
60 
65  [[nodiscard]] const std::string& GetId() const override { return name; }
66 
73  PetscErrorCode Save(PetscViewer viewer, PetscInt sequenceNumber, PetscReal time) override;
74 
81  PetscErrorCode Restore(PetscViewer viewer, PetscInt sequenceNumber, PetscReal time) override { return 0; }
82 };
83 
84 } // namespace ablate::monitors
85 #endif // ABLATELIBRARY_BOUNDARYSOLVERMONITOR_HPP
Definition: serializable.hpp:13
Definition: boundarySolverMonitor.hpp:21
void Register(std::shared_ptr< solver::Solver > solver) override
Definition: boundarySolverMonitor.cpp:14
const std::string & GetId() const override
Definition: boundarySolverMonitor.hpp:65
PetscErrorCode Save(PetscViewer viewer, PetscInt sequenceNumber, PetscReal time) override
Definition: boundarySolverMonitor.cpp:88
~BoundarySolverMonitor() override
Definition: boundarySolverMonitor.cpp:4
PetscMonitorFunction GetPetscFunction() override
Definition: boundarySolverMonitor.hpp:59
PetscErrorCode Restore(PetscViewer viewer, PetscInt sequenceNumber, PetscReal time) override
Definition: boundarySolverMonitor.hpp:81
Definition: monitor.hpp:12
Definition: boundarySolverMonitor.hpp:16