Skip to content

Commit 10c6bbc

Browse files
committed
Add MAL reaction test with sensitivities (#426)
1 parent 8a760ca commit 10c6bbc

File tree

5 files changed

+1146
-0
lines changed

5 files changed

+1146
-0
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ jobs:
214214
${BUILD_DIR}/test/testRunner [CI_sens13]
215215
${BUILD_DIR}/test/testRunner [CI_sens14]
216216
${BUILD_DIR}/test/testRunner [CI_sens15]
217+
${BUILD_DIR}/test/testRunner [CI_sens16]
217218
- name: Run CI test set III - crystallization
218219
run: |
219220
${BUILD_DIR}/test/testRunner [CI_cry1]

.github/workflows/coverage.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ jobs:
7878
${BUILD_DIR}/test/testRunner [CI_sens13]
7979
${BUILD_DIR}/test/testRunner [CI_sens14]
8080
${BUILD_DIR}/test/testRunner [CI_sens15]
81+
${BUILD_DIR}/test/testRunner [CI_sens16]
8182
- name: Run CI test set III - crystallization
8283
run: |
8384
${BUILD_DIR}/test/testRunner [CI_cry1]

test/ReactionModels.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,17 @@ TEST_CASE("MassActionLaw kinetic analytic Jacobian vs AD", "[MassActionLaw],[Rea
7878
);
7979
}
8080

81+
TEST_CASE("CSTR with MAL reaction numerical Benchmark with parameter sensitivities", "[CSTR],[MassActionLaw],[ReactionModel],[Simulation],[Reference],[Sensitivity],[CI_sens16]")
82+
{
83+
std::string modelFilePath = std::string("/data/model_CSTR_reacMAL_2comp_sensbenchmark1.json");
84+
std::string refFilePath = std::string("/data/ref_CSTR_reacMAL_2comp_sensbenchmark1.h5");
85+
const std::vector<double> absTol = { 1e-12, 1e-12, 1e-12 };
86+
const std::vector<double> relTol = { 1e-6, 1e-6, 1e-6 };
87+
88+
cadet::test::column::Dummyparams disc;
89+
cadet::test::column::testReferenceBenchmark(modelFilePath, refFilePath, "001", absTol, relTol, disc, true);
90+
}
91+
8192
TEST_CASE("MichaelisMenten kinetic and specific mass action law micro-kinetics yield same result", "[MichaelisMenten],[ReactionModel],[Simulation],[CI]")
8293
{
8394
const std::string& configFilePath1 = std::string("/data/model_CSTR_MichaelisMenten_benchmark1.json");

0 commit comments

Comments
 (0)