https://mooseframework.inl.gov
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 {
16 public:
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 
23 protected:
25  const std::vector<std::vector<Real>> & _sample_points;
26 
28  const std::vector<std::vector<Real>> & _sample_results;
29 
30 private:
31  unsigned int findNearestPoint(const std::vector<Real> & x) const;
32 };
unsigned int findNearestPoint(const std::vector< Real > &x) const
virtual Real evaluate(const std::vector< Real > &x) const override
Evaluate surrogate model given a row of parameters.
static InputParameters validParams()
const std::vector< double > y
NearestPointSurrogate(const InputParameters &parameters)
const std::vector< double > x
const std::vector< std::vector< Real > > & _sample_points
Array containing sample points.
virtual Real evaluate(const std::vector< Real > &x) const
Evaluate surrogate model given a row of parameters.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const std::vector< std::vector< Real > > & _sample_results
Array containing results.
const InputParameters & parameters() const