26

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

res = 1.

0
i=1

! Newton's Method
do while(abs(res)>1e-6 .and. i<100)
res = F_CN(dt, tn, tnp, phin, phinp)
phinp = phinp - res
i = i+1
end do

phi_CN(n+1) = phinp
end do

! Low Storage RK3


phi_RK(1) = phi(1)
call LS_RK3_1(Fnc, phi_RK, t, dt, Nt)

write(1,*) '# t exact EuExp EuImp CN RK3'


do i = 1,Nt
write(1,3) t(i), phi(i), phi_EE(i), phi_EI(i), phi_CN(i), phi_RK(i)
end do
3 FORMAT (f5.2, 5E16.6)

deallocate(t)
deallocate(phi)
deallocate(phi_EE)
deallocate(phi_EI)
deallocate(phi_CN)
deallocate(phi_RK)

You might also like