forked from zuowangda/Fast-Fluid-Dynamics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
interpolation.h
65 lines (60 loc) · 2.16 KB
/
interpolation.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
///////////////////////////////////////////////////////////////////////////////
///
/// \file interpolation.h
///
/// \brief Interpolate the data for advection step
///
/// \author Mingang Jin, Qingyan Chen
/// Purdue University
/// Wangda Zuo
/// University of Miami
///
/// \date 8/3/2013
///
///////////////////////////////////////////////////////////////////////////////
#ifndef _INTERPOLATION_H
#define _INTERPOLATION_H
#endif
#ifndef _DATA_STRUCTURE_H
#define _DATA_STRUCTURE_H
#include "data_structure.h"
#endif
#include "utility.h"
///////////////////////////////////////////////////////////////////////////////
/// Entrance of interpolation
///
///\param para Pointer to FFD parameters
///\param d0 Pointer to the variable for interpolation
///\param p I-index of the control volume
///\param q J-index of the control volume
///\param r K-index of the control volume
///\param x_1 Reciprocal of X-length
///\param y_1 Reciprocal of Y-length
///\param z_1 Reciprocal of Z-length
///
///\return Interpolated value
///////////////////////////////////////////////////////////////////////////////
REAL interpolation(PARA_DATA *para, REAL *d0, REAL x_1, REAL y_1, REAL z_1,
int p, int q, int r);
///////////////////////////////////////////////////////////////////////////////
/// Bilinear interpolation
///
///\param x_1 Reciprocal of X-length
///\param y_1 Reciprocal of Y-length
///\param z_1 Reciprocal of Z-length
///\param d000 parameter for interpolation
///\param d010 parameter for interpolation
///\param d100 parameter for interpolation
///\param d110 parameter for interpolation
///\param d001 parameter for interpolation
///\param d011 parameter for interpolation
///\param d101 parameter for interpolation
///\param d111 parameter for interpolation
//
///\return Interpolated value
///////////////////////////////////////////////////////////////////////////////
REAL interpolation_bilinear(REAL x_1, REAL y_1, REAL z_1,
REAL d000, REAL d010, REAL d100, REAL d110,
REAL d001, REAL d011, REAL d101, REAL d111);