28#ifndef OPENSWMM_ENGINE_2D_RAINFALL_INTERPOLATOR_HPP
29#define OPENSWMM_ENGINE_2D_RAINFALL_INTERPOLATOR_HPP
59 void build(
const std::vector<double>& cx,
const std::vector<double>& cy,
60 const std::vector<double>& gage_x,
const std::vector<double>& gage_y,
61 int n_gages,
double gage_scale);
64 bool ready() const noexcept {
return ready_; }
74 void apply(
const std::vector<double>& rain, std::vector<double>& out)
const;
83 std::vector<int> w_ptr_;
84 std::vector<int> w_gage_;
85 std::vector<double> w_val_;
Builds and applies static rainfall-interpolation weights for the mesh.
Definition RainfallInterpolator.hpp:44
bool ready() const noexcept
True once build() produced usable weights (≥ 1 located gage).
Definition RainfallInterpolator.hpp:64
void build(const std::vector< double > &cx, const std::vector< double > &cy, const std::vector< double > &gage_x, const std::vector< double > &gage_y, int n_gages, double gage_scale)
Precompute per-cell interpolation weights.
Definition RainfallInterpolator.cpp:224
void apply(const std::vector< double > &rain, std::vector< double > &out) const
Map per-gage values onto per-cell values: out[i] = Σ w·rain[gage].
Definition RainfallInterpolator.cpp:295
Definition NodeCoupling.cpp:15