www.mooseframework.org
Checkpoint.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef CHECKPOINT_H
16 #define CHECKPOINT_H
17 
18 // MOOSE includes
19 #include "FileOutput.h"
20 #include "RestartableDataIO.h"
21 
22 #include <deque>
23 
24 // Forward declarations
25 class Checkpoint;
27 
28 template <>
30 
35 {
37  std::string checkpoint;
38 
40  std::string system;
41 
43  std::string restart;
44 };
45 
49 class Checkpoint : public FileOutput
50 {
51 public:
56  Checkpoint(const InputParameters & parameters);
57 
61  virtual std::string filename() override;
62 
67  std::string directory();
68 
69 protected:
74  virtual void output(const ExecFlagType & type) override;
75 
76 private:
77  void updateCheckpointFiles(CheckpointFileNames file_struct);
78 
80  unsigned int _num_files;
81 
83  const std::string _suffix;
84 
86  bool _binary;
87 
90 
93 
95  std::set<std::string> & _recoverable_data;
96 
99 
102 
105 
107  std::deque<CheckpointFileNames> _file_names;
108 };
109 
110 #endif // CHECKPOINT_H
A structure for storing the various output files associated with checkpoint output.
Definition: Checkpoint.h:34
Class for doing restart.
RestartableDataIO _restartable_data_io
RestrableData input/output interface.
Definition: Checkpoint.h:104
Stores the stateful material properties computed by materials.
std::string checkpoint
Filename for CheckpointIO file.
Definition: Checkpoint.h:37
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const std::string _suffix
Directory suffix.
Definition: Checkpoint.h:83
std::string system
Filename for EquationsSystems::write.
Definition: Checkpoint.h:40
const MaterialPropertyStorage & _material_property_storage
Reference to the material property storage.
Definition: Checkpoint.h:98
InputParameters validParams< Checkpoint >()
Definition: Checkpoint.C:31
const MaterialPropertyStorage & _bnd_material_property_storage
Reference to the boundary material property storage.
Definition: Checkpoint.h:101
bool _parallel_mesh
True if running with parallel mesh.
Definition: Checkpoint.h:89
Container for storing material properties.
std::string restart
Filename for restartable data filename.
Definition: Checkpoint.h:43
bool _binary
True if outputing checkpoint files in binary format.
Definition: Checkpoint.h:86
std::set< std::string > & _recoverable_data
Reference to the recoverable data.
Definition: Checkpoint.h:95
MatType type
const RestartableDatas & _restartable_data
Reference to the restartable data.
Definition: Checkpoint.h:92
std::deque< CheckpointFileNames > _file_names
Vector of checkpoint filename structures.
Definition: Checkpoint.h:107
ExecFlagType
Execution flags - when is the object executed/evaluated.
Definition: MooseTypes.h:90
An outputter with filename support.
Definition: FileOutput.h:32
unsigned int _num_files
Max no. of output files to store.
Definition: Checkpoint.h:80