Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
interpolation.h
Go to the documentation of this file.
1 #ifndef _INTERPOLATION_H_
2 #define _INTERPOLATION_H_
3 
4 #include <cstdio>
5 #include <cstdlib>
6 #include <iostream>
7 #include <ostream>
8 #include <fstream>
9 #include <string>
10 #include <time.h>
11 #include <sstream>
12 #include <iomanip>
13 #include <math.h>
14 #include <list>
15 #include <vector>
16 
17 #include "util.h"
18 #include "datatypedef.h"
19 #include "points.h"
20 
21 using std::list;
22 using std::vector;
23 
24 
25 class Interpolate {
26 
27  private:
28 
40  static vector<int> getCell( points *pTarget, points *pSource, int rTargetPointNumber, int rClosestPointNumber );
41 
52  static vector<int> sortPoints( points *pSource, vector<int> rGridPoints );
53 
54  public:
55 
60  static points *bilinear( points *pTarget, points *pSource, int rTargetVariable, int rSourceVariable );
61 
62  //Performs bicubic interpolation to find values from source mesh at
63  //the target points
64  static points *bicubic( points *target, points *source, int var_target, int var_source );
65 
66 };
67 
68 #endif
static vector< int > sortPoints(points *pSource, vector< int > rGridPoints)
Sort points (rGridPoints) from pSouce into a vector where 0 - Bottom Left 1 - Top Left 2 - Top Right ...
Definition: points.h:30
static points * bilinear(points *pTarget, points *pSource, int rTargetVariable, int rSourceVariable)
Performs bilinear interpolation to find values from source mesh at the target points.
static points * bicubic(points *target, points *source, int var_target, int var_source)
static vector< int > getCell(points *pTarget, points *pSource, int rTargetPointNumber, int rClosestPointNumber)
Get a points surrounding a target point in a mesh.