libMesh
file_history_data.h
Go to the documentation of this file.
1 #ifndef LIBMESH_FILE_HISTORY_DATA_H
2 #define LIBMESH_FILE_HISTORY_DATA_H
3 
4 #include "libmesh/history_data.h"
5 #include "libmesh/diff_system.h"
6 
7 namespace libMesh
8 {
9 
19  {
20  public:
21 
23 
25 
26  // Accessors for FileHistory specific variables
27  std::string & get_mesh_filename()
28  { return mesh_filename; }
29 
30  std::string & get_primal_filename()
31  { return primal_filename; }
32 
33  std::string & get_adjoint_filename()
34  { return adjoint_filename; }
35 
36  void set_mesh_filename(std::string & mesh_name)
37  { mesh_filename = mesh_name; }
38 
39  void set_primal_filename(std::string & primal_sol_name)
40  { primal_filename = primal_sol_name; }
41 
42  void set_adjoint_filename(std::string & adjoint_sol_name)
43  { adjoint_filename = adjoint_sol_name; }
44 
45  virtual void store_initial_solution() override;
46  virtual void store_primal_solution(stored_data_iterator stored_datum) override;
47  virtual void store_adjoint_solution() override;
48  virtual void rewrite_stored_solution() override;
49 
50  virtual void retrieve_primal_solution() override;
51  virtual void retrieve_adjoint_solution() override;
52 
53  private:
54 
55  // Reference to underlying system
57 
58  // File History specific variables
59  std::string mesh_filename;
60  std::string primal_filename;
61  std::string adjoint_filename;
62 
63  };
64 }
65 #endif
The History Data classes are companion classes to SolutionHistory and MeshHistory classes...
Definition: history_data.h:21
std::string & get_adjoint_filename()
void set_primal_filename(std::string &primal_sol_name)
virtual void rewrite_stored_solution() override
The libMesh namespace provides an interface to certain functionality in the library.
HistoryData subclass that provides a struct to store history data such as timestamps, mesh, primal and adjoint filenames and timestep sizes.
void set_mesh_filename(std::string &mesh_name)
This class provides a specific system class.
Definition: diff_system.h:54
std::string & get_primal_filename()
DifferentiableSystem & _system
virtual void store_initial_solution() override
void set_adjoint_filename(std::string &adjoint_sol_name)
virtual void store_adjoint_solution() override
virtual void retrieve_adjoint_solution() override
map_type::iterator stored_data_iterator
Definition: history_data.h:55
virtual void store_primal_solution(stored_data_iterator stored_datum) override
std::string & get_mesh_filename()
virtual void retrieve_primal_solution() override
FileHistoryData(DifferentiableSystem &system)