Commit 37961801 authored by Damien L-G's avatar Damien L-G

Add example that can be used to check the binaries

parent 52c81ec1
#include <noname.h>
#include <fstream>
#include <iostream>
#include <string>
int main() {
std::string const prefix = "/scratch/"; // edit this line
std::string const fx = prefix + "T.csv";
std::string const fy = prefix + "p.csv";
std::string const fz = prefix + "h.csv";
char const sep = '?';
std::string const k =
sep + fx + sep + fy + sep + fz + sep + "bicubic" + sep + "error";
std::fstream sx(fx);
std::fstream sy(fy);
std::fstream sz(fz);
std::string e;
for (int i = 0; i < 100; ++i) {
std::getline(sx, e, ',');
double const x = std::stod(e);
std::getline(sy, e, ',');
double const y = std::stod(e);
std::getline(sz, e, ',');
double const z_ref = std::stod(e);
double const z_eval = noname_spline2d_eval(k.c_str(), x, y);
std::cout << i << " " << x << " " << y << " " << z_ref << " " << z_eval
<< "\n";
}
return 0;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment