https://mooseframework.inl.gov
AddCovarianceAction.C
Go to the documentation of this file.
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 
20 {
22  params.addClassDescription("Adds Covariance objects contained within "
23  "the `[Trainers]` and `[Surrogates]` input blocks.");
24  return params;
25 }
26 
28 {
29 }
30 
31 void
33 {
34  _problem->addObject<CovarianceFunctionBase>(
35  _type, _name, _moose_object_pars, /* threaded = */ false);
36 }
37 
38 #endif
const std::string & _name
static InputParameters validParams()
Base class for covariance functions that are used in Gaussian Processes.
virtual void act() override
AddCovarianceAction(const InputParameters &params)
static InputParameters validParams()
registerMooseAction("StochasticToolsApp", AddCovarianceAction, "add_covariance")
std::string _type
InputParameters _moose_object_pars
void addClassDescription(const std::string &doc_string)
std::shared_ptr< FEProblemBase > & _problem