|
libROM
v1.0
Data-driven physical simulation library
|
#include <VectorInterpolator.h>
Public Member Functions | |
| VectorInterpolator (const std::vector< Vector > ¶meter_points, const std::vector< std::shared_ptr< Matrix >> &rotation_matrices, const std::vector< std::shared_ptr< Vector >> &reduced_vectors, int ref_point, std::string rbf="G", std::string interp_method="LS", double closest_rbf_val=0.9, bool compute_gradients=false) | |
| Constructor. More... | |
| std::shared_ptr< Vector > | interpolate (const Vector &point) |
| Obtain the interpolated reduced vector of the unsampled parameter point. More... | |
| std::vector< std::shared_ptr< Vector > > | getGradient () |
| Returns the interpolated matrix's gradient. | |
Additional Inherited Members | |
Protected Member Functions inherited from CAROM::Interpolator | |
| Interpolator (const std::vector< Vector > ¶meter_points, const std::vector< std::shared_ptr< Matrix >> &rotation_matrices, int ref_point, std::string rbf, std::string interp_method, double closest_rbf_val=0.9, bool compute_gradients=false) | |
| Constructor. More... | |
Protected Attributes inherited from CAROM::Interpolator | |
| int | d_rank |
| The rank of the process this object belongs to. | |
| int | d_num_procs |
| The number of processors being run on. | |
| int | d_ref_point |
| The index within the vector of parameter points to the reference point. | |
| 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 | d_epsilon |
| The RBF parameter that determines the width of influence. a small epsilon: larger influential width a large epsilon: smaller influential width. | |
| std::vector< Vector > | d_parameter_points |
| The sampled parameter points. | |
| std::vector< std::shared_ptr< Matrix > > | d_rotation_matrices |
| The reduced bases with compatible coordinates. | |
| std::unique_ptr< Matrix > | d_lambda_T |
| The RHS of the linear solve in tangential space. | |
| bool | d_compute_gradients |
| Flag that determines if a gradient with respect to the parameters should be computed. | |
| std::vector< std::shared_ptr< Vector > > | d_interpolation_gradient |
| Gradient with respect to the parameters. Only exists after interpolate has been run. | |
VectorInterpolator interpolates reduced vectors of a set of parameter points and returns an interpolated reduced vector for an unseen parameter point. The interpolation algorithm was adapted from "Gradient-based Constrained Optimization Using a Database of Linear Reduced-Order Models" by Y. Choi et al.
Definition at line 33 of file VectorInterpolator.h.
| CAROM::VectorInterpolator::VectorInterpolator | ( | const std::vector< Vector > & | parameter_points, |
| const std::vector< std::shared_ptr< Matrix >> & | rotation_matrices, | ||
| const std::vector< std::shared_ptr< Vector >> & | reduced_vectors, | ||
| int | ref_point, | ||
| std::string | rbf = "G", |
||
| std::string | interp_method = "LS", |
||
| double | closest_rbf_val = 0.9, |
||
| bool | compute_gradients = false |
||
| ) |
Constructor.
| [in] | parameter_points | The parameter points. |
| [in] | rotation_matrices | The rotation matrices associated with each parameter point. |
| [in] | reduced_vectors | The reduced vectors associated with each parameter point. |
| [in] | ref_point | The index within the vector of parameter points to the reference point |
| [in] | rbf | The RBF type ("G" == gaussian, "IQ" == inverse quadratic, "IMQ" == inverse multiquadric) |
| [in] | interp_method | The interpolation method type ("LS" == linear solve, "IDW" == inverse distance weighting, "LP" == lagrangian polynomials) |
| [in] | closest_rbf_val | The RBF parameter determines the width of influence. Set the RBF value of the nearest two parameter points to a value between 0.0 to 1.0 |
| [in] | compute_gradients | Choose whether or not to compute the gradient along with the interpolation. |
Definition at line 41 of file VectorInterpolator.cpp.
Obtain the interpolated reduced vector of the unsampled parameter point.
| [in] | point | The unsampled parameter point. |
Definition at line 90 of file VectorInterpolator.cpp.