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 "SurrogateModel.h" 11 : #include "SurrogateTrainer.h" 12 : #include "Sampler.h" 13 : #include "StochasticToolsApp.h" 14 : 15 : InputParameters 16 10310 : SurrogateModel::validParams() 17 : { 18 10310 : InputParameters params = MooseObject::validParams(); 19 10310 : params += SamplerInterface::validParams(); 20 10310 : params += SurrogateModelInterface::validParams(); 21 10310 : params += RestartableModelInterface::validParams(); 22 20620 : params.addParam<UserObjectName>( 23 : "trainer", 24 : "The SurrogateTrainer object. If this is specified the trainer data is automatically " 25 : "gathered and available in this SurrogateModel object."); 26 10310 : params.registerBase("SurrogateModel"); 27 10310 : params.registerSystemAttributeName("SurrogateModel"); 28 10310 : return params; 29 0 : } 30 : 31 1535 : SurrogateModel::SurrogateModel(const InputParameters & parameters) 32 : : MooseObject(parameters), 33 : SamplerInterface(this), 34 : SurrogateModelInterface(this), 35 : RestartableModelInterface(*this, 36 : /*read_only=*/true, 37 3070 : isParamValid("trainer") 38 3740 : ? getSurrogateTrainer("trainer").modelMetaDataName() 39 5945 : : _type + "_" + name()) 40 : { 41 1535 : }