Télécharger dvinve.eso

Retour à la liste

Numérotation des lignes :

  1. C DVINVE SOURCE KICH 19/09/26 21:15:08 10311
  2. subroutine dvinve(md,tens,v,x,inv)
  3. c
  4. c *********
  5. c inversion
  6. c *********
  7. c
  8. implicit real*8(a-h,o-z)
  9. implicit integer (i-n)
  10. real*8 v(5),x(5),tens(5,5)
  11. 1000 continue
  12. do 1600 iy=1,md-1
  13. 1005 continue
  14. if(tens(iy,iy).eq.0.) go to 1030
  15. do 1020 iz=iy+1,md
  16. do 1010 iw=iy+1,md
  17. 1010 tens(iz,iw)=tens(iz,iw)-tens(iz,iy)*tens(iy,iw)/tens(iy,iy)
  18. 1020 v(iz)=v(iz) - tens(iz,iy)*v(iy)/tens(iy,iy)
  19. go to 1600
  20. 1030 continue
  21. indic3=0
  22. if(iy.eq.md) go to 1600
  23. do 1500 iz=iy+1,md
  24. if(tens(iz,iy).eq.0.) go to 1500
  25. if(indic3.eq.1) go to 1500
  26. do 1040 iw=iy,md
  27. vx=tens(iy,iw)
  28. tens(iy,iw)=tens(iz,iw)
  29. tens(iz,iw)=vx
  30. 1040 continue
  31. vx=v(iy)
  32. v(iy)=v(iz)
  33. v(iz)=vx
  34. indic3=1
  35. 1500 continue
  36. if(indic3.eq.1) go to 1005
  37. 1600 continue
  38. inv=1
  39. do 1610 iy=1,md
  40. 1610 if(tens(iy,iy).eq.0.) inv=0
  41. if(inv.eq.0) go to 2000
  42. do 1620 iy=md,2,-1
  43. do 1620 iw=iy-1,1,-1
  44. 1620 v(iw)=v(iw)-tens(iw,iy)*v(iy)/tens(iy,iy)
  45. do 1650 iy=1,md
  46. ih=iy
  47. x(ih)=v(ih)/tens(ih,ih)
  48. 1650 continue
  49. return
  50. 2000 end
  51.  
  52.  
  53.  

© Cast3M 2003 - Tous droits réservés.
Mentions légales