13 #ifndef included_Interpolator_h
14 #define included_Interpolator_h
54 Interpolator(
const std::vector<Vector> & parameter_points,
55 const std::vector<std::shared_ptr<Matrix>> & rotation_matrices,
58 std::string interp_method,
59 double closest_rbf_val = 0.9,
60 bool compute_gradients =
false);
160 const std::vector<Vector> & parameter_points,
161 const std::string & interp_method,
const std::string & rbf,
double epsilon,
181 const std::vector<Vector> & parameter_points,
182 const std::string & interp_method,
const std::string & rbf,
double epsilon,
183 const Vector & point,
const int index);
198 const Vector & point2,
const int index);
216 double obtainRBF(std::string rbf,
double epsilon,
const Vector & point1,
228 const std::string & rbf,
double closest_rbf_val);
241 const std::vector<Vector> & parameter_points,
242 const std::vector<std::shared_ptr<Matrix>> & bases,
245 std::unique_ptr<std::vector<Vector>>
246 scalarsToVectors(
const std::vector<double> & s);
std::vector< std::shared_ptr< Vector > > d_interpolation_gradient
Gradient with respect to the parameters. Only exists after interpolate has been run.
std::vector< std::shared_ptr< Matrix > > d_rotation_matrices
The reduced bases with compatible coordinates.
double d_epsilon
The RBF parameter that determines the width of influence. a small epsilon: larger influential width a...
int d_ref_point
The index within the vector of parameter points to the reference point.
int d_rank
The rank of the process this object belongs to.
std::unique_ptr< Matrix > d_lambda_T
The RHS of the linear solve in tangential space.
std::vector< Vector > d_parameter_points
The sampled parameter points.
int d_num_procs
The number of processors being run on.
bool d_compute_gradients
Flag that determines if a gradient with respect to the parameters should be computed.
std::string d_rbf
The RBF type (gaussian, multiquadric, inverse quadratic, inverse multiquadric)
std::string d_interp_method
The interpolation method (linear solve, inverse distance weighting, lagrangian polynomials)
double rbfWeightedSum(std::vector< double > &rbf)
Compute the sum of the RBF weights.
std::vector< std::shared_ptr< Matrix > > obtainRotationMatrices(const std::vector< Vector > ¶meter_points, const std::vector< std::shared_ptr< Matrix >> &bases, int ref_point)
Obtain the rotation matrices for all the parameter points using the basis of the reference point.
std::vector< double > obtainRBFGradientToTrainingPoints(const std::vector< Vector > ¶meter_points, const std::string &interp_method, const std::string &rbf, double epsilon, const Vector &point, const int index)
Compute the RBF gradient from the parameter points with the unsampled parameter point.
std::vector< double > obtainRBFToTrainingPoints(const std::vector< Vector > ¶meter_points, const std::string &interp_method, const std::string &rbf, double epsilon, const Vector &point)
Compute the RBF from the parameter points with the unsampled parameter point.
double convertClosestRBFToEpsilon(const std::vector< Vector > ¶meter_points, const std::string &rbf, double closest_rbf_val)
Convert closest RBF value to an epsilon value.
double obtainRBF(std::string rbf, double epsilon, const Vector &point1, const Vector &point2)
Compute the RBF between two points.
double obtainRBFGradient(std::string rbf, double epsilon, const Vector &point1, const Vector &point2, const int index)
Compute the RBF gradient between two points.