Changeset 2671 for vendors/AGRIF/current/AGRIF_FILES/modinterpbasic.F
- Timestamp:
- 2011-03-08T15:08:49+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendors/AGRIF/current/AGRIF_FILES/modinterpbasic.F
r1901 r2671 1 1 ! 2 ! $Id: modinterpbasic.F 898 2008-04-22 15:35:20Z rblod $2 ! $Id: modinterpbasic.F 779 2007-12-22 17:04:17Z rblod $ 3 3 ! 4 4 C AGRIF (Adaptive Grid Refinement In Fortran) … … 113 113 locind_parent_left = locind_parent_left + 1. 114 114 globind_parent_right = globind_parent_right + 1. 115 ypos2 = ypos*invds+(i-1)*invds2 115 116 endif 116 117 117 118 diff=(globind_parent_right - ypos2) 118 119 119 y(i) = (diff*x(locind_parent_left) 120 120 & + (1.-diff)*x(locind_parent_left+1)) … … 170 170 Real, Dimension(:,:), Allocatable :: coeffparent_tmp 171 171 REAL :: ypos,globind_parent_left,globind_parent_right 172 REAL :: invds, invds2 172 REAL :: invds, invds2, invds3 173 173 REAL :: ypos2,diff 174 174 C … … 189 189 invds = 1./ds_parent 190 190 invds2 = ds_child/ds_parent 191 invds3 = 0.5/real(coeffraf) 191 192 192 193 ypos2 = ypos*invds … … 216 217 locind_parent_left = locind_parent_left + 1 217 218 globind_parent_right = globind_parent_right + 1. 219 ypos2 = ypos*invds+(i-1)*invds2 218 220 endif 219 221 220 222 diff=(globind_parent_right - ypos2) 223 diff = invds3*nint(2*coeffraf*diff) 221 224 indparent(i,dir) = locind_parent_left 225 222 226 coeffparent(i,dir) = diff 223 227 … … 238 242 C 239 243 indparent(nc,dir) = locind_parent_left 240 241 coeffparent(nc,dir) = (globind_parent_left + ds_parent - ypos) 244 diff = (globind_parent_left + ds_parent - ypos) 242 245 & * invds 243 endif 246 diff = invds3*nint(2*coeffraf*diff) 247 coeffparent(nc,dir) = diff 248 endif 244 249 245 250 do i=2, np2 … … 280 285 INTEGER :: i,coeffraf,locind_parent_left 281 286 REAL :: ypos,globind_parent_left,globind_parent_right 282 REAL :: invds, invds2 287 REAL :: invds, invds2, invds3 283 288 REAL :: ypos2,diff 284 289 C … … 305 310 invds = 1./ds_parent 306 311 invds2 = ds_child/ds_parent 312 invds3 = 0.5/real(coeffraf) 307 313 308 314 ypos2 = ypos*invds … … 323 329 locind_parent_left = locind_parent_left + 1 324 330 globind_parent_right = globind_parent_right + 1. 331 ypos2 = ypos*invds+(i-1)*invds2 325 332 endif 326 333 327 334 diff=(globind_parent_right - ypos2) 335 336 diff = invds3*nint(2*coeffraf*diff) 337 328 338 indparent(i,1) = locind_parent_left 339 329 340 coeffparent(i,1) = diff 330 341 ypos2 = ypos2 + invds2 … … 344 355 C 345 356 indparent(nc,1) = locind_parent_left 346 347 coeffparent(nc,1)= (globind_parent_left + ds_parent - ypos)357 358 diff = (globind_parent_left + ds_parent - ypos) 348 359 & * invds 349 endif 360 diff = invds3*nint(2*coeffraf*diff) 361 coeffparent(nc,1) = diff 362 endif 350 363 C 351 364 Return … … 462 475 & + (locind_parent_left - 1)*ds_parent 463 476 464 deltax = invdsparent*(ypos-globind_parent_left) 477 C deltax = invdsparent*(ypos-globind_parent_left) 478 deltax = nint(coeffraf*deltax)/real(coeffraf) 479 465 480 ypos = ypos + ds_child 466 481 if (abs(deltax).LE.0.0001) then
Note: See TracChangeset
for help on using the changeset viewer.