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 : #ifdef MOOSE_LIBTORCH_ENABLED 10 : 11 : #include "AddCovarianceAction.h" 12 : #include "Factory.h" 13 : #include "FEProblem.h" 14 : #include "CovarianceFunctionBase.h" 15 : 16 : registerMooseAction("StochasticToolsApp", AddCovarianceAction, "add_covariance"); 17 : 18 : InputParameters 19 242 : AddCovarianceAction::validParams() 20 : { 21 242 : InputParameters params = MooseObjectAction::validParams(); 22 242 : params.addClassDescription("Adds Covariance objects contained within " 23 : "the `[Trainers]` and `[Surrogates]` input blocks."); 24 242 : return params; 25 0 : } 26 : 27 242 : AddCovarianceAction::AddCovarianceAction(const InputParameters & params) : MooseObjectAction(params) 28 : { 29 242 : } 30 : 31 : void 32 242 : AddCovarianceAction::act() 33 : { 34 484 : _problem->addObject<CovarianceFunctionBase>( 35 242 : _type, _name, _moose_object_pars, /* threaded = */ false); 36 242 : } 37 : 38 : #endif