diff options
Diffstat (limited to 'packages/sundials/src/Arkode.hsc')
-rw-r--r-- | packages/sundials/src/Arkode.hsc | 70 |
1 files changed, 46 insertions, 24 deletions
diff --git a/packages/sundials/src/Arkode.hsc b/packages/sundials/src/Arkode.hsc index 4ef95e2..023d102 100644 --- a/packages/sundials/src/Arkode.hsc +++ b/packages/sundials/src/Arkode.hsc | |||
@@ -45,46 +45,68 @@ getData ptr = (#peek SunContent, data) ptr | |||
45 | arkSMax :: Int | 45 | arkSMax :: Int |
46 | arkSMax = #const ARK_S_MAX | 46 | arkSMax = #const ARK_S_MAX |
47 | 47 | ||
48 | mIN_DIRK_NUM, mAX_DIRK_NUM :: Int | ||
49 | mIN_DIRK_NUM = #const MIN_DIRK_NUM | ||
50 | mAX_DIRK_NUM = #const MAX_DIRK_NUM | ||
51 | |||
48 | -- FIXME: We could just use inline-c instead | 52 | -- FIXME: We could just use inline-c instead |
49 | 53 | ||
50 | -- /* Butcher table accessors -- implicit */ | 54 | -- Butcher table accessors -- implicit |
51 | sDIRK_2_1_2 :: Int | 55 | sDIRK_2_1_2 :: Int |
52 | sDIRK_2_1_2 = #const SDIRK_2_1_2 | 56 | sDIRK_2_1_2 = #const SDIRK_2_1_2 |
53 | -- #define BILLINGTON_3_3_2 13 | 57 | bILLINGTON_3_3_2 :: Int |
54 | -- #define TRBDF2_3_3_2 14 | 58 | bILLINGTON_3_3_2 = #const BILLINGTON_3_3_2 |
59 | tRBDF2_3_3_2 :: Int | ||
60 | tRBDF2_3_3_2 = #const TRBDF2_3_3_2 | ||
55 | kVAERNO_4_2_3 :: Int | 61 | kVAERNO_4_2_3 :: Int |
56 | kVAERNO_4_2_3 = #const KVAERNO_4_2_3 | 62 | kVAERNO_4_2_3 = #const KVAERNO_4_2_3 |
57 | -- #define ARK324L2SA_DIRK_4_2_3 16 | 63 | aRK324L2SA_DIRK_4_2_3 :: Int |
58 | -- #define CASH_5_2_4 17 | 64 | aRK324L2SA_DIRK_4_2_3 = #const ARK324L2SA_DIRK_4_2_3 |
59 | -- #define CASH_5_3_4 18 | 65 | cASH_5_2_4 :: Int |
60 | -- #define SDIRK_5_3_4 19 | 66 | cASH_5_2_4 = #const CASH_5_2_4 |
67 | cASH_5_3_4 :: Int | ||
68 | cASH_5_3_4 = #const CASH_5_3_4 | ||
61 | sDIRK_5_3_4 :: Int | 69 | sDIRK_5_3_4 :: Int |
62 | sDIRK_5_3_4 = #const SDIRK_5_3_4 | 70 | sDIRK_5_3_4 = #const SDIRK_5_3_4 |
63 | -- #define KVAERNO_5_3_4 20 | 71 | kVAERNO_5_3_4 :: Int |
64 | -- #define ARK436L2SA_DIRK_6_3_4 21 | 72 | kVAERNO_5_3_4 = #const KVAERNO_5_3_4 |
65 | -- #define KVAERNO_7_4_5 22 | 73 | aRK436L2SA_DIRK_6_3_4 :: Int |
66 | -- #define ARK548L2SA_DIRK_8_4_5 23 | 74 | aRK436L2SA_DIRK_6_3_4 = #const ARK436L2SA_DIRK_6_3_4 |
75 | kVAERNO_7_4_5 :: Int | ||
76 | kVAERNO_7_4_5 = #const KVAERNO_7_4_5 | ||
77 | aRK548L2SA_DIRK_8_4_5 :: Int | ||
78 | aRK548L2SA_DIRK_8_4_5 = #const ARK548L2SA_DIRK_8_4_5 | ||
67 | 79 | ||
68 | -- #define DEFAULT_DIRK_2 SDIRK_2_1_2 | 80 | -- #define DEFAULT_DIRK_2 SDIRK_2_1_2 |
69 | -- #define DEFAULT_DIRK_3 ARK324L2SA_DIRK_4_2_3 | 81 | -- #define DEFAULT_DIRK_3 ARK324L2SA_DIRK_4_2_3 |
70 | -- #define DEFAULT_DIRK_4 SDIRK_5_3_4 | 82 | -- #define DEFAULT_DIRK_4 SDIRK_5_3_4 |
71 | -- #define DEFAULT_DIRK_5 ARK548L2SA_DIRK_8_4_5 | 83 | -- #define DEFAULT_DIRK_5 ARK548L2SA_DIRK_8_4_5 |
72 | 84 | ||
73 | -- /* Butcher table accessors -- explicit */ | 85 | -- Butcher table accessors -- explicit |
74 | -- #define HEUN_EULER_2_1_2 0 | 86 | hEUN_EULER_2_1_2 :: Int |
75 | -- #define BOGACKI_SHAMPINE_4_2_3 1 | 87 | hEUN_EULER_2_1_2 = #const HEUN_EULER_2_1_2 |
76 | -- #define ARK324L2SA_ERK_4_2_3 2 | 88 | bOGACKI_SHAMPINE_4_2_3 :: Int |
77 | -- #define ZONNEVELD_5_3_4 3 | 89 | bOGACKI_SHAMPINE_4_2_3 = #const BOGACKI_SHAMPINE_4_2_3 |
78 | -- #define ARK436L2SA_ERK_6_3_4 4 | 90 | aRK324L2SA_ERK_4_2_3 :: Int |
79 | -- #define SAYFY_ABURUB_6_3_4 5 | 91 | aRK324L2SA_ERK_4_2_3 = #const ARK324L2SA_ERK_4_2_3 |
80 | -- #define CASH_KARP_6_4_5 6 | 92 | zONNEVELD_5_3_4 :: Int |
93 | zONNEVELD_5_3_4 = #const ZONNEVELD_5_3_4 | ||
94 | aRK436L2SA_ERK_6_3_4 :: Int | ||
95 | aRK436L2SA_ERK_6_3_4 = #const ARK436L2SA_ERK_6_3_4 | ||
96 | sAYFY_ABURUB_6_3_4 :: Int | ||
97 | sAYFY_ABURUB_6_3_4 = #const SAYFY_ABURUB_6_3_4 | ||
98 | cASH_KARP_6_4_5 :: Int | ||
99 | cASH_KARP_6_4_5 = #const CASH_KARP_6_4_5 | ||
81 | fEHLBERG_6_4_5 :: Int | 100 | fEHLBERG_6_4_5 :: Int |
82 | fEHLBERG_6_4_5 = #const FEHLBERG_6_4_5 | 101 | fEHLBERG_6_4_5 = #const FEHLBERG_6_4_5 |
83 | -- #define FEHLBERG_6_4_5 7 | 102 | dORMAND_PRINCE_7_4_5 :: Int |
84 | -- #define DORMAND_PRINCE_7_4_5 8 | 103 | dORMAND_PRINCE_7_4_5 = #const DORMAND_PRINCE_7_4_5 |
85 | -- #define ARK548L2SA_ERK_8_4_5 9 | 104 | aRK548L2SA_ERK_8_4_5 :: Int |
86 | -- #define VERNER_8_5_6 10 | 105 | aRK548L2SA_ERK_8_4_5 = #const ARK548L2SA_ERK_8_4_5 |
87 | -- #define FEHLBERG_13_7_8 11 | 106 | vERNER_8_5_6 :: Int |
107 | vERNER_8_5_6 = #const VERNER_8_5_6 | ||
108 | fEHLBERG_13_7_8 :: Int | ||
109 | fEHLBERG_13_7_8 = #const FEHLBERG_13_7_8 | ||
88 | 110 | ||
89 | -- #define DEFAULT_ERK_2 HEUN_EULER_2_1_2 | 111 | -- #define DEFAULT_ERK_2 HEUN_EULER_2_1_2 |
90 | -- #define DEFAULT_ERK_3 BOGACKI_SHAMPINE_4_2_3 | 112 | -- #define DEFAULT_ERK_3 BOGACKI_SHAMPINE_4_2_3 |