LCOV - code coverage report
Current view: top level - src/interfaces - RestartableModelInterface.C (source / functions) Hit Total Coverage
Test: idaholab/moose stochastic_tools: f45d79 Lines: 16 17 94.1 %
Date: 2025-07-25 05:00:46 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          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             : }

Generated by: LCOV version 1.14