conflict resolved

This commit is contained in:
robin
2024-05-05 19:31:47 +02:00
parent cd87f383c9
commit 0e10881d9c
18 changed files with 680 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
#ifndef ADVECTION_INTERPOLATE_H
#define ADVECTION_INTERPOLATE_H
#include <vector>
#include "UVGrid.h"
/**
* Bilinearly interpolate the point (time, lat, lon) to produce the interpolated velocity.
* Since it is in 3D, this means that it interpolates against 8 points (excluding edges).
* As described in https://numerical.recipes/book.html Chapter 3.6
* @param uvGrid velocity grid
* @param time time of point
* @param lat latitude of point
* @param lon longitude of point
* @return interpolated velocity
*/
Vel bilinearinterpolate(const UVGrid &uvGrid, int time, double lat, double lon);
/**
* Helper function for bilnearly interpolating a vector of points
* @param uvGrid velocity grid
* @param points vector of points
* @return interpolated velocities
*/
std::vector<Vel> bilinearinterpolation(const UVGrid &uvGrid, std::vector<std::tuple<int, double, double>> points);
#endif //ADVECTION_INTERPOLATE_H