www.mooseframework.org
TransientInterface.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 "TransientInterface.h"
16 #include "FEProblem.h"
17 
18 template <>
21 {
23  params.addParam<bool>(
24  "implicit",
25  true,
26  "Determines whether this object is calculated using an implicit or explicit form");
27 
28  params.addParamNamesToGroup("implicit", "Advanced");
29  return params;
30 }
31 
33  : _ti_params(moose_object->parameters()),
34  _ti_feproblem(*_ti_params.get<FEProblemBase *>("_fe_problem_base")),
35  _is_implicit(_ti_params.have_parameter<bool>("implicit") ? _ti_params.get<bool>("implicit")
36  : true),
37  _t(_is_implicit ? _ti_feproblem.time() : _ti_feproblem.timeOld()),
38  _t_step(_ti_feproblem.timeStep()),
39  _dt(_ti_feproblem.dt()),
40  _dt_old(_ti_feproblem.dtOld()),
41  _is_transient(_ti_feproblem.isTransient()),
42  _ti_name(MooseUtils::shortName(_ti_params.get<std::string>("_object_name")))
43 {
44 }
45 
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
InputParameters emptyInputParameters()
std::string shortName(const std::string &name)
Function for stripping name after the file / in parser block.
Definition: MooseUtils.C:325
TransientInterface(const MooseObject *moose_object)
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:36
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object...
InputParameters validParams< TransientInterface >()
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
This method takes a space delimited list of parameter names and adds them to the specified group name...