Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
ExposedPoints.h
Go to the documentation of this file.
1
#ifndef EXPOSED_POINTS_H
2
#define EXPOSED_POINTS_H
3
4
#include "
Overture.h
"
5
6
// This class is used to interpolate "exposed" points for moving grid computations.
7
8
// forward declarations:
9
class
OGFunction
;
10
class
InterpolatePointsOnAGrid
;
11
12
13
class
ExposedPoints
14
{
15
16
public
:
17
18
// There are different types of exposed points
19
enum
ExposedPointTypeEnum
20
{
21
exposedPointIsNeededForDiscretization
,
22
exposedDiscretization
23
};
24
25
enum
InterpolationQualityEnum
26
{
27
canInterpolateQuality1
=0,
// best quality, interpolates to correct order
28
canInterpolateQuality2
,
// 2nd best best quality, interpolates to correct order minus 1
29
canInterpolateQuality3
,
// 3rd best quality, interpolates to correct order minus 2
30
canInterpolateWithExtrapolation
,
// bad quality -- should replace by a better quality result
31
canInterpolateQualityBad
,
// bad quality -- should replace by a better quality result
32
canInterpolateQualityVeryBad
,
// worst quality-- should replace by a better quality result
33
canNotInterpolate
,
// unable to interpolate at all
34
numberOfInterpolationQualityTypes
35
};
36
37
ExposedPoints
();
38
~ExposedPoints
();
39
40
41
// set whether or not to interpolate exposed interpolation points (kkc 110323)
42
void
setFillExposedInterpolationPoints
(
bool
trueOrFalse);
43
44
// return the total number of exposed points (if grid=-1), otherwise return the number of exposed points on a grid
45
int
getNumberOfExposedPoints
(
const
int
grid=-1 )
const
;
46
47
// build the lists of exposed points; determine how to interpolate
48
int
initialize
(
CompositeGrid
& cg1,
CompositeGrid
& cg2,
49
int
stencilWidth = -1 );
50
51
// interpolate values at the exposed points
52
int
interpolate
(
realCompositeGridFunction
& u1,
53
OGFunction
*TZFlow =
NULL
,
54
real
t =0. );
55
56
// indicate whether interpolation neighbours are already assigned.
57
void
setAssumeInterpolationNeighboursAreAssigned
(
const
bool
trueOrFalse=
true
);
58
59
// choose the type of exposed points that are wanted (do this before calling initialize)
60
void
setExposedPointType
(
const
ExposedPointTypeEnum
type );
61
62
// Set the width the interpolation stencil.
63
int
setInterpolationWidth
(
int
width );
64
65
// Set the number of valid ghost points that can be used when interpolating from a grid function
66
int
setNumberOfValidGhostPoints
(
int
numValidGhost );
67
68
// Choose the interpolation option
69
int
setInterpolationOption
(
int
option );
70
71
static
int
debug
;
72
static
int
info
;
73
74
protected
:
75
76
ExposedPointTypeEnum
exposedPointType
;
77
78
int
isInitialized
;
// is set to 1 after initialization.
79
int
ipogIsInitialized
;
// set to 1 when the ipog object is initialized
80
81
int
numberOfExposedPoints
;
82
int
assumeInterpolationNeighboursAreAssigned
;
// default for stencilWidth=5
83
int
interpolationWidth
;
84
int
numberOfValidGhostPoints
;
85
86
int
useIPOG
;
// if true use ipog in serial too
87
InterpolatePointsOnAGrid
*
ipog
;
// new way for parallel
88
IntegerArray
periodicUpdateNeeded
;
89
90
IntegerArray
ia_
;
91
IntegerArray
numberPerGrid
;
92
RealArray
x_
;
93
94
int
*
numDonor
;
95
96
IntegerArray
*
ib
;
97
98
IntegerArray
exposedInterpoleeGrid
,
99
exposedInterpoleeLocation
,
100
exposedInterpolationPoint
,
101
exposedVariableInterpolationWidth
,
102
exposedInterpolationQuality
;
103
104
RealArray
exposedInterpolationCoordinates
;
105
106
bool
fillExposedInterpolationPoints
;
// kkc 110323
107
108
static
FILE *
debugFile
;
109
110
static
int
111
getInterpolationStencil
(
CompositeGrid
& cg1,
112
const
int
grid2,
113
const
int
numToCheck,
IntegerArray
& ia,
IntegerArray
& ibg,
RealArray
& r2,
114
IntegerArray
& interpolationQuality,
115
IntegerArray
& interpoleeGrid,
116
IntegerArray
& interpoleeLocation,
117
IntegerArray
& interpolationPoint,
118
IntegerArray
& variableInterpolationWidth,
119
RealArray
& interpolationCoordinates );
120
121
static
int
122
checkForBetterQualityInterpolation
(
CompositeGrid
& cg1,
const
int
gridI,
const
int
numToCheck,
123
IntegerArray
& ia,
IntegerArray
& ic,
124
const
RealArray
& x,
125
IntegerArray
& interpolationQuality,
126
IntegerArray
& interpoleeGrid,
127
IntegerArray
& interpoleeLocation,
128
IntegerArray
& interpolationPoint,
129
IntegerArray
& variableInterpolationWidth,
130
RealArray
& interpolationCoordinates );
131
132
static
int
133
interpolatePoints
(
const
realCompositeGridFunction
& u,
134
RealArray
& uInterpolated_,
135
int
*
numDonor
,
const
IntegerArray
&
ia_
,
const
IntegerArray
*
ib
,
136
const
IntegerArray
& interpoleeGrid_,
137
const
IntegerArray
& interpoleeLocation_,
138
const
IntegerArray
& interpolationPoint_,
139
const
IntegerArray
& variableInterpolationWidth_,
140
const
RealArray
& interpolationCoordinates_,
141
const
Range & R0 =
nullRange
,
142
const
Range & R1 =
nullRange
,
143
const
Range & R2 =
nullRange
,
144
const
Range & R3 =
nullRange
,
145
const
Range & R4 =
nullRange
);
146
147
};
148
149
150
151
#endif
Generated on Fri Jan 4 2013 10:17:51 for Overture by
1.8.3