[Fortran] 纯文本查看 复制代码 C 空间插值
C --------------------------------------------------
DOWN = 0.0
UP = 0.0
MU = 2
C
DO I=1,10125
Distance = (COORDS(1) - P_time(I,1))**2
& + (COORDS(2) - P_time(I,2))**2
& + (COORDS(3) - P_time(I,3))**2
Distance = Distance**0.5
IF(Distance == 0)THEN
DOWN = 1
UP = P_time(I,4)
EXIT
ELSE
DOWN = DOWN + 1 / Distance**MU
UP = UP + P_time(I,4) / Distance**MU
END IF
END DO
C
F = UP / down
|