Skip to content

Commit f365997

Browse files
committed
wip
1 parent 3e2df85 commit f365997

File tree

6 files changed

+6216
-10
lines changed

6 files changed

+6216
-10
lines changed

doc/interface/sensitivities.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Group /input/sensitivity/param_XXX
3939

4040
``SENS_NAME``
4141

42-
Name of the parameter (Note that ``PAR_RADIUS`` and ``PAR_CORE_RADIUS`` sensitivities are only available for Finite Volume discretization)
42+
Name of the parameter (Note that ``PAR_RADIUS`` and ``PAR_CORERADIUS`` sensitivities are only available for Finite Volume discretization)
4343

4444
================ ===========================
4545
**Type:** string **Length:** :math:`\geq 1`

src/libcadet/model/parts/ParticleDiffusionOperatorDG.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ namespace parts
635635

636636
//if (_axiallyConstantParTypeVolFrac)
637637
//{
638-
// // Register only the f_Irst _nParType items
638+
// // Register only the first _nParType items
639639
// for (unsigned int i = 0; i < _nParType; ++i)
640640
// parameters[makeParamId(hashString("PAR_TYPE_VOLFRAC"), unitOpIdx, CompIndep, i, BoundStateIndep, ReactionIndep, SectionIndep)] = &_parTypeVolFrac[i];
641641
//}
@@ -909,7 +909,7 @@ namespace parts
909909
// Sort in descending order
910910
std::sort(orderedInterfaces.begin(), orderedInterfaces.end(), std::greater<active>());
911911

912-
// Force f_Irst and last element to be 1.0 and 0.0, respectively
912+
// Force first and last element to be 1.0 and 0.0, respectively
913913
orderedInterfaces[0] = 1.0;
914914
orderedInterfaces.back() = 0.0;
915915

test/GeneralRateModelDG.cpp

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,27 @@ TEST_CASE("GRM_DG non-binding linear pulse vs analytic solution", "[GRM],[DG],[D
6464
// }
6565
//}
6666

67-
TEST_CASE("GRM_DG numerical Benchmark with parameter sensitivities for linear case", "[GRM],[DG],[DG1D],[Simulation],[Reference],[Sensitivity]") // todo CI flag: currently only runs locally but fails on server
67+
TEST_CASE("GRM_DG numerical Benchmark with parameter sensitivities for linear case", "[GRM],[DG],[DG1D],[Simulation],[Reference],[Sensitivity],[testHere]") // todo CI flag: currently only runs locally but fails on server
6868
{
69-
const std::string& modelFilePath = std::string("/data/model_GRM_dynLin_1comp_benchmark1.json");
70-
const std::string& refFilePath = std::string("/data/ref_GRM_dynLin_1comp_sensbenchmark1_cDG_P3Z8_GSM_parP3parZ1.h5");
71-
const std::vector<double> absTol = { 1e-12, 1e-6, 1e-6, 1e-12 };
72-
const std::vector<double> relTol = { 1.0, 1.0, 1.0, 1.0 };
69+
std::string modelFilePath = std::string("/data/model_GRM_dynLin_1comp_benchmark1.json");
70+
std::string refFilePath = std::string("/data/ref_GRM_dynLin_1comp_sensbenchmark1_cDG_P3Z8_GSM_parP3parZ1.h5");
71+
std::vector<double> absTol = { 1e-12, 1e-6, 1e-6, 1e-12 };
72+
std::vector<double> relTol = { 1.0, 1.0, 1.0, 1.0 };
7373

7474
cadet::test::column::DGparams disc(0, 3, 8, 3, 1);
7575
cadet::test::column::testReferenceBenchmark(modelFilePath, refFilePath, "001", absTol, relTol, disc, true);
76+
77+
// test setting with other parameter sensitivities
78+
modelFilePath = std::string("/data/model_GRM_dynLin_1comp_benchmark2.json");
79+
refFilePath = std::string("/data/ref_GRM_dynLin_1comp_sensbenchmark2_cDG_P3Z8_GSM_parP3parZ1.h5");
80+
81+
cadet::test::column::testReferenceBenchmark(modelFilePath, refFilePath, "001", absTol, relTol, disc, true);
7682
}
7783

7884
TEST_CASE("GRM_DG numerical Benchmark with parameter sensitivities for SMA LWE case", "[GRM],[DG],[DG1D],[Simulation],[Reference],[Sensitivity]") // todo CI flag: currently only runs locally but fails on server
7985
{
80-
const std::string& modelFilePath = std::string("/data/model_GRM_reqSMA_4comp_benchmark1.json");
81-
const std::string& refFilePath = std::string("/data/ref_GRM_reqSMA_4comp_sensbenchmark1_cDG_P3Z8_GSM_parP3parZ1.h5");
86+
const std::string modelFilePath = std::string("/data/model_GRM_reqSMA_4comp_benchmark1.json");
87+
const std::string refFilePath = std::string("/data/ref_GRM_reqSMA_4comp_sensbenchmark1_cDG_P3Z8_GSM_parP3parZ1.h5");
8288
const std::vector<double> absTol = { 1e-12, 1e-12, 1e-12, 1e-12 };
8389
const std::vector<double> relTol = { 1.0, 1.0, 1.0, 1.0 };
8490

0 commit comments

Comments
 (0)