@@ -173,58 +173,6 @@ void time_step(int Num_procs,
173
173
MPI_Comm comm_bg ,
174
174
int first_through );
175
175
176
- /* before interpolating from the background grid, we need to gather that BG data
177
- from wherever it resides and copy it to the right locations of the refinement */
178
- void get_BG_data (int load_balance , DTYPE * in_bg , DTYPE * ing_r , int my_ID , long expand ,
179
- int Num_procs , long L_width_bg ,
180
- long L_istart_bg , long L_iend_bg , long L_jstart_bg , long L_jend_bg ,
181
- long L_istart_r , long L_iend_r , long L_jstart_r , long L_jend_r ,
182
- long G_istart_r , long G_jstart_r , MPI_Comm comm_bg , MPI_Comm comm_r ,
183
- long L_istart_r_gross , long L_iend_r_gross ,
184
- long L_jstart_r_gross , long L_jend_r_gross ,
185
- long L_width_r_true_gross , long L_istart_r_true_gross , long L_iend_r_true_gross ,
186
- long L_jstart_r_true_gross , long L_jend_r_true_gross , int g );
187
-
188
- /* use two-stage, bi-linear interpolation of BG values to refinement. BG values
189
- have already been copied to the refinement */
190
- void interpolate (DTYPE * ing_r , long L_width_r_true_gross ,
191
- long L_istart_r_true_gross , long L_iend_r_true_gross ,
192
- long L_jstart_r_true_gross , long L_jend_r_true_gross ,
193
- long L_istart_r_true , long L_iend_r_true ,
194
- long L_jstart_r_true , long L_jend_r_true ,
195
- long expand , DTYPE h_r , int g , int Num_procs , int my_ID ) {
196
-
197
- long ir , jr , ib , jrb , jrb1 , jb ;
198
- DTYPE xr , xb , yr , yb ;
199
-
200
- if (expand == 1 ) return ; /* nothing to do anymore */
201
-
202
- /* First, interpolate in x-direction */
203
- for (jr = L_jstart_r_true_gross ; jr <=L_jend_r_true_gross ; jr += expand ) {
204
- for (ir = L_istart_r_true_gross ; ir < L_iend_r_true_gross ; ir ++ ) {
205
- xr = h_r * (DTYPE )ir ;
206
- ib = (long )xr ;
207
- xb = (DTYPE )ib ;
208
- ING_R (ir ,jr ) = ING_R ((ib + 1 )* expand ,jr )* (xr - xb ) +
209
- ING_R (ib * expand ,jr )* (xb + (DTYPE )1.0 - xr );
210
- }
211
- }
212
-
213
- /* Next, interpolate in y-direction */
214
- for (jr = L_jstart_r_true ; jr <=L_jend_r_true ; jr ++ ) {
215
- yr = h_r * (DTYPE )jr ;
216
- jb = (long )yr ;
217
- jrb = jb * expand ;
218
- jrb1 = (jb + 1 )* expand ;
219
- yb = (DTYPE )jb ;
220
- for (ir = L_istart_r_true ; ir <=L_iend_r_true ; ir ++ ) {
221
- ING_R (ir ,jr ) = ING_R (ir ,jrb1 )* (yr - yb ) + ING_R (ir ,jrb )* (yb + (DTYPE )1.0 - yr );
222
- }
223
- /* note that (yr-yb) and (yb+(DTYPE)1.0-yr) can be hoisted out of the loop,
224
- so in the performance computation we assign 3 flops per point */
225
- }
226
- }
227
-
228
176
int main (int argc , char * * argv ) {
229
177
230
178
int Num_procs ; /* number of ranks */
0 commit comments