From d5428be4736c552d990c71f3638817e36650b9b1 Mon Sep 17 00:00:00 2001 From: Jan Breuer Date: Thu, 16 Jan 2025 11:27:58 +0100 Subject: [PATCH 1/4] Add binding model submodule tests to CI Fix FD pattern sign tolerance in Fruendlich LDF test In the test settings, remove EXT_ prefix from constant binding parameters, fixing the configuration of external binding parameter handler --- .github/workflows/ci.yml | 2 +- test/BindingModelTests.cpp | 6 +++--- test/BindingModelTests.hpp | 3 ++- test/BindingModels.cpp | 19 ++++++++++--------- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92658b6c8..f5b785d40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -165,7 +165,7 @@ jobs: ${INSTALL_PREFIX}/bin/cadet-cli LWE.h5 || true - name: Run tests run: | - ${BUILD_DIR}/test/testRunner [CI] + ${BUILD_DIR}/test/testRunner [CI],[BindingModel] MacOS: runs-on: macos-latest strategy: diff --git a/test/BindingModelTests.cpp b/test/BindingModelTests.cpp index 69c0c6f80..b96c0818c 100644 --- a/test/BindingModelTests.cpp +++ b/test/BindingModelTests.cpp @@ -187,7 +187,7 @@ int ConfiguredBindingModel::requiredBufferSize() CADET_NOEXCEPT return 0; } -void testJacobianAD(const char* modelName, unsigned int nComp, unsigned int const* nBound, bool isKinetic, const char* config, double const* point, bool skipStructureTest, double absTol, double relTol) +void testJacobianAD(const char* modelName, unsigned int nComp, unsigned int const* nBound, bool isKinetic, const char* config, double const* point, bool skipStructureTest, double FDsignAbsTol, double absTol, double relTol) { ConfiguredBindingModel cbm = ConfiguredBindingModel::create(modelName, nComp, nBound, isKinetic, config); @@ -229,12 +229,12 @@ void testJacobianAD(const char* modelName, unsigned int nComp, unsigned int cons cadet::test::checkJacobianPatternFD( [&](double const* lDir, double* res) -> void { cbm.model().flux(1.0, 0u, ColumnPosition{0.0, 0.0, 0.0}, lDir + cbm.nComp(), lDir, res, cbm.buffer()); }, [&](double const* lDir, double* res) -> void { jacAna.submatrixMultiplyVector(lDir, cbm.nComp(), 0, numEq, numDofs, res); }, - yState.data(), dir.data(), colA.data(), colB.data(), numDofs, numEq); + yState.data(), dir.data(), colA.data(), colB.data(), numDofs, numEq, FDsignAbsTol); cadet::test::checkJacobianPatternFD( [&](double const* lDir, double* res) -> void { cbm.model().flux(1.0, 0u, ColumnPosition{0.0, 0.0, 0.0}, lDir + cbm.nComp(), lDir, res, cbm.buffer()); }, [&](double const* lDir, double* res) -> void { jacAD.multiplyVector(lDir, res); }, - yState.data(), dir.data(), colA.data(), colB.data(), numDofs, numEq); + yState.data(), dir.data(), colA.data(), colB.data(), numDofs, numEq, FDsignAbsTol); } // Check Jacobians against each other diff --git a/test/BindingModelTests.hpp b/test/BindingModelTests.hpp index 8b46e097d..e242183c2 100644 --- a/test/BindingModelTests.hpp +++ b/test/BindingModelTests.hpp @@ -130,10 +130,11 @@ namespace binding * @param [in] config JSON string with binding model parameters * @param [in] point Liquid phase and solid phase values to check Jacobian at * @param [in] skipStructureTest Determines whether the structural test using finite differences is skipped + * @param [in] FDsignAbsTol Absolute tolerance in FD pattern sign check * @param [in] absTol Absolute error tolerance * @param [in] relTol Relative error tolerance */ - void testJacobianAD(const char* modelName, unsigned int nComp, unsigned int const* nBound, bool isKinetic, const char* config, double const* point, bool skipStructureTest = false, double absTol = 0.0, double relTol = std::numeric_limits::epsilon() * 100.0); + void testJacobianAD(const char* modelName, unsigned int nComp, unsigned int const* nBound, bool isKinetic, const char* config, double const* point, bool skipStructureTest = false, double FDsignAbsTol = 0.0, double absTol = 0.0, double relTol = std::numeric_limits::epsilon() * 100.0); /** * @brief Checks residual and analytic Jacobian of normal model variant against externally dependent ones diff --git a/test/BindingModels.cpp b/test/BindingModels.cpp index de55e9f57..a90e497e6 100644 --- a/test/BindingModels.cpp +++ b/test/BindingModels.cpp @@ -273,7 +273,7 @@ CADET_BINDINGTEST("MOBILE_PHASE_MODULATOR", "EXT_MOBILE_PHASE_MODULATOR", (1,1,1 "EXT_MPM_BETA_T": [0.0, 1.5, 2.0], "EXT_MPM_BETA_TT": [0.0, 0.0, 0.0], "EXT_MPM_BETA_TTT": [0.0, 0.0, 0.0], - "EXT_MPM_LINEAR_THRESHOLD": 1e-10 + "MPM_LINEAR_THRESHOLD": 1e-10 )json", \ R"json( "EXT_MPM_KA": [0.0, 0.0, 0.0, 0.0], "EXT_MPM_KA_T": [0.0, 1.14, 1.0, 2.0], @@ -295,7 +295,7 @@ CADET_BINDINGTEST("MOBILE_PHASE_MODULATOR", "EXT_MOBILE_PHASE_MODULATOR", (1,1,1 "EXT_MPM_BETA_T": [0.0, 1.5, 0.0, 2.0], "EXT_MPM_BETA_TT": [0.0, 0.0, 0.0, 0.0], "EXT_MPM_BETA_TTT": [0.0, 0.0, 0.0, 0.0], - "EXT_MPM_LINEAR_THRESHOLD": 1e-10 + "MPM_LINEAR_THRESHOLD": 1e-10 )json", \ 1e-10, 1e-10, CADET_NONBINDING_LIQUIDPHASE_COMP_UNUSED, CADET_COMPARE_BINDING_VS_NONBINDING) @@ -334,7 +334,7 @@ CADET_BINDINGTEST("MOBILE_PHASE_MODULATOR", "EXT_MOBILE_PHASE_MODULATOR", (1,1,1 "EXT_MPM_BETA_T": [0.0, 1.5, 2.0], "EXT_MPM_BETA_TT": [0.0, 0.0, 0.0], "EXT_MPM_BETA_TTT": [0.0, 0.0, 0.0], - "EXT_MPM_LINEAR_THRESHOLD": 1e-10 + "MPM_LINEAR_THRESHOLD": 1e-10 )json", \ R"json( "EXT_MPM_KA": [0.0, 0.0, 0.0, 0.0], "EXT_MPM_KA_T": [0.0, 1.14, 1.0, 2.0], @@ -356,7 +356,7 @@ CADET_BINDINGTEST("MOBILE_PHASE_MODULATOR", "EXT_MOBILE_PHASE_MODULATOR", (1,1,1 "EXT_MPM_BETA_T": [0.0, 1.5, 0.0, 2.0], "EXT_MPM_BETA_TT": [0.0, 0.0, 0.0, 0.0], "EXT_MPM_BETA_TTT": [0.0, 0.0, 0.0, 0.0], - "EXT_MPM_LINEAR_THRESHOLD": 1e-10 + "MPM_LINEAR_THRESHOLD": 1e-10 )json", \ 1e-10, 1e-10, CADET_NONBINDING_LIQUIDPHASE_COMP_UNUSED, CADET_COMPARE_BINDING_VS_NONBINDING) @@ -1002,7 +1002,7 @@ CADET_BINDINGTEST("MULTI_COMPONENT_LDF_FREUNDLICH", "EXT_MULTI_COMPONENT_LDF_FRE "EXT_MCLDFFRL_A_T": [3.0, 2.2, 1.5, 0.5], "EXT_MCLDFFRL_A_TT": [0.0, 0.0, 0.0, 0.0], "EXT_MCLDFFRL_A_TTT": [0.0, 0.0, 0.0, 0.0], - "EXT_MCLDFFRL_TAU": 0.1 + "MCLDFFRL_TAU": 0.1 )json", \ R"json( "EXT_MCLDFFRL_KLDF": [0.0, 0.0, 0.0], "EXT_MCLDFFRL_KLDF_T": [1.14, 1.0, 2.0], @@ -1020,7 +1020,7 @@ CADET_BINDINGTEST("MULTI_COMPONENT_LDF_FREUNDLICH", "EXT_MULTI_COMPONENT_LDF_FRE "EXT_MCLDFFRL_A_T": [2.2, 1.1, 0.4, 0.1, 0.94, 2.8, 0.5, 1.2, 2.4], "EXT_MCLDFFRL_A_TT": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], "EXT_MCLDFFRL_A_TTT": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], - "EXT_MCLDFFRL_TAU": 0.1 + "MCLDFFRL_TAU": 0.1 )json", \ 1e-10, 1e-10, CADET_NONBINDING_LIQUIDPHASE_COMP_USED, CADET_DONT_COMPARE_BINDING_VS_NONBINDING) @@ -1059,7 +1059,7 @@ CADET_BINDINGTEST("MULTI_COMPONENT_SIPS", "EXT_MULTI_COMPONENT_SIPS", (1, 1, 1, "EXT_SIPS_EXP_TTT": [0.0, 0.0, 0.0, 0.0], "EXT_SIPS_REFC0": 2.0, "EXT_SIPS_REFQ": 1.1, - "EXT_SIPS_LINEAR_THRESHOLD": 1e-10 + "SIPS_LINEAR_THRESHOLD": 1e-10 )json", \ R"json( "EXT_SIPS_KA": [0.0, 0.0, 0.0, 0.0, 0.0], "EXT_SIPS_KA_T": [1.14, 1.0, 2.0, 1.14, 2.0], @@ -1079,7 +1079,7 @@ CADET_BINDINGTEST("MULTI_COMPONENT_SIPS", "EXT_MULTI_COMPONENT_SIPS", (1, 1, 1, "EXT_SIPS_EXP_TTT": [0.0, 0.0, 0.0, 0.0, 0.0], "EXT_SIPS_REFC0": 2.0, "EXT_SIPS_REFQ": 1.1, - "EXT_SIPS_LINEAR_THRESHOLD": 1e-10 + "SIPS_LINEAR_THRESHOLD": 1e-10 )json", \ 1e-10, 1e-10, CADET_NONBINDING_LIQUIDPHASE_COMP_UNUSED, CADET_COMPARE_BINDING_VS_NONBINDING) @@ -1461,6 +1461,7 @@ CADET_BINDINGTEST("GENERALIZED_ION_EXCHANGE", "EXT_GENERALIZED_ION_EXCHANGE", (1 { const unsigned int nBound[] = { 0, 0, 1, 1, 1}; const double state[] = { 0.9, 1.1, 1.5e-2, 3.2e-3, 1.5e-5, 3.2e-5, 1.5e-5, 3.2e-5 }; + double FDsignAbsTol = 1e-10; // specific tolerance for this test, non-default value char const* const config = R"json({ "COL_PHI": 49232983.6522396, "COL_KAPPA_EXP": 1.8, @@ -1487,7 +1488,7 @@ CADET_BINDINGTEST("GENERALIZED_ION_EXCHANGE", "EXT_GENERALIZED_ION_EXCHANGE", (1 const bool isKinetic = bindMode; SECTION(std::string("Binding mode ") + (isKinetic ? "dynamic" : "quasi-stationary")) { - cadet::test::binding::testJacobianAD("MULTI_COMPONENT_COLLOIDAL", sizeof(nBound) / sizeof(unsigned int), nBound, isKinetic, config, state); + cadet::test::binding::testJacobianAD("MULTI_COMPONENT_COLLOIDAL", sizeof(nBound) / sizeof(unsigned int), nBound, isKinetic, config, state, FDsignAbsTol); } } } From c3b2f30f14183b86ad7c1b2bcfc18cc49583f18e Mon Sep 17 00:00:00 2001 From: Jan Breuer Date: Thu, 16 Jan 2025 16:31:36 +0100 Subject: [PATCH 2/4] Add CI tag to binding tests --- .github/workflows/ci.yml | 2 +- test/BindingModels.hpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5b785d40..92658b6c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -165,7 +165,7 @@ jobs: ${INSTALL_PREFIX}/bin/cadet-cli LWE.h5 || true - name: Run tests run: | - ${BUILD_DIR}/test/testRunner [CI],[BindingModel] + ${BUILD_DIR}/test/testRunner [CI] MacOS: runs-on: macos-latest strategy: diff --git a/test/BindingModels.hpp b/test/BindingModels.hpp index 8d8d595b7..9e87f523d 100644 --- a/test/BindingModels.hpp +++ b/test/BindingModels.hpp @@ -32,7 +32,7 @@ #define CADET_BINDINGTEST_SINGLE_IMPL_NONBNDJACCONST_false(modelName, tagName, postFix, someNonBinding, stateSomeNon, configSomeNon) #define CADET_BINDINGTEST_SINGLE_IMPL_NONBNDJACCONST_true(modelName, tagName, postFix, someNonBinding, stateSomeNon, configSomeNon) \ - TEST_CASE(modelName " binding model consistency of non-binding Jacobian columns" postFix, "[BindingModel],[Jacobian]," tagName) \ + TEST_CASE(modelName " binding model consistency of non-binding Jacobian columns" postFix, "[BindingModel],[CI],[Jacobian]," tagName) \ { \ const unsigned int nBound3[] = BRACED_INIT_LIST someNonBinding; \ const double state3[] = BRACED_INIT_LIST stateSomeNon; \ @@ -68,7 +68,7 @@ #define CADET_BINDINGTEST_SINGLE_IMPL_BNDVSNONBND_false(modelName, tagName, postFix, allBinding, someNonBinding, stateAll, stateSomeNon, configAll, configSomeNon) #define CADET_BINDINGTEST_SINGLE_IMPL_BNDVSNONBND_true(modelName, tagName, postFix, allBinding, someNonBinding, stateAll, stateSomeNon, configAll, configSomeNon) \ - TEST_CASE(modelName " binding model consistency of non-binding vs binding" postFix, "[BindingModel],[Jacobian]," tagName) \ + TEST_CASE(modelName " binding model consistency of non-binding vs binding" postFix, "[BindingModel],[CI],[Jacobian]," tagName) \ { \ const unsigned int nBound2[] = BRACED_INIT_LIST allBinding; \ const unsigned int nBound3[] = BRACED_INIT_LIST someNonBinding; \ @@ -115,7 +115,7 @@ * @param cmpBndVsNonbnd Determines whether a test for all-binding vs non-binding variant (Jacobian and residual) is created */ #define CADET_BINDINGTEST_SINGLE_IMPL(modelName, tagName, postFix, allBinding, someNonBinding, stateAll, stateSomeNon, configAll, configSomeNon, consInitTol, consInitCheckTol, usesNonBindingLiquidPhase, cmpBndVsNonbnd) \ - TEST_CASE(modelName " binding model analytic Jacobian vs AD" postFix, "[Jacobian],[AD],[BindingModel]," tagName) \ + TEST_CASE(modelName " binding model analytic Jacobian vs AD" postFix, "[Jacobian],[AD],[BindingModel],[CI]," tagName) \ { \ const unsigned int nBound2[] = BRACED_INIT_LIST allBinding; \ const unsigned int nBound3[] = BRACED_INIT_LIST someNonBinding; \ @@ -180,7 +180,7 @@ #define CADET_BINDINGTEST_MULTI(modelName, extModelName, postFix, allBinding, someNonBinding, stateAll, stateSomeNon, configAll, configSomeNon, extConfigAll, extConfigSomeNon, consInitTol, consInitCheckTol, usesNonBindingLiquidPhase, cmpBndVsNonbnd) \ CADET_BINDINGTEST_SINGLE_IMPL(modelName, "[" modelName "]", postFix, allBinding, someNonBinding, stateAll, stateSomeNon, configAll, configSomeNon, consInitTol, consInitCheckTol, usesNonBindingLiquidPhase, cmpBndVsNonbnd) \ CADET_BINDINGTEST_SINGLE_IMPL(extModelName, "[ExternalFunction],[" extModelName "]", postFix, allBinding, someNonBinding, stateAll, stateSomeNon, extConfigAll, extConfigSomeNon, consInitTol, consInitCheckTol, usesNonBindingLiquidPhase, cmpBndVsNonbnd) \ - TEST_CASE(modelName " binding model consistent with externally dependent variant" postFix, "[BindingModel],[ExternalFunction],[" modelName "],[" extModelName "]") \ + TEST_CASE(modelName " binding model consistent with externally dependent variant" postFix, "[BindingModel],[CI],[ExternalFunction],[" modelName "],[" extModelName "]") \ { \ const unsigned int nBound2[] = BRACED_INIT_LIST allBinding; \ const unsigned int nBound3[] = BRACED_INIT_LIST someNonBinding; \ @@ -235,7 +235,7 @@ * @param consInitCheckTol Error tolerance for residual check in consistent initialization */ #define CADET_BINDINGTEST_ALLBINDING_SINGLE_IMPL(modelName, tagName, allBinding, stateAll, configAll, consInitTol, consInitCheckTol) \ - TEST_CASE(modelName " binding model analytic Jacobian vs AD", "[Jacobian],[AD],[BindingModel]," tagName) \ + TEST_CASE(modelName " binding model analytic Jacobian vs AD", "[Jacobian],[AD],[BindingModel],[CI]," tagName) \ { \ const unsigned int nBound2[] = BRACED_INIT_LIST allBinding; \ const double state2[] = BRACED_INIT_LIST stateAll; \ @@ -277,7 +277,7 @@ #define CADET_BINDINGTEST_ALLBINDING(modelName, extModelName, allBinding, stateAll, configAll, extConfigAll, consInitTol, consInitCheckTol) \ CADET_BINDINGTEST_ALLBINDING_SINGLE_IMPL(modelName, "[" modelName "]", allBinding, stateAll, configAll, consInitTol, consInitCheckTol) \ CADET_BINDINGTEST_ALLBINDING_SINGLE_IMPL(extModelName, "[ExternalFunction],[" extModelName "]", allBinding, stateAll, extConfigAll, consInitTol, consInitCheckTol) \ - TEST_CASE(modelName " binding model consistent with externally dependent variant", "[BindingModel],[ExternalFunction],[" modelName "],[" extModelName "]") \ + TEST_CASE(modelName " binding model consistent with externally dependent variant", "[BindingModel],[CI],[ExternalFunction],[" modelName "],[" extModelName "]") \ { \ const unsigned int nBound2[] = BRACED_INIT_LIST allBinding; \ const double state2[] = BRACED_INIT_LIST stateAll; \ From 65f32244c1351706fcfc8a07d105fff8d503bb49 Mon Sep 17 00:00:00 2001 From: Jan Breuer Date: Thu, 16 Jan 2025 17:17:47 +0100 Subject: [PATCH 3/4] test if it runs with max AD dirs --- test/ColumnTests.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/ColumnTests.cpp b/test/ColumnTests.cpp index 140d6046c..5ef30b38a 100644 --- a/test/ColumnTests.cpp +++ b/test/ColumnTests.cpp @@ -1636,6 +1636,8 @@ namespace column { const int unitOpID = std::stoi(unitID); + cadet::ad::setDirections(cadet::ad::getMaxDirections());// AD directions needed in configure but requiredADdirs not known before configureModelDiscretization (which is called in configure) + // read json model setup file const std::string setupFile = std::string(getTestDirectory()) + modelFileRelPath; JsonParameterProvider pp_setup(JsonParameterProvider::fromFile(setupFile)); From b133f8885d1e6a9e82b96a2a4c42cf5f8e243ef0 Mon Sep 17 00:00:00 2001 From: Jan Breuer Date: Fri, 17 Jan 2025 15:30:21 +0100 Subject: [PATCH 4/4] test wip --- test/BindingModelAutoJacobian.cpp | 6 +++--- test/BindingModels.cpp | 10 +++++----- test/BindingModels.hpp | 12 ++++++------ test/LumpedRateModelWithPoresDG.cpp | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/test/BindingModelAutoJacobian.cpp b/test/BindingModelAutoJacobian.cpp index 4efbb0f59..788622d10 100644 --- a/test/BindingModelAutoJacobian.cpp +++ b/test/BindingModelAutoJacobian.cpp @@ -99,7 +99,7 @@ namespace cadet } // namespace cadet -TEST_CASE("Automatic AD binding model Jacobian vs FD", "[BindingModel],[Jacobian],[CI]") +TEST_CASE("Automatic AD binding model Jacobian vs FD", "[BindingModel],[jojojojo],[Jacobian],[CI]") { cadet::BindingWithoutJacobian bm; const int nComp = 4; @@ -140,7 +140,7 @@ TEST_CASE("Automatic AD binding model Jacobian vs FD", "[BindingModel],[Jacobian ); } -TEST_CASE("Automatic AD disabled for binding model with Jacobian", "[BindingModel],[Jacobian],[CI]") +TEST_CASE("Automatic AD disabled for binding model with Jacobian", "[BindingModel],[jojojojo],[Jacobian],[CI]") { cadet::BindingWithJacobian bm; const int nComp = 4; @@ -160,7 +160,7 @@ TEST_CASE("Automatic AD disabled for binding model with Jacobian", "[BindingMode REQUIRE(bm.workspaceSize(4, totalBoundStates, boundOffset) == 0); } -TEST_CASE("Full analytic Jacobian vs AD only enabled for binding model for a LRMP with multi-state SMA", "[BindingModel],[Jacobian],[Simulation],[CI]") +TEST_CASE("Full analytic Jacobian vs AD only enabled for binding model for a LRMP with multi-state SMA", "[BindingModel],[jojojojo],[Jacobian],[Simulation],[CI]") { nlohmann::json jsonJpp = createLWEJson("LUMPED_RATE_MODEL_WITH_PORES", "FV"); diff --git a/test/BindingModels.cpp b/test/BindingModels.cpp index a90e497e6..3d0e1464f 100644 --- a/test/BindingModels.cpp +++ b/test/BindingModels.cpp @@ -1421,7 +1421,7 @@ CADET_BINDINGTEST("GENERALIZED_ION_EXCHANGE", "EXT_GENERALIZED_ION_EXCHANGE", (1 )json", \ 1e-10, 1e-8, CADET_NONBINDING_LIQUIDPHASE_COMP_USED, CADET_COMPARE_BINDING_VS_NONBINDING) - TEST_CASE("MULTI_COMPONENT_COLLOIDAL binding model analytic Jacobian vs AD with PH single protein", "[Jacobian],[AD],[BindingModel],[MULTI_COMPONENT_COLLOIDAL]") + TEST_CASE("MULTI_COMPONENT_COLLOIDAL binding model analytic Jacobian vs AD with PH single protein", "[Jacobian],[AD],[BindingModel],[jojojojo],[MULTI_COMPONENT_COLLOIDAL]") { const unsigned int nBound[] = { 0, 0, 1 }; const double state[] = { 0.9, 1.1, 1.5e-2, 3.2e-2 }; @@ -1457,7 +1457,7 @@ CADET_BINDINGTEST("GENERALIZED_ION_EXCHANGE", "EXT_GENERALIZED_ION_EXCHANGE", (1 } - TEST_CASE("MULTI_COMPONENT_COLLOIDAL binding model analytic Jacobian vs AD with PH multi protein", "[Jacobian],[AD],[BindingModel],[MULTI_COMPONENT_COLLOIDAL]") + TEST_CASE("MULTI_COMPONENT_COLLOIDAL binding model analytic Jacobian vs AD with PH multi protein", "[Jacobian],[AD],[BindingModel],[jojojojo],[MULTI_COMPONENT_COLLOIDAL]") { const unsigned int nBound[] = { 0, 0, 1, 1, 1}; const double state[] = { 0.9, 1.1, 1.5e-2, 3.2e-3, 1.5e-5, 3.2e-5, 1.5e-5, 3.2e-5 }; @@ -1493,7 +1493,7 @@ CADET_BINDINGTEST("GENERALIZED_ION_EXCHANGE", "EXT_GENERALIZED_ION_EXCHANGE", (1 } } -TEST_CASE("MULTI_COMPONENT_COLLOIDAL binding model analytic Jacobian vs AD without PH", "[Jacobian],[AD],[BindingModel],[MULTI_COMPONENT_COLLOIDAL]") +TEST_CASE("MULTI_COMPONENT_COLLOIDAL binding model analytic Jacobian vs AD without PH", "[Jacobian],[AD],[BindingModel],[jojojojo],[MULTI_COMPONENT_COLLOIDAL]") { const unsigned int nBound[] = {0, 1, 1, 1}; const double state[] = {0.9, 1.1e-1, 3.2e-3, 1e-2, 2e-3, 1e-4, 1e-3}; @@ -1528,7 +1528,7 @@ TEST_CASE("MULTI_COMPONENT_COLLOIDAL binding model analytic Jacobian vs AD witho } } -TEST_CASE("MULTI_COMPONENT_COLLOIDAL binding model analytic Jacobian vs AD with PH low conc", "[Jacobian],[AD],[BindingModel],[MULTI_COMPONENT_COLLOIDAL]") +TEST_CASE("MULTI_COMPONENT_COLLOIDAL binding model analytic Jacobian vs AD with PH low conc", "[Jacobian],[AD],[BindingModel],[jojojojo],[MULTI_COMPONENT_COLLOIDAL]") { const unsigned int nBound[] = {0, 0, 1, 1, 1}; const double state[] = {0.9, 1.1, 1.5, 2.3, 2.9, 1e-7, 2e-7, 5e-7}; @@ -1563,7 +1563,7 @@ TEST_CASE("MULTI_COMPONENT_COLLOIDAL binding model analytic Jacobian vs AD with } } -TEST_CASE("MULTI_COMPONENT_COLLOIDAL binding model analytic Jacobian vs AD without PH low conc", "[Jacobian],[AD],[BindingModel],[MULTI_COMPONENT_COLLOIDAL]") +TEST_CASE("MULTI_COMPONENT_COLLOIDAL binding model analytic Jacobian vs AD without PH low conc", "[Jacobian],[AD],[BindingModel],[jojojojo],[MULTI_COMPONENT_COLLOIDAL]") { const unsigned int nBound[] = {0, 1, 1, 1}; const double state[] = {0.9, 1.1, 2.3, 2.9, 1e-7, 2e-7, 5e-7}; diff --git a/test/BindingModels.hpp b/test/BindingModels.hpp index 9e87f523d..dd49d55ca 100644 --- a/test/BindingModels.hpp +++ b/test/BindingModels.hpp @@ -32,7 +32,7 @@ #define CADET_BINDINGTEST_SINGLE_IMPL_NONBNDJACCONST_false(modelName, tagName, postFix, someNonBinding, stateSomeNon, configSomeNon) #define CADET_BINDINGTEST_SINGLE_IMPL_NONBNDJACCONST_true(modelName, tagName, postFix, someNonBinding, stateSomeNon, configSomeNon) \ - TEST_CASE(modelName " binding model consistency of non-binding Jacobian columns" postFix, "[BindingModel],[CI],[Jacobian]," tagName) \ + TEST_CASE(modelName " binding model consistency of non-binding Jacobian columns" postFix, "[BindingModel],[jojojojo],[CI],[Jacobian]," tagName) \ { \ const unsigned int nBound3[] = BRACED_INIT_LIST someNonBinding; \ const double state3[] = BRACED_INIT_LIST stateSomeNon; \ @@ -68,7 +68,7 @@ #define CADET_BINDINGTEST_SINGLE_IMPL_BNDVSNONBND_false(modelName, tagName, postFix, allBinding, someNonBinding, stateAll, stateSomeNon, configAll, configSomeNon) #define CADET_BINDINGTEST_SINGLE_IMPL_BNDVSNONBND_true(modelName, tagName, postFix, allBinding, someNonBinding, stateAll, stateSomeNon, configAll, configSomeNon) \ - TEST_CASE(modelName " binding model consistency of non-binding vs binding" postFix, "[BindingModel],[CI],[Jacobian]," tagName) \ + TEST_CASE(modelName " binding model consistency of non-binding vs binding" postFix, "[BindingModel],[jojojojo],[CI],[Jacobian]," tagName) \ { \ const unsigned int nBound2[] = BRACED_INIT_LIST allBinding; \ const unsigned int nBound3[] = BRACED_INIT_LIST someNonBinding; \ @@ -115,7 +115,7 @@ * @param cmpBndVsNonbnd Determines whether a test for all-binding vs non-binding variant (Jacobian and residual) is created */ #define CADET_BINDINGTEST_SINGLE_IMPL(modelName, tagName, postFix, allBinding, someNonBinding, stateAll, stateSomeNon, configAll, configSomeNon, consInitTol, consInitCheckTol, usesNonBindingLiquidPhase, cmpBndVsNonbnd) \ - TEST_CASE(modelName " binding model analytic Jacobian vs AD" postFix, "[Jacobian],[AD],[BindingModel],[CI]," tagName) \ + TEST_CASE(modelName " binding model analytic Jacobian vs AD" postFix, "[Jacobian],[AD],[BindingModel],[jojojojo],[CI]," tagName) \ { \ const unsigned int nBound2[] = BRACED_INIT_LIST allBinding; \ const unsigned int nBound3[] = BRACED_INIT_LIST someNonBinding; \ @@ -180,7 +180,7 @@ #define CADET_BINDINGTEST_MULTI(modelName, extModelName, postFix, allBinding, someNonBinding, stateAll, stateSomeNon, configAll, configSomeNon, extConfigAll, extConfigSomeNon, consInitTol, consInitCheckTol, usesNonBindingLiquidPhase, cmpBndVsNonbnd) \ CADET_BINDINGTEST_SINGLE_IMPL(modelName, "[" modelName "]", postFix, allBinding, someNonBinding, stateAll, stateSomeNon, configAll, configSomeNon, consInitTol, consInitCheckTol, usesNonBindingLiquidPhase, cmpBndVsNonbnd) \ CADET_BINDINGTEST_SINGLE_IMPL(extModelName, "[ExternalFunction],[" extModelName "]", postFix, allBinding, someNonBinding, stateAll, stateSomeNon, extConfigAll, extConfigSomeNon, consInitTol, consInitCheckTol, usesNonBindingLiquidPhase, cmpBndVsNonbnd) \ - TEST_CASE(modelName " binding model consistent with externally dependent variant" postFix, "[BindingModel],[CI],[ExternalFunction],[" modelName "],[" extModelName "]") \ + TEST_CASE(modelName " binding model consistent with externally dependent variant" postFix, "[BindingModel],[jojojojo],[CI],[ExternalFunction],[" modelName "],[" extModelName "]") \ { \ const unsigned int nBound2[] = BRACED_INIT_LIST allBinding; \ const unsigned int nBound3[] = BRACED_INIT_LIST someNonBinding; \ @@ -235,7 +235,7 @@ * @param consInitCheckTol Error tolerance for residual check in consistent initialization */ #define CADET_BINDINGTEST_ALLBINDING_SINGLE_IMPL(modelName, tagName, allBinding, stateAll, configAll, consInitTol, consInitCheckTol) \ - TEST_CASE(modelName " binding model analytic Jacobian vs AD", "[Jacobian],[AD],[BindingModel],[CI]," tagName) \ + TEST_CASE(modelName " binding model analytic Jacobian vs AD", "[Jacobian],[AD],[BindingModel],[jojojojo],[CI]," tagName) \ { \ const unsigned int nBound2[] = BRACED_INIT_LIST allBinding; \ const double state2[] = BRACED_INIT_LIST stateAll; \ @@ -277,7 +277,7 @@ #define CADET_BINDINGTEST_ALLBINDING(modelName, extModelName, allBinding, stateAll, configAll, extConfigAll, consInitTol, consInitCheckTol) \ CADET_BINDINGTEST_ALLBINDING_SINGLE_IMPL(modelName, "[" modelName "]", allBinding, stateAll, configAll, consInitTol, consInitCheckTol) \ CADET_BINDINGTEST_ALLBINDING_SINGLE_IMPL(extModelName, "[ExternalFunction],[" extModelName "]", allBinding, stateAll, extConfigAll, consInitTol, consInitCheckTol) \ - TEST_CASE(modelName " binding model consistent with externally dependent variant", "[BindingModel],[CI],[ExternalFunction],[" modelName "],[" extModelName "]") \ + TEST_CASE(modelName " binding model consistent with externally dependent variant", "[BindingModel],[jojojojo],[CI],[ExternalFunction],[" modelName "],[" extModelName "]") \ { \ const unsigned int nBound2[] = BRACED_INIT_LIST allBinding; \ const double state2[] = BRACED_INIT_LIST stateAll; \ diff --git a/test/LumpedRateModelWithPoresDG.cpp b/test/LumpedRateModelWithPoresDG.cpp index 07390685c..144957992 100644 --- a/test/LumpedRateModelWithPoresDG.cpp +++ b/test/LumpedRateModelWithPoresDG.cpp @@ -58,7 +58,7 @@ TEST_CASE("LRMP_DG non-binding linear pulse vs analytic solution", "[LRMP],[DG], // } //} -TEST_CASE("LRMP_DG numerical Benchmark with parameter sensitivities for linear case", "[LRMP],[DG],[DG1D],[Simulation],[Reference],[Sensitivity],[CI]") +TEST_CASE("LRMP_DG numerical Benchmark with parameter sensitivities for linear case", "[LRMP],[DG],[DG1D],[Simulation],[Reference],[Sensitivity],[CI],[jojojojo]") { const std::string& modelFilePath = std::string("/data/model_LRMP_dynLin_1comp_benchmark1.json"); const std::string& refFilePath = std::string("/data/ref_LRMP_dynLin_1comp_sensbenchmark1_DG_P3Z8.h5");