Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
InterpolateRefinements.h
Go to the documentation of this file.
1
#ifndef INTERPOLATE_REFINEMENTS_H
2
#define INTERPOLATE_REFINEMENTS_H
3
4
#include "
Overture.h
"
5
#include "
Interpolate.h
"
6
7
class
ListOfParentChildSiblingInfo
;
// forward declaration.
8
9
class
InterpolateRefinements
10
{
11
public
:
12
13
enum
14
{
15
allLevels
=-1
16
};
17
18
InterpolateRefinements
(
int
numberOfDimensions
);
19
~InterpolateRefinements
();
20
21
// interpolate all values on a new adaptive grid from values on an old (different) adaptive grid.
22
int
interpolateRefinements
(
const
realGridCollectionFunction
& uOld,
23
realGridCollectionFunction
& u,
24
int
baseLevel = 1 );
25
26
// interpolate ghost boundaries of refinements from grids at same level or below:
27
int
interpolateRefinementBoundaries
(
realGridCollectionFunction
& u,
28
int
levelToInterpolate =
allLevels
,
29
const
Range & C =
nullRange
);
30
31
int
interpolateRefinementBoundaries
(
ListOfParentChildSiblingInfo
& listOfPCSInfo,
32
realGridCollectionFunction
& u,
33
int
levelToInterpolate =
allLevels
,
34
const
Range & C0 =
nullRange
);
35
36
// interpolate coarse grid points covered by finer grids:
37
int
interpolateCoarseFromFine
(
realGridCollectionFunction
& u,
38
int
levelToInterpolate=
allLevels
,
39
const
Range & C =
nullRange
);
40
41
int
interpolateCoarseFromFine
(
ListOfParentChildSiblingInfo
& listOfPCSInfo,
42
realGridCollectionFunction
& u,
43
int
levelToInterpolate=
allLevels
,
44
const
Range & C =
nullRange
);
45
46
int
get
(
const
GenericDataBase
& dir,
const
aString
& name);
47
48
int
put
(
GenericDataBase
& dir,
const
aString
& name)
const
;
49
50
// utility routines for Boxes:
51
static
int
getIndex
(
const
BOX & box, Index Iv[3] );
52
static
int
getIndex
(
const
BOX & box,
int
side,
int
axis, Index Iv[3]);
53
static
Box
intersects
(
const
Box & box1,
const
Box & box2 );
54
static
Box
buildBox
(Index Iv[3] );
55
static
Box
buildBaseBox
(
MappedGrid
& mg );
56
// Build a box for the portion of the array u(Iv) that lives on a given processor
57
static
Box
buildBox
(
realArray
& u, Index Iv[3] ,
int
processor);
58
59
int
setOrderOfInterpolation
(
int
order );
60
int
setNumberOfGhostLines
(
int
numberOfGhostLines
);
61
62
63
void
printStatistics
( FILE *file=
NULL
)
const
;
64
65
int
debug
;
66
static
FILE *
debugFile
;
// this allows other classes to write to the debugFile
67
68
protected
:
69
int
numberOfDimensions
;
70
71
Interpolate
interp
;
72
InterpolateParameters
interpParams
;
73
IntegerArray
refinementRatio
;
74
int
numberOfGhostLines
;
75
76
real
timeForCoarseFromFine
;
77
real
timeForRefinementBoundaries
;
78
real
timeForRefinements
;
79
real
timeForBoundaryCoarseFromFine
;
80
81
bool
boxWasAdjustedInPeriodicDirection
(BOX & box,
GridCollection
& gc,
int
baseGrid,
int
level,
82
int
& periodicDirection,
int
& periodShift );
83
84
void
openDebugFile
();
85
int
myid
;
86
87
};
88
89
#endif
Generated on Fri Jan 4 2013 10:17:54 for Overture by
1.8.3