Skip to content

Commit 5a845a1

Browse files
committed
fixup! Adjust Test to new reaction interface and anable to fixed reaction tests for CI
1 parent f352912 commit 5a845a1

22 files changed

+85
-66
lines changed

src/libcadet/model/reaction/ReactionSystem.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@ struct ReactionSystem
219219
}
220220

221221
// Pop scope if reaction model used parameter provider
222-
if (dynReaction[i]->usesParamProviderInDiscretizationConfig())
222+
//if (dynReaction[i]->usesParamProviderInDiscretizationConfig())
223223
paramProvider.popScope();
224224
}
225-
225+
226226
return reactionConfSuccess;
227227
}
228228

test/Crystallization.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ TEST_CASE("Crystallization Jacobian verification for a CSTR with initial distrib
106106
pp_setup.pushScope("unit_001");
107107

108108
// set the discretization scheme
109-
pp_setup.pushScope("reaction_bulk");
109+
pp_setup.pushScope("liquid_reaction_000");
110110
pp_setup.set("CRY_GROWTH_SCHEME_ORDER", 4);
111111
pp_setup.popScope();
112112

@@ -124,7 +124,7 @@ TEST_CASE("Crystallization Jacobian verification for a CSTR with initial distrib
124124
pp_setup.pushScope("unit_001");
125125

126126
// set the discretization scheme
127-
pp_setup.pushScope("reaction_bulk");
127+
pp_setup.pushScope("liquid_reaction_000");
128128
pp_setup.set("CRY_GROWTH_SCHEME_ORDER", 3);
129129
pp_setup.popScope();
130130

@@ -142,7 +142,7 @@ TEST_CASE("Crystallization Jacobian verification for a CSTR with primary nucleat
142142
pp_setup.pushScope("unit_001");
143143

144144
// set the discretization scheme
145-
pp_setup.pushScope("reaction_bulk");
145+
pp_setup.pushScope("liquid_reaction_000");
146146
pp_setup.set("CRY_GROWTH_SCHEME_ORDER", 1);
147147
pp_setup.popScope();
148148

@@ -160,7 +160,7 @@ TEST_CASE("Crystallization Jacobian verification for a CSTR with primary nucleat
160160
pp_setup.pushScope("unit_001");
161161

162162
// set the discretization scheme
163-
pp_setup.pushScope("reaction_bulk");
163+
pp_setup.pushScope("liquid_reaction_000");
164164
pp_setup.set("CRY_GROWTH_SCHEME_ORDER", 1);
165165
pp_setup.popScope();
166166

@@ -178,7 +178,7 @@ TEST_CASE("Crystallization Jacobian verification for a CSTR with primary and sec
178178
pp_setup.pushScope("unit_001");
179179

180180
// set the discretization scheme
181-
pp_setup.pushScope("reaction_bulk");
181+
pp_setup.pushScope("liquid_reaction_000");
182182
pp_setup.set("CRY_GROWTH_SCHEME_ORDER", 3);
183183
pp_setup.popScope();
184184

test/data/configuration_CSTR_MichaelisMenten_twoSubs_benchmark1.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
],
2323
"INIT_LIQUID_VOLUME": 10,
2424
"NCOMP": 3,
25+
"NREAC_LIQUID": 1,
2526
"UNIT_TYPE": "CSTR",
2627
"liquid_reaction_000": {
2728
"TYPE": "MICHAELIS_MENTEN",

test/data/configuration_CSTR_MichaelisMenten_twoSubs_twoInhib_benchmark1.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"INIT_LIQUID_VOLUME": 1000,
2424
"NCOMP": 3,
2525
"UNIT_TYPE": "CSTR",
26+
"NREAC_LIQUID": 1,
2627
"liquid_reaction_000": {
2728
"TYPE": "MICHAELIS_MENTEN",
2829
"MM_KI_C": [

test/data/configuration_CSTR_MicroKineticsSMA_twoSubs_benchmark1.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,25 @@
2626
],
2727
"INIT_LIQUID_VOLUME": 10,
2828
"NCOMP": 7,
29-
"REACTION_MODEL": "MASS_ACTION_LAW",
29+
"NREAC_LIQUID": 1,
3030
"UNIT_TYPE": "CSTR",
31-
"reaction_bulk": {
32-
"MAL_KBWD_BULK": [
31+
"liquid_reaction_000": {
32+
"TYPE": "MASS_ACTION_LAW",
33+
"MAL_KBWD": [
3334
700000000.0,
3435
800000000.0,
3536
800000000.0,
3637
700000000.0,
3738
0
3839
],
39-
"MAL_KFWD_BULK": [
40+
"MAL_KFWD": [
4041
1000000000.0,
4142
1000000000.0,
4243
1000000000.0,
4344
1000000000.0,
4445
120000.0
4546
],
46-
"MAL_STOICHIOMETRY_BULK": [
47+
"MAL_STOICHIOMETRY": [
4748
-1,
4849
0,
4950
0,

test/data/configuration_CSTR_MicroKineticsSMA_twoSubs_twoInhib_benchmark1.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@
3232
],
3333
"INIT_LIQUID_VOLUME": 1,
3434
"NCOMP": 12,
35-
"REACTION_MODEL": "MASS_ACTION_LAW",
35+
"NREAC_LIQUID": 1,
3636
"UNIT_TYPE": "CSTR",
37-
"reaction_bulk": {
38-
"MAL_KBWD_BULK": [
37+
"liquid_reaction_000": {
38+
"TYPE": "MASS_ACTION_LAW",
39+
"MAL_KBWD": [
3940
7000.0,
4041
8000.0,
4142
0.0,
@@ -44,7 +45,7 @@
4445
3000.0,
4546
4000.0
4647
],
47-
"MAL_KFWD_BULK": [
48+
"MAL_KFWD": [
4849
10000.0,
4950
10000.0,
5051
120.0,
@@ -53,7 +54,7 @@
5354
10000.0,
5455
10000.0
5556
],
56-
"MAL_STOICHIOMETRY_BULK": [
57+
"MAL_STOICHIOMETRY": [
5758
-1,
5859
0,
5960
0,
@@ -150,7 +151,6 @@
150151
0,
151152
1
152153
]
153-
]
154154
}
155155
}
156156
},

test/data/model_MCT1ch_noEx_noReac_benchmark1.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -652,23 +652,24 @@
652652
"INIT_C": [
653653
0
654654
],
655-
"MAL_EXPONENTS_BULK_FWD": [
655+
"MAL_EXPONENTS_FWD": [
656656
0,
657657
1,
658658
1,
659659
0
660660
],
661661
"NCOMP": 1,
662-
"REACTION_MODEL": "MASS_ACTION_LAW",
662+
"NREAC_LIQUID": 1,
663663
"UNIT_TYPE": "MULTI_CHANNEL_TRANSPORT",
664-
"reaction_bulk": {
665-
"MAL_KBWD_BULK": [
664+
"liquid_reaction_000": {
665+
"TYPE": "MASS_ACTION_LAW",
666+
"MAL_KBWD": [
666667
0
667668
],
668-
"MAL_KFWD_BULK": [
669+
"MAL_KFWD": [
669670
0
670671
],
671-
"MAL_STOICHIOMETRY_BULK": [
672+
"MAL_STOICHIOMETRY": [
672673
-1
673674
]
674675
}

test/data/model_MCT1ch_noEx_reac_benchmark1.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -652,23 +652,24 @@
652652
"INIT_C": [
653653
0
654654
],
655-
"MAL_EXPONENTS_BULK_FWD": [
655+
"MAL_EXPONENTS_FWD": [
656656
0,
657657
1,
658658
1,
659659
0
660660
],
661661
"NCOMP": 1,
662-
"REACTION_MODEL": "MASS_ACTION_LAW",
663662
"UNIT_TYPE": "MULTI_CHANNEL_TRANSPORT",
664-
"reaction_bulk": {
665-
"MAL_KBWD_BULK": [
663+
"NREAC_LIQUID": 1,
664+
"liquid_reaction_000": {
665+
"TYPE": "MASS_ACTION_LAW",
666+
"MAL_KBWD": [
666667
0
667668
],
668-
"MAL_KFWD_BULK": [
669+
"MAL_KFWD": [
669670
0.000567
670671
],
671-
"MAL_STOICHIOMETRY_BULK": [
672+
"MAL_STOICHIOMETRY": [
672673
-1
673674
]
674675
}

test/data/model_MCT2ch_oneWayEx_reac_benchmark1.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -663,23 +663,24 @@
663663
"INIT_C": [
664664
0
665665
],
666-
"MAL_EXPONENTS_BULK_FWD": [
666+
"MAL_EXPONENTS_FWD": [
667667
0,
668668
1,
669669
1,
670670
0
671671
],
672672
"NCOMP": 1,
673-
"REACTION_MODEL": "MASS_ACTION_LAW",
673+
"NREAC_LIQUID": 1,
674674
"UNIT_TYPE": "MULTI_CHANNEL_TRANSPORT",
675-
"reaction_bulk": {
676-
"MAL_KBWD_BULK": [
675+
"liquid_reaction_000": {
676+
"TYPE": "MASS_ACTION_LAW",
677+
"MAL_KBWD": [
677678
0
678679
],
679-
"MAL_KFWD_BULK": [
680+
"MAL_KFWD": [
680681
0.000567
681682
],
682-
"MAL_STOICHIOMETRY_BULK": [
683+
"MAL_STOICHIOMETRY": [
683684
-1
684685
]
685686
}

test/data/model_MCT3ch_twoWayExc_reac_benchmark1.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -664,23 +664,24 @@
664664
"INIT_C": [
665665
0
666666
],
667-
"MAL_EXPONENTS_BULK_FWD": [
667+
"MAL_EXPONENTS_FWD": [
668668
0,
669669
1,
670670
1,
671671
0
672672
],
673673
"NCOMP": 1,
674-
"REACTION_MODEL": "MASS_ACTION_LAW",
675674
"UNIT_TYPE": "MULTI_CHANNEL_TRANSPORT",
676-
"reaction_bulk": {
677-
"MAL_KBWD_BULK": [
675+
"NREAC_LIQUID": 1,
676+
"liquid_reaction_000": {
677+
"TYPE": "MASS_ACTION_LAW",
678+
"MAL_KBWD": [
678679
0
679680
],
680-
"MAL_KFWD_BULK": [
681+
"MAL_KFWD": [
681682
0.000567
682683
],
683-
"MAL_STOICHIOMETRY_BULK": [
684+
"MAL_STOICHIOMETRY": [
684685
-1
685686
]
686687
}

0 commit comments

Comments
 (0)