Skip to content

Commit

Permalink
Adjust tolerances in some reference tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jbreue16 committed Oct 18, 2024
1 parent e03b16a commit 39744cf
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions test/GeneralRateModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ TEST_CASE("GRM numerical Benchmark with parameter sensitivities for SMA LWE case
{
const std::string& modelFilePath = std::string("/data/model_GRM_reqSMA_4comp_benchmark1.json");
const std::string& refFilePath = std::string("/data/ref_GRM_reqSMA_4comp_sensbenchmark1_FV_Z16parZ2.h5");
const std::vector<double> absTol = { 1e-12, 1e-12, 1e-12, 1e-12 };
const std::vector<double> relTol = { 1e-4, 1e-4, 1e-4, 1e-4 };
const std::vector<double> absTol = { 1e-4, 1e-4, 1e-6, 1e-6 };
const std::vector<double> relTol = { 1.0, 1.0, 1.0, 1.0 };

cadet::test::column::FVparams disc(16, 2);
cadet::test::column::testReferenceBenchmark(modelFilePath, refFilePath, "000", absTol, relTol, disc, true);
Expand Down
2 changes: 1 addition & 1 deletion test/GeneralRateModelDG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ TEST_CASE("GRM_DG numerical Benchmark with parameter sensitivities for linear ca
{
const std::string& modelFilePath = std::string("/data/model_GRM_dynLin_1comp_benchmark1.json");
const std::string& refFilePath = std::string("/data/ref_GRM_dynLin_1comp_sensbenchmark1_cDG_P3Z8_GSM_parP3parZ1.h5");
const std::vector<double> absTol = { 1e-12, 1e-12, 1e-12, 1e-12 };
const std::vector<double> absTol = { 1e-12, 1e-6, 1e-6, 1e-12 };
const std::vector<double> relTol = { 1.0, 1.0, 1.0, 1.0 };

cadet::test::column::DGparams disc(0, 3, 8, 3, 1);
Expand Down
8 changes: 4 additions & 4 deletions test/LumpedRateModelWithPores.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ TEST_CASE("LRMP numerical Benchmark with parameter sensitivities for linear case
{
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_FV_Z32.h5");
const std::vector<double> absTol = { 1e-12, 1e-12, 1e-12, 1e-12 };
const std::vector<double> relTol = { 1e-4, 1e-4, 1e-4, 1e-4 };
const std::vector<double> absTol = { 1e-12, 1e-6, 1e-6, 1e-6 };
const std::vector<double> relTol = { 1.0, 1.0, 1.0, 1.0 };

cadet::test::column::FVparams disc(32);
cadet::test::column::testReferenceBenchmark(modelFilePath, refFilePath, "001", absTol, relTol, disc, true);
Expand All @@ -74,8 +74,8 @@ TEST_CASE("LRMP numerical Benchmark with parameter sensitivities for SMA LWE cas
{
const std::string& modelFilePath = std::string("/data/model_LRMP_reqSMA_4comp_benchmark1.json");
const std::string& refFilePath = std::string("/data/ref_LRMP_reqSMA_4comp_sensbenchmark1_FV_Z32.h5");
const std::vector<double> absTol = { 1e-12, 1e-12, 1e-12, 1e-12 };
const std::vector<double> relTol = { 1e-4, 1e-4, 1e-4, 1e-4 };
const std::vector<double> absTol = { 1e-12, 1e-6, 1e-6, 1e-6 };
const std::vector<double> relTol = { 1.0, 1.0, 1.0, 1.0 };

cadet::test::column::FVparams disc(32);
cadet::test::column::testReferenceBenchmark(modelFilePath, refFilePath, "000", absTol, relTol, disc, true);
Expand Down
4 changes: 2 additions & 2 deletions test/LumpedRateModelWithoutPores.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ TEST_CASE("LRM numerical Benchmark with parameter sensitivities for SMA LWE case
{
const std::string& modelFilePath = std::string("/data/model_LRM_reqSMA_4comp_benchmark1.json");
const std::string& refFilePath = std::string("/data/ref_LRM_reqSMA_4comp_sensbenchmark1_FV_Z32.h5");
const std::vector<double> absTol = { 1e-12, 1e-0, 1e-12, 1e-12 }; // todo: why is such a high tolerance required for first sensitivity parameter
const std::vector<double> relTol = { 1e-4, 1.0, 1e-4, 1e-4 };
const std::vector<double> absTol = { 1e-12, 1e-3, 1e-3, 1e-6 };
const std::vector<double> relTol = { 1e-4, 1.0, 1.0, 1.0 };

cadet::test::column::FVparams disc(32);
cadet::test::column::testReferenceBenchmark(modelFilePath, refFilePath, "000", absTol, relTol, disc, true);
Expand Down
2 changes: 1 addition & 1 deletion test/LumpedRateModelWithoutPoresDG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ TEST_CASE("LRM_DG numerical Benchmark with parameter sensitivities for SMA LWE c
{
const std::string& modelFilePath = std::string("/data/model_LRM_reqSMA_4comp_benchmark1.json");
const std::string& refFilePath = std::string("/data/ref_LRM_reqSMA_4comp_sensbenchmark1_DG_P3Z8.h5");
const std::vector<double> absTol = { 1e-12, 1e-12, 1e-12, 1e-12 };
const std::vector<double> absTol = { 1e-8, 1e-6, 1e-6, 1e-12 };
const std::vector<double> relTol = { 1.0, 1.0, 1.0, 1.0 };

cadet::test::column::DGparams disc(0, 3, 8);
Expand Down
4 changes: 2 additions & 2 deletions test/RadialGeneralRateModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ TEST_CASE("Radial GRM numerical Benchmark with parameter sensitivities for linea
{
const std::string& modelFilePath = std::string("/data/model_radGRM_dynLin_1comp_sensbenchmark1.json");
const std::string& refFilePath = std::string("/data/ref_radGRM_dynLin_1comp_sensbenchmark1_FV_Z32parZ4.h5");
const std::vector<double> absTol = { 1e-12, 1e-12, 1e-12, 1e-12 };
const std::vector<double> relTol = { 1e-6, 1e-6, 1e-6, 1e-6 };
const std::vector<double> absTol = { 1e-12, 1e-8, 1e-4, 1e-12 };
const std::vector<double> relTol = { 1.0, 1.0, 1.0, 1.0 };
cadet::test::column::FVparams disc(32, 4);
cadet::test::column::testReferenceBenchmark(modelFilePath, refFilePath, "001", absTol, relTol, disc, true);
}
Expand Down
4 changes: 2 additions & 2 deletions test/RadialLumpedRateModelWithPores.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ TEST_CASE("Radial LRMP numerical Benchmark with parameter sensitivities for line
{
const std::string& modelFilePath = std::string("/data/model_radLRMP_dynLin_1comp_sensbenchmark1.json");
const std::string& refFilePath = std::string("/data/ref_radLRMP_dynLin_1comp_sensbenchmark1_FV_Z32.h5");
const std::vector<double> absTol = { 1e-12, 1e-12, 1e-12, 1e-12 };
const std::vector<double> relTol = { 1e-6, 1e-6, 1e-6, 1e-6 };
const std::vector<double> absTol = { 1e-12, 1e-6, 1e-6, 1e-6 };
const std::vector<double> relTol = { 1.0, 1.0, 1.0, 1.0 };
cadet::test::column::FVparams disc(32);
cadet::test::column::testReferenceBenchmark(modelFilePath, refFilePath, "001", absTol, relTol, disc, true);
}
Expand Down

0 comments on commit 39744cf

Please sign in to comment.