simple_convtest_part.f90
Go to the documentation of this file.00001 program simple_convtest
00002 implicit none
00003 integer :: i, k, n = 6, ndata
00004 real(8) :: xi(4),yi(4), yin(4,6), yex(4)
00005 real(8) :: v
00006 real(8), external :: lagint_4th
00007
00008 read(5,*) ndata
00009 write(6,*)ndata
00010 open(1,file='data.dat',status='old')
00011 do i = 1, ndata
00012 read(1,*) xi(i), (yin(i,k), k = 1, n)
00013 end do
00014 close(1)
00015
00016 open(1,file='output.dat',status='unknown')
00017 do i = 1, ndata - 1
00018 write(1,'(1p,9e18.10)') &
00019 & xi(i), &
00020 & (dabs(1.0d0 - yin(i,k)/yin(i+1,k))*100.0, k = 1, n)
00021 end do
00022 close(1)
00023
00024 end program simple_convtest