www.mooseframework.org
Restartable.C
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 #include "InputParameters.h"
16 #include "Restartable.h"
17 #include "SubProblem.h"
18 #include "FEProblem.h"
19 
21  std::string system_name,
22  SubProblem * subproblem)
23  : _restartable_name(parameters.get<std::string>("_object_name")),
24  _restartable_params(&parameters),
25  _restartable_system_name(system_name),
26  _restartable_tid(parameters.isParamValid("_tid") ? parameters.get<THREAD_ID>("_tid") : 0)
27 {
28  _restartable_subproblem = parameters.isParamValid("_subproblem")
29  ? parameters.get<SubProblem *>("_subproblem")
30  : (parameters.isParamValid("_fe_problem_base")
31  ? parameters.get<FEProblemBase *>("_fe_problem_base")
32  : (parameters.isParamValid("_fe_problem")
33  ? parameters.get<FEProblem *>("_fe_problem")
34  : subproblem));
35 }
36 
37 Restartable::Restartable(const std::string & name,
38  std::string system_name,
39  SubProblem & fe_problem,
40  THREAD_ID tid)
41  : _restartable_name(name),
42  _restartable_system_name(system_name),
43  _restartable_tid(tid),
44  _restartable_subproblem(&fe_problem)
45 {
46 }
47 
48 void
50  RestartableDataValue * data,
51  THREAD_ID tid)
52 {
54 }
55 
56 void
58 {
60 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:202
Restartable(const InputParameters &parameters, std::string system_name, SubProblem *subproblem=NULL)
Class constructor Populates the SubProblem and MooseMesh pointers.
Definition: Restartable.C:20
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Definition: FEProblem.h:30
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::string _restartable_name
The name of the object.
Definition: Restartable.h:196
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
void registerRecoverableDataOnSubProblem(std::string name)
Helper function so we don&#39;t have to include SubProblem in the header.
Definition: Restartable.C:57
virtual void registerRecoverableData(std::string name)
NOTE: This is an internal function meant for MOOSE use only!
Definition: SubProblem.C:426
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.
virtual void registerRestartableData(std::string name, RestartableDataValue *data, THREAD_ID tid)
Register a piece of restartable data.
Definition: SubProblem.C:420
void registerRestartableDataOnSubProblem(std::string name, RestartableDataValue *data, THREAD_ID tid)
Helper function so we don&#39;t have to include SubProblem in the header.
Definition: Restartable.C:49
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:53
SubProblem * _restartable_subproblem
Pointer to the SubProblem class.
Definition: Restartable.h:208
THREAD_ID _restartable_tid
The thread ID for this object.
Definition: Restartable.h:205
Abstract definition of a RestartableData value.
unsigned int THREAD_ID
Definition: MooseTypes.h:79