File: exp.fee

package info (click to toggle)
feenox 1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,068 kB
  • sloc: ansic: 28,856; sh: 7,201; makefile: 556; python: 554; xml: 500
file content (9 lines) | stat: -rw-r--r-- 360 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
PHASE_SPACE x   # variable x is in the phase space of the DAE system
end_time = 1    # time goes from 0 to 1
x_0 = 1         # initial condition is x = 1 for t = 0
x_dot = -x      # differential equation
# output time, x, the analytical solution and the absolute error
# PRINT %.6f t x exp(-t) %e abs(x-exp(-t))      
IF done
  PRINT abs(exp(-t)-x)<1e-5
ENDIF