Overture  Version 25
AssignInterpNeighbours.h
Go to the documentation of this file.
1 #ifndef ASSIGN_INTERP_NEIGHBOURS
2 #define ASSIGN_INTERP_NEIGHBOURS "AssignInterpNeighbours"
3 
4 // ==========================================================================
5 // This class is used to assign the unused points next to interpolation
6 // points so that a wide (e.g. 5-pt) stencil can be used with fewer layers
7 // of interpolation points. This assignment is currently done with extrapolation
8 // although in the future we could consider interpolating these points instead.
9 // ==========================================================================
10 
11 #include "Overture.h"
12 
13 
15 {
16 public:
17 
19 
20 // copy constructor
22 
24 
25 // Assign values to the unused points next to interpolation points
26 int
27 assign( realMappedGridFunction & uA, Range & C, const BoundaryConditionParameters & bcParams );
28 
29 // Call this routine when the grid has changed and we need to re-initialize
30 int gridHasChanged();
31 
33 
34 // Provide the interpolation point array (used in serial only)
35 void setInterpolationPoint( intArray & interpolationPoint );
36 
37 // return size of this object
38 real sizeOf(FILE *file = NULL ) const;
39 
40 
41 static int debug;
42 
43 protected:
44 
45  // This next enum is used for setting an error status
47  {
50  } errorStatus;
51 
52 // setup routine
53 int
54 setup();
55 
56 // routine for setting up arrays for assigning the neighbours to interpolation points
57 int
59 
60 
62 
64 
69 
71 
72 static FILE *debugFile; // make one debug file for all instances (we use the same name)
73 
74 // for communicating values:
75 
76 int npr, nps; // number of proc. that we receieve or send data to
77 int *ppr,*pps; // list of processors for rec. and sending to
78 int *nar, **iar; // list of points to recieve from other processors
79 int *nas, **ias; // list of points to send to other processor
80 
81 
82  #ifdef USE_PPP
83  MPI_Comm AIN_COMM; // Communicator for the parallel interpolator
84  #else
85  int AIN_COMM;
86  #endif
87 
88 };
89 
90 
91 #endif