Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 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 : #include "TransientInterface.h" 11 : #include "FEProblem.h" 12 : 13 : InputParameters 14 10895319 : TransientInterface::validParams() 15 : { 16 : 17 10895319 : InputParameters params = emptyInputParameters(); 18 32685957 : params.addParam<bool>( 19 : "implicit", 20 21790638 : true, 21 : "Determines whether this object is calculated using an implicit or explicit form"); 22 : 23 10895319 : params.addParamNamesToGroup("implicit", "Advanced"); 24 10895319 : return params; 25 0 : } 26 : 27 548269 : TransientInterface::TransientInterface(const MooseObject * moose_object) 28 1096538 : : _ti_params(moose_object->parameters()), 29 548269 : _ti_feproblem(*_ti_params.getCheckedPointerParam<FEProblemBase *>("_fe_problem_base")), 30 548269 : _is_implicit(_ti_params.have_parameter<bool>("implicit") ? _ti_params.get<bool>("implicit") 31 : : true), 32 548269 : _t(_is_implicit ? _ti_feproblem.time() : _ti_feproblem.timeOld()), 33 548269 : _t_old(_ti_feproblem.timeOld()), 34 548269 : _t_step(_ti_feproblem.timeStep()), 35 548269 : _dt(_ti_feproblem.dt()), 36 548269 : _dt_old(_ti_feproblem.dtOld()), 37 548269 : _is_transient(_ti_feproblem.isTransient()), 38 1096538 : _ti_name(MooseUtils::shortName(_ti_params.get<std::string>("_object_name"))) 39 : { 40 548269 : } 41 : 42 517885 : TransientInterface::~TransientInterface() {}