Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
InterpolatePoints.h
Go to the documentation of this file.
1
#ifndef INTERPOLATE_POINTS_CG_H
2
#define INTERPOLATE_POINTS_CG_H
3
4
5
// class that can be used to interpolate arbitrary points on a Composite grid.
6
7
8
class
InterpolatePoints
9
{
10
public
:
11
12
enum
InterpolationStatusEnum
13
{
14
notInterpolated
=0,
15
interpolated
,
16
extrapolated
17
};
18
19
enum
20
{
21
defaultNumberOfValidGhostPoints
=-123456,
22
interpolateAllGhostPoints
=-234567
23
};
24
25
26
27
InterpolatePoints
();
28
~InterpolatePoints
();
29
30
int
interpolatePoints
(
const
RealArray
& positionToInterpolate,
31
const
realCompositeGridFunction
& u,
32
RealArray
& uInterpolated,
33
const
Range & R0=
nullRange
,
34
const
Range & R1=
nullRange
,
35
const
Range & R2=
nullRange
,
36
const
Range & R3=
nullRange
,
37
const
Range & R4=
nullRange
);
38
39
int
interpolationCoefficients
(
const
CompositeGrid
&cg,
40
RealArray
& uInterpolationCoeff);
41
42
int
interpolateAllPoints
(
const
realCompositeGridFunction
& uFrom,
43
realCompositeGridFunction
& uTo,
44
const
Range & componentsFrom=
nullRange
,
45
const
Range & componentsTo=
nullRange
,
46
const
int
numberOfGhostPointsToInterpolate=
interpolateAllGhostPoints
);
47
48
int
interpolateAllPoints
(
const
realCompositeGridFunction
& uFrom,
49
realMappedGridFunction
& uTo,
50
const
Range & componentsFrom=
nullRange
,
51
const
Range & componentsTo=
nullRange
,
52
const
int
numberOfGhostPointsToInterpolate=
interpolateAllGhostPoints
);
53
54
55
// Here is a way to interpolate in two steps, this will save the interpolation info
56
int
buildInterpolationInfo
(
const
RealArray
& positionToInterpolate,
CompositeGrid
& cg,
57
RealArray
*projectedPoints=
NULL
,
58
IntegerArray
*checkTheseGrids=
NULL
);
59
int
interpolatePoints
(
const
realCompositeGridFunction
& u,
60
RealArray
& uInterpolated,
61
const
Range & R0=
nullRange
,
62
const
Range & R1=
nullRange
,
63
const
Range & R2=
nullRange
,
64
const
Range & R3=
nullRange
,
65
const
Range & R4=
nullRange
);
66
67
// return the status array for the last interpolation.
68
const
IntegerArray
&
getStatus
()
const
;
69
70
// return the index values and interpoleeGrid for the last interpolation.
71
int
getInterpolationInfo
(
CompositeGrid
& cg,
IntegerArray
& indexValues,
IntegerArray
& interpoleeGrid)
const
;
72
73
// flag for specfying what information messages should be printed:
74
int
setInfoLevel
(
int
info );
75
76
// Set the offset in grid lines from the unit cube where we are allowed to interpolate
77
int
setInterpolationOffset
(
real
widthInGridLines );
78
79
// set the number of valid ghost points
80
int
setNumberOfValidGhostPoints
(
int
numValidGhost=
defaultNumberOfValidGhostPoints
);
81
82
static
int
debug
;
83
84
protected
:
85
86
IntegerArray
*
indirection
;
87
IntegerArray
*
interpolationLocation
;
88
IntegerArray
*
interpolationLocationPlus
;
89
RealArray
*
interpolationCoordinates
;
90
91
IntegerArray
numberOfInterpolationPoints
;
92
IntegerArray
status
;
93
94
real
interpolationOffset
;
// offset in grid lines from the unit cube where we are allowed to interpolate
95
96
int
infoLevel
;
// flag for specfying what information messages should be printed.
97
int
numberOfValidGhostPoints
;
98
99
};
100
101
#endif
Generated on Fri Jan 4 2013 10:17:54 for Overture by
1.8.3