Add the HRR related function and parameters into LTORC
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

macros.h 2.2KB

il y a 4 ans
il y a 2 ans
il y a 2 ans
il y a 4 ans
il y a 2 ans
il y a 4 ans
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #ifndef MACRO_DEF
  2. #define MACRO_DEF
  3. //#define SUNDIALS_DOUBLE_PRECISION 1
  4. //#define SUNDIALS_SINGLE_PRECISION 1
  5. #define ZERO RCONST(0.0)
  6. #define HALF RCONST(0.5)
  7. #define ONE RCONST(1.0)
  8. #define TWO RCONST(2.0)
  9. #define THREE RCONST(3.0)
  10. #define FOUR RCONST(4.0)
  11. #define TEN RCONST(10.0)
  12. /* In order to keep begin the index numbers from 1 instead of 0, we define
  13. * macros here. Also, we define macros to ease referencing various variables in
  14. * the sundials nvector.
  15. */
  16. #define psi(i) psidata[i-1]
  17. #define T(i) ydata[((i-1)*data->nvar)+data->nt]
  18. #define Y(i,k) ydata[((i-1)*data->nvar)+data->ny+k-1]
  19. #define R(i) ydata[((i-1)*data->nvar)+data->nr]
  20. #define P(i) ydata[((i-1)*data->nvar)+data->np]
  21. #define HRRdata(i) data->HRRdata[i-1]
  22. #define Hf(i) Hf[i-1]
  23. //#define heatRR(i) heatRR[i-1]
  24. #define Tdot(i) ydotdata[((i-1)*data->nvar)+data->nt]
  25. #define Ydot(i,k) ydotdata[((i-1)*data->nvar)+data->ny+k-1]
  26. #define Rdot(i) ydotdata[((i-1)*data->nvar)+data->nr]
  27. #define Pdot(i) ydotdata[((i-1)*data->nvar)+data->np]
  28. #define Tres(i) resdata[((i-1)*data->nvar)+data->nt]
  29. #define Yres(i,k) resdata[((i-1)*data->nvar)+data->ny+k-1]
  30. #define Rres(i) resdata[((i-1)*data->nvar)+data->nr]
  31. #define Pres(i) resdata[((i-1)*data->nvar)+data->np]
  32. #define Tid(i) iddata[((i-1)*data->nvar)+data->nt]
  33. #define Yid(i,k) iddata[((i-1)*data->nvar)+data->ny+k-1]
  34. #define Rid(i) iddata[((i-1)*data->nvar)+data->nr]
  35. #define Pid(i) iddata[((i-1)*data->nvar)+data->np]
  36. #define Yav(i) Yav[i-1]
  37. #define YAvg(i) YAvg[i-1]
  38. #define YVmhalf(i) YVmhalf[i-1]
  39. #define YVphalf(i) YVphalf[i-1]
  40. #define X(i) X[i-1]
  41. #define Xp(i) Xp[i-1]
  42. #define Xgradhalf(i) Xgradhalf[i-1]
  43. #define XLeft(i) XLeft[i-1]
  44. #define XRight(i) XRight[i-1]
  45. #define gradX(i) gradX[i-1]
  46. #define wdot(i) wdot[i-1]
  47. #define enthalpy(i) enthalpy[i-1]
  48. #define energy(i) energy[i-1]
  49. #define Cp(i) Cp[i-1]
  50. #define atolT(i) atolvdata[((i-1)*data->nvar)+data->nt]
  51. #define atolY(i,k) atolvdata[((i-1)*data->nvar)+data->ny+k-1]
  52. #define atolR(i) atolvdata[((i-1)*data->nvar)+data->nr]
  53. #define atolP(i) atolvdata[((i-1)*data->nvar)+data->np]
  54. #define constraintsY(i,k) constraintsdata[((i-1)*data->nvar)+data->ny+k-1]
  55. #endif