12 std::cout <<
"2D Interpolation using evenly spaced data" << std::endl;
16 std::vector<double> vv;
17 std::vector<std::vector<double> > xx;
18 for(
double y = -29.42; y < 30.54; y = y+0.5047){
19 for(
double x = -29.52; x < 30.64; x = x+0.4856){
20 xx.push_back(std::vector<double> {x,y});
28 for(
double y = -29.4; y < 30.3; y = y+0.5047){
29 for(
double x = -29.5; x < 30.5; x = x+0.4856){
30 xx.push_back(std::vector<double> {x,y});
36 std::cout <<
"2D Interpolation using variably spaced data" << std::endl;
52 for(
double y = fromY; y < toY; y = y+dy){
53 for(
double x = fromX; x < toX; x = x+dx){
54 xx.push_back(std::vector<double> {x,y});
63 for(
double y = fromY; y < toY; y = y+dy){
64 for(
double x = fromX; x < toX; x = x+dx){
65 xx.push_back(std::vector<double> {x,y});
73 std::cout <<
"1D Interpolation using evenly spaced data" << std::endl;
78 std::vector<double> vv;
79 std::vector<std::vector<double> > xx;
80 for(
double x = 39.0; x < 66.5; x = x+0.1){
81 xx.push_back(std::vector<double> {x});
91 for(
double x = 39.0; x < 66.5; x = x+0.1){
92 xx.push_back(std::vector<double> {x});
97 std::cout <<
"1D Interpolation using variably spaced data" << std::endl;
102 for(
double x = 38.0; x < 82.2; x = x+0.1){
103 xx.push_back(std::vector<double> {x});
111 for(
double x = 38.0; x < 82.2; x = x+0.1){
112 xx.push_back(std::vector<double> {x});
void getDataFromFile(std::string filename)
Get the Data From File object.
Definition: gridInterp.h:493
void reset()
Resets the class to the empty state.
Definition: gridInterp.h:455
void writeCoordsValues(std::string filename, std::vector< std::vector< double >> &coords, std::vector< double > &v)
This is a utility function which is used to print the results of the interpolation to a file so that ...
Definition: gridInterp.h:738
void test1D()
Definition: tests.h:72
void setMethod(METHOD method_in)
sets the method
Definition: gridInterp.h:487
void test2D()
Definition: tests.h:10
double interpolate(double x, double y=0, double z=0) const
This is the method to call to do the interpolation.
Definition: gridInterp.h:596
Main interpolation class.
Definition: gridInterp.h:326