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 "RestartableModelInterface.h" 11 : 12 : InputParameters 13 19512 : RestartableModelInterface::validParams() 14 : { 15 19512 : InputParameters params = emptyInputParameters(); 16 39024 : params.addParam<FileName>( 17 : "filename", "The name of the file which will be associated with the saved/loaded data."); 18 19512 : return params; 19 0 : } 20 : 21 3060 : RestartableModelInterface::RestartableModelInterface(const MooseObject & object, 22 : const bool read_only, 23 3060 : const std::string & meta_data_name) 24 3060 : : _model_object(object), 25 3060 : _model_meta_data_name(meta_data_name), 26 6120 : _model_restartable(_model_object.getMooseApp(), "", "", 0, read_only, meta_data_name) 27 : { 28 3060 : _model_object.getMooseApp().registerRestartableDataMapName(_model_meta_data_name, 29 3060 : _model_object.name()); 30 3060 : } 31 : 32 : const FileName & 33 708 : RestartableModelInterface::getModelDataFileName() const 34 : { 35 1416 : return _model_object.getParam<FileName>("filename"); 36 : } 37 : 38 : bool 39 1608 : RestartableModelInterface::hasModelData() const 40 : { 41 3216 : return _model_object.isParamValid("filename"); 42 : }