25 #ifndef UQ_INTERPOLATION_SURROGATE_BUILDER_H
26 #define UQ_INTERPOLATION_SURROGATE_BUILDER_H
28 #include <queso/SurrogateBuilderBase.h>
29 #include <queso/InterpolationSurrogateDataSet.h>
42 template<
class V = GslVector,
class M = GslMatrix>
69 void set_work_bounds(
unsigned int& n_begin,
unsigned int& n_end )
const;
76 void sync_data( std::vector<unsigned int>& local_n,
77 std::vector<double>& local_values,
90 {
return m_data.get_dataset(0); }
100 #endif // UQ_INTERPOLATION_SURROGATE_BUILDER_H
virtual ~InterpolationSurrogateBuilder()
Container class for multiple, consistent InterpolationSurrogateData objects.
InterpolationSurrogateDataSet< V, M > & m_data
void set_work_bounds(unsigned int &n_begin, unsigned int &n_end) const
Set the starting and ending global indices for the current subenvironment.
const InterpolationSurrogateData< V, M > & get_default_data() const
Helper function to grab representative dataset from m_data.
Base class for builders of surrogates.
InterpolationSurrogateBuilder()
void partition_work()
Partition the workload of model evaluations across the subenvironments.
void build_values()
Execute the user's model and populate m_values for the given n_points.
void sync_data(std::vector< unsigned int > &local_n, std::vector< double > &local_values, InterpolationSurrogateData< V, M > &data)
Take the local values computed from each process and communicate.
void compute_strides(std::vector< int > &strides) const
Helper function to compute strides needed for MPI_Gatherv.
Build interpolation-based surrogate.
std::vector< int > m_njobs
Cache the amount of work for each subenvironment.
void set_domain_vector(unsigned int n, V &domain_vector) const
Provide the spatial coordinates for the global index n.