initialisation.f90 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. program initialisation
  2. ! This program creates a file inputfile.dat
  3. !
  4. use randvectors
  5. integer :: iprint,n,choix,choixsol
  6. real*8 ::choixtol
  7. print*,'Would you print results ? : 1-No / 2-All / 3-Time and final residual norm'
  8. read*,iprint
  9. print*,'Enter matrix size : '
  10. read*,n
  11. print*,'Enter matrix choice : (more details in README.txt) '
  12. print*,'1- A(i,j)=2j-1 / n-i+j for j=1,k '
  13. print*,' 2i-1 / n-i+j for j=i+1,n '
  14. print*,'2- A(i,j)=i for j=1,i '
  15. print*,' j for j=i+1,n '
  16. print*,'3-helsing.f90'
  17. print*,'4-rbf.f90'
  18. print*,'5- Matrix File (copy in matrixfile.dat) '
  19. read*,choix
  20. if (choix==3) then
  21. call rand0(n)
  22. call vecrand(n)
  23. call helsing(n)
  24. end if
  25. if (choix==4) then
  26. call rand0(n)
  27. call vecrand(n)
  28. call rbf(n)
  29. end if
  30. print*,'Enter solution choice : 1- [1,...,1]^T / 2- [n,...,1]^T '
  31. print*,'3-rand vector'
  32. read*,choixsol
  33. print*,'Enter tol :'
  34. read*,choixtol
  35. open(unit=10,file='inputfile.dat',status='unknown')
  36. write(10,*) iprint,n,choix,choixsol,choixtol
  37. close(10)
  38. end program initialisation