LCOV - code coverage report
Current view: top level - include/surrogates - GaussianProcessSurrogate.h (source / functions) Hit Total Coverage
Test: idaholab/moose stochastic_tools: f45d79 Lines: 1 1 100.0 %
Date: 2025-07-25 05:00:46 Functions: 0 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             : #pragma once
      11             : 
      12             : #include "SurrogateModel.h"
      13             : #include "Standardizer.h"
      14             : #include <Eigen/Dense>
      15             : #include "CovarianceInterface.h"
      16             : #include "GaussianProcess.h"
      17             : 
      18             : class GaussianProcessSurrogate : public SurrogateModel, public CovarianceInterface
      19             : {
      20             : public:
      21             :   static InputParameters validParams();
      22             :   GaussianProcessSurrogate(const InputParameters & parameters);
      23             :   using SurrogateModel::evaluate;
      24             :   virtual Real evaluate(const std::vector<Real> & x) const;
      25             :   virtual void evaluate(const std::vector<Real> & x, std::vector<Real> & y) const;
      26             :   virtual Real evaluate(const std::vector<Real> & x, Real & std) const;
      27             :   virtual void
      28             :   evaluate(const std::vector<Real> & x, std::vector<Real> & y, std::vector<Real> & std) const;
      29             : 
      30             :   /**
      31             :    * This function is called by LoadCovarianceDataAction when the surrogate is
      32             :    * loading training data from a file. The action must recreate the covariance
      33             :    * object before this surrogate can set the correct pointer.
      34             :    */
      35             :   virtual void setupCovariance(UserObjectName _covar_name);
      36             : 
      37             :   StochasticTools::GaussianProcess & gp() { return _gp; }
      38          32 :   const StochasticTools::GaussianProcess & getGP() const { return _gp; }
      39             : 
      40             : private:
      41             :   StochasticTools::GaussianProcess & _gp;
      42             : 
      43             :   /// Paramaters (x) used for training
      44             :   const RealEigenMatrix & _training_params;
      45             : };

Generated by: LCOV version 1.14