https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NearestPointSurrogate.h
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
10#pragma once
11
12#include "SurrogateModel.h"
13
15{
16public:
20 virtual Real evaluate(const std::vector<Real> & x) const override;
21 virtual void evaluate(const std::vector<Real> & x, std::vector<Real> & y) const override;
22
23protected:
25 const std::vector<std::vector<Real>> & _sample_points;
26
28 const std::vector<std::vector<Real>> & _sample_results;
29
30private:
31 unsigned int findNearestPoint(const std::vector<Real> & x) const;
32};
const std::vector< double > y
const std::vector< double > x
const InputParameters & parameters() const
const std::vector< std::vector< Real > > & _sample_points
Array containing sample points.
const std::vector< std::vector< Real > > & _sample_results
Array containing results.
virtual Real evaluate(const std::vector< Real > &x) const override
Evaluate surrogate model given a row of parameters.
unsigned int findNearestPoint(const std::vector< Real > &x) const
static InputParameters validParams()
virtual Real evaluate(const std::vector< Real > &x) const
Evaluate surrogate model given a row of parameters.