25 #ifndef UQ_INTERPOLATION_SURROGATE_DATA_H
26 #define UQ_INTERPOLATION_SURROGATE_DATA_H
28 #include <queso/BoxSubset.h>
35 template<
class V = GslVector,
class M = GslMatrix>
36 class InterpolationSurrogateData
41 const std::vector<unsigned int>& n_points );
58 { queso_assert_less(n,this->
m_values.size());
67 void set_values( std::vector<double>& values );
69 void set_value(
unsigned int n,
double value );
72 unsigned int dim()
const
73 {
return this->
m_domain.vectorSpace().dimGlobal(); };
87 double get_x(
unsigned int dim,
unsigned int index )
const;
104 void init_values(
const std::vector<unsigned int>& n_points );
128 #endif // UQ_INTERPOLATION_SURROGATE_DATA_H
const BoxSubset< V, M > & get_paramDomain() const
const std::vector< unsigned int > & m_n_points
vector to store number of points in each coordinate direction
double get_value(unsigned int n) const
const std::vector< unsigned int > & get_n_points() const
InterpolationSurrogateData()
std::vector< double > m_values
vector to store values to be interpolated
double spacing(unsigned int dim) const
Spacing between points along dimension dim.
unsigned int n_values() const
std::vector< double > & get_values()
void set_value(unsigned int n, double value)
Class representing a subset of a vector space shaped like a hypercube.
double x_max(unsigned int dim) const
Upper bound of domain along dimension dim.
void check_domain_bounds() const
Helper function for checking domain extent.
void init_values(const std::vector< unsigned int > &n_points)
Helper function for sizing m_values.
void check_dim_consistency() const
Helper function for constructor.
const BoxSubset< V, M > & m_domain
Parameter domain over which we use surrogate.
double get_x(unsigned int dim, unsigned int index) const
Get spatial coordinate value at the node index along coordinate direction dim.
void set_values(std::vector< double > &values)
Set all values. Dimension must be consistent with internal m_values.
void sync_values(unsigned int root)
Sync values across all processors from root processor.
const std::vector< double > & get_values() const
unsigned int dim() const
Dimension of parameter space.
~InterpolationSurrogateData()
double x_min(unsigned int dim) const
Lower bound of domain along dimension dim.