www.mooseframework.org
SetupRecoverFileBaseAction.C
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 // MOOSE includes
12 #include "MooseApp.h"
13 #include "OutputWarehouse.h"
14 #include "Checkpoint.h"
15 #include "MooseObjectAction.h"
16 
17 registerMooseAction("MooseApp", SetupRecoverFileBaseAction, "setup_recover_file_base");
18 
19 template <>
22 {
24  return params;
25 }
26 
28 
29 void
31 {
32  // Do nothing if the App is not recovering
33  // Don't look for a checkpoint file unless we're the ultimate master app
35  return;
36 
38 
39  // Set the recover file base in the App
40  _console << "\nUsing " << _app.getRecoverFileBase() << " for recovery.\n\n";
41 }
std::string getRecoverFileBase()
The file_base for the recovery file.
Definition: MooseApp.h:363
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::string convertLatestCheckpoint(std::string orig, bool base_only=true)
Replaces "LATEST" placeholders with the latest checkpoint file name.
Definition: MooseUtils.C:45
Base class for actions.
Definition: Action.h:35
SetupRecoverFileBaseAction(InputParameters params)
Class constructor.
void setRecoverFileBase(std::string recover_base)
mutator for recover_base (set by RecoverBaseAction)
Definition: MooseApp.h:368
registerMooseAction("MooseApp", SetupRecoverFileBaseAction, "setup_recover_file_base")
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
InputParameters validParams< SetupRecoverFileBaseAction >()
MooseApp & _app
The MOOSE application this is associated with.
Definition: Action.h:183
bool isUltimateMaster()
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:528
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:859
InputParameters validParams< Action >()
Definition: Action.C:22