rogram laplace real dimension 15 15 V1 real dimension 15 15 V2 do 15 V

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
rogram laplace
real, dimension(15,15) :: V1
real, dimension(15,15) :: V2
do I=1,15
V1(I) = 1000*random(L)
do J=1,15
V2(I,J) = (V1(I-1,J)+V1(I+1,J)+V1(I,J-1)+V1(I,J+1))/4
end do
end do
end program laplace
function random(L)
integer :: L
L = mod(1366*L+150889,714025)
Random=Real(L)/Real(7142024)
return
end