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 "SetupTimeIntegratorAction.h" 11 : #include "Transient.h" 12 : #include "Factory.h" 13 : #include "FEProblemBase.h" 14 : 15 : registerMooseAction("MooseApp", SetupTimeIntegratorAction, "setup_time_integrator"); 16 : registerMooseAction("MooseApp", SetupTimeIntegratorAction, "setup_time_integrators"); 17 : 18 : InputParameters 19 1536 : SetupTimeIntegratorAction::validParams() 20 : { 21 1536 : InputParameters params = MooseObjectAction::validParams(); 22 1536 : params.addClassDescription("Add a TimeIntegrator object to the simulation."); 23 1536 : return params; 24 0 : } 25 : 26 1129 : SetupTimeIntegratorAction::SetupTimeIntegratorAction(const InputParameters & parameters) 27 1129 : : MooseObjectAction(parameters) 28 : { 29 1129 : } 30 : 31 : void 32 1129 : SetupTimeIntegratorAction::act() 33 : { 34 1129 : std::string name; 35 : // Task: setup_time_integrator corresponding to [TimeIntegrator] block 36 1129 : if (_current_task == "setup_time_integrator") 37 1015 : name = _type; 38 : // Task: setup_time_integrators corresponding to [TimeIntegrators] block 39 : else 40 114 : name = _name; 41 : 42 1129 : _problem->addTimeIntegrator(_type, name, _moose_object_pars); 43 1129 : }