[P]arallel [Hi]gh-order [Li]brary for [P]DEs  Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
rbf_interpolation.h
1 #ifndef __RBF_INTERPOLATION__
2 #define __RBF_INTERPOLATION__
3 
4 #include <eigen/Eigen/Dense>
5 #include "ROL_OptimizationProblem.hpp"
6 #include "ROL_StdVector.hpp"
7 
8 namespace PHiLiP {
9 namespace ProperOrthogonalDecomposition {
10 using Eigen::MatrixXd;
11 using Eigen::VectorXd;
12 using Eigen::RowVectorXd;
13 
15 class RBFInterpolation: public ROL::Objective<double>
16 {
17 public:
19  RBFInterpolation(const MatrixXd& data_coordinates, const VectorXd& data_values, std::string kernel);
20 
22  void computeWeights();
23 
25  double radialBasisFunction(double r) const;
26 
28  double evaluate(const RowVectorXd& evaluate_coordinate) const;
29 
31  VectorXd weights;
32 
34  const MatrixXd data_coordinates;
35 
37  const VectorXd data_values;
38 
40  const std::string kernel;
41 
43  typedef std::vector<double> vector;
45  typedef ROL::Vector<double> V;
46 
48  template<class VectorType>
49  ROL::Ptr<const vector> getVector( const V& x ) {
50  return dynamic_cast<const VectorType&>((x)).getVector();
51  }
52 
54  double value(const ROL::Vector<double> &x, double &/*tol*/ );
55 
56 };
57 
58 }
59 }
60 
61 
62 #endif
ROL::Ptr< const vector > getVector(const V &x)
ROL required.
double evaluate(const RowVectorXd &evaluate_coordinate) const
Evaluate RBF.
Files for the baseline physics.
Definition: ADTypes.hpp:10
RBFInterpolation(const MatrixXd &data_coordinates, const VectorXd &data_values, std::string kernel)
Constructor.
double radialBasisFunction(double r) const
Choose radial basis function.
void computeWeights()
Compute RBF interpolation weights.
double value(const ROL::Vector< double > &x, double &)
ROL evaluate value.