Overture  Version 25
CanInterpolate.h
Go to the documentation of this file.
1 #ifndef CAN_INTERPOLATE_H
2 #define CAN_INTERPOLATE_H
3 
4 #include "Overture.h"
5 
6 namespace CanInterpolate
7 {
8 
9 
10 // This struct holds the data needed to make a query to canInterpolate:
12 {
13 CanInterpolateQueryData(){ rv[0]=rv[1]=rv[2]=0.; id=i=grid=donor=0; } //
14 real rv[3]; // location in donor grid -- note: put doubles first for memory alignment
15 
16 int id; // index to an array of these objects -- used for testing --> can eventually be removed
17 int i; // index into the interpolation array's
18 int grid; // receptor grid
19 int donor; // donor grid
20 
22 
23 };
24 
25 // here is the info that we send back from the query to canInterpolate
27 {
28 CanInterpolateResultData(){ id=width=0; il[0]=il[1]=il[2]=0; } //
29 int id; // id to match the one in a CanInterpolateQueryData object --> can eventually be removed
30 int width; // width of valid interpolation (0=cannot interpolate)
31 int il[3]; // interpolation location
32 
34 
35 };
36 
37 
38 // parallel canInterpolate function -- query a list of points from different grids and donors.
39 int canInterpolate( CompositeGrid & cg,
40  int numberToCheck,
43  const int numberOfValidGhost=0 );
44 
45 
46 // *OLD VERSION* --this has a memory leak
48  int numberToCheck,
51  const int numberOfValidGhost=0 );
52 
53 
54 // used by canInterpolate to transfer interp data to processors where it is needed
55 int
57  intSerialArray *ipLocal, intSerialArray *ilLocal, realSerialArray *ciLocal);
58 
59 
60 // query if a point can interpolate
62  const Integer& k10,
63  const Integer& k20,
64  const RealArray& r,
65  const IntegerArray& ok,
66  const IntegerArray& useBackupRules,
67  const Logical checkForOneSided,
68  const CompositeGrid & cg,
69  const IntegerArray & mask,
70  int *pValidRange=NULL );
71 
72 void
74  const Integer& k20,
75  const RealArray& r,
76  const IntegerArray& interpolationStencil,
77  const IntegerArray& useBackupRules,
78  const CompositeGrid & cg,
79  int *pValidRange=NULL );
80 
81 
82 };
83 
84 
85 
86 #endif