www.mooseframework.org
Resurrector.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 // MOOSE includes
13 #include "RestartableDataIO.h"
14 #include "PerfGraphInterface.h"
15 
16 // C++ includes
17 #include <string>
18 
19 // Forward declarations
20 class FEProblemBase;
21 
28 {
29 public:
30  Resurrector(FEProblemBase & fe_problem);
31  virtual ~Resurrector() = default;
32 
37  void setRestartFile(const std::string & file_base);
38 
44  void setRestartSuffix(const std::string & file_ext);
45 
49  void restartFromFile();
50 
52 
53 protected:
56 
58  std::string _restart_file_base;
59 
61  std::string _restart_file_suffix;
62 
65 
69 
70  static const std::string MAT_PROP_EXT;
71  static const std::string RESTARTABLE_DATA_EXT;
72 };
73 
virtual ~Resurrector()=default
Class for doing restart.
Definition: Resurrector.h:27
PerfID _restart_from_file_timer
Timers.
Definition: Resurrector.h:67
std::string _restart_file_suffix
name of the file extension that we restart from
Definition: Resurrector.h:61
Class for doing restart.
Resurrector(FEProblemBase &fe_problem)
Definition: Resurrector.C:23
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
unsigned int PerfID
Definition: MooseTypes.h:163
static const std::string MAT_PROP_EXT
Definition: Resurrector.h:70
void restartRestartableData()
Definition: Resurrector.C:72
void setRestartFile(const std::string &file_base)
Set the file base name from which we will restart.
Definition: Resurrector.C:34
Interface for objects that needs transient capabilities.
FEProblemBase & _fe_problem
Reference to a FEProblemBase being restarted.
Definition: Resurrector.h:55
void restartFromFile()
Perform a restart from a file.
Definition: Resurrector.C:46
void setRestartSuffix(const std::string &file_ext)
Set the file extension from which we will restart libMesh equation systems.
Definition: Resurrector.C:40
static const std::string RESTARTABLE_DATA_EXT
Definition: Resurrector.h:71
RestartableDataIO _restartable
Restartable Data.
Definition: Resurrector.h:64
std::string _restart_file_base
name of the file that we restart from
Definition: Resurrector.h:58
PerfID _restart_restartable_data_timer
Definition: Resurrector.h:68