home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 509.lha / ATS_v2.0 / ode.doc < prev    next >
Text File  |  1991-05-06  |  2KB  |  68 lines

  1. Version 1.6
  2. 4/3/91
  3.  
  4. The following is a sample ode input file.
  5.  
  6. exact=1
  7. max_terms=10
  8. n_eq=1
  9. x=complex(1.0,0.0)
  10. y1_ts=complex(0.0625,0.0)
  11. h=complex(0.0001,0.0)
  12. diff_y1_ts=constant(y1_ts,complex(1.0,0.0))/
  13. (expt(x(y1_ts)*x(y1_ts)+constant(y1_ts,complex(1.0,0.0)),
  14. constant(y1_ts,complex(4.0,0.0))))-
  15. constant(y1_ts,complex(8.0,0.0))*
  16. x(y1_ts)/(expt(x(y1_ts)*x(y1_ts)+
  17. constant(y1_ts,complex(1.0,0.0)),
  18. constant(y1_ts,complex(5.0,0.0))))
  19. //end
  20. 1.0/((ex_x*ex_x+1.0)*(ex_x*ex_x+1.0)*(ex_x*ex_x+1.0)*(ex_x*ex_x+1.0))
  21. //end
  22. iterations=1000
  23. plot=1
  24.  
  25. The explaiations follow (NOTE the keywords must appear in this order!)
  26.  
  27. exact=1
  28. an exact solution is provided for comparison
  29. max_terms=10
  30. number of terms of the taylor series to compute (usually 30 max 60)
  31. n_eq=1
  32. number of sumultaneous equations
  33. x=complex(1.0,0.0)
  34. intitial value of independant variable
  35. y1_ts=complex(0.0625,0.0)
  36. intitial value of dependant variable #1
  37. h=complex(0.0001,0.0)
  38. increment
  39. diff_y1_ts=constant(y1_ts,complex(1.0,0.0))/
  40. (expt(x(y1_ts)*x(y1_ts)+constant(y1_ts,complex(1.0,0.0)),
  41. constant(y1_ts,complex(4.0,0.0))))-
  42. constant(y1_ts,complex(8.0,0.0))*
  43. x(y1_ts)/(expt(x(y1_ts)*x(y1_ts)+
  44. constant(y1_ts,complex(1.0,0.0)),
  45. constant(y1_ts,complex(5.0,0.0))))
  46. the equation dy/dx = 1/(x^2+1)^4-8x/(x^2+1)^5
  47. note constant taylor series are functions of a sample taylor series as is x
  48. //end
  49. end of equation
  50. 1.0/((ex_x*ex_x+1.0)*(ex_x*ex_x+1.0)*(ex_x*ex_x+1.0)*(ex_x*ex_x+1.0))
  51. exact solution
  52. //end
  53. end of exact solution
  54. iterations=1000
  55. number of times to iterate
  56. plot=0
  57. set = 0 for no Maple plots
  58.     = 1 for final plot
  59.     = 2 for each iteration (a modified logorithmic format) 
  60.  
  61. HOW TO USE
  62. you must have icon
  63. enter iconx ode
  64. (i have recompiled my iconx as iconz to avoid a conflict)
  65. enter name of ode input file
  66. enter name of c++ output file (stest.cp to use makefile provided)
  67. make stest
  68.