From 943fae1c124f009ce8c4c804e03bad09b16bf3b1 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Fri, 26 Apr 2024 19:18:43 -0400 Subject: [PATCH 1/6] quite a Coverity complaint about tainted info.m_max_level --- Source/driver/Castro.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/driver/Castro.cpp b/Source/driver/Castro.cpp index 4ceac43446..68ff343270 100644 --- a/Source/driver/Castro.cpp +++ b/Source/driver/Castro.cpp @@ -603,6 +603,10 @@ Castro::read_params () info.SetDerefine(derefine); } + // the default max_level of AMRErrorTagInfo is 1000, but make sure + // that it is reasonable for Castro + BL_ASSERT(info.max_level < MAX_LEVEL); + if (ppr.countval("value_greater")) { Vector value; ppr.getarr("value_greater", value, 0, ppr.countval("value_greater")); From 0cdaa738b0489577b8e71056ce07985a7cefae99 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Fri, 26 Apr 2024 19:20:10 -0400 Subject: [PATCH 2/6] fix --- Source/driver/Castro.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/driver/Castro.cpp b/Source/driver/Castro.cpp index 68ff343270..4c710724fd 100644 --- a/Source/driver/Castro.cpp +++ b/Source/driver/Castro.cpp @@ -605,7 +605,7 @@ Castro::read_params () // the default max_level of AMRErrorTagInfo is 1000, but make sure // that it is reasonable for Castro - BL_ASSERT(info.max_level < MAX_LEVEL); + BL_ASSERT(info.m_max_level < MAX_LEVEL); if (ppr.countval("value_greater")) { Vector value; From 13bdfa4a6ab2d105257b8c270a61c5e45c9ac80c Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Fri, 26 Apr 2024 19:26:25 -0400 Subject: [PATCH 3/6] fix comp --- Source/driver/Castro.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/driver/Castro.cpp b/Source/driver/Castro.cpp index 4c710724fd..c4fe2cfee1 100644 --- a/Source/driver/Castro.cpp +++ b/Source/driver/Castro.cpp @@ -56,6 +56,7 @@ #include #include +#include using namespace amrex; From 654b2d7a8f68f9a3e40a2a344c74f9806b5ae4ad Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Fri, 26 Apr 2024 19:31:33 -0400 Subject: [PATCH 4/6] fix again --- Source/driver/Castro.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/driver/Castro.cpp b/Source/driver/Castro.cpp index c4fe2cfee1..6a03660c42 100644 --- a/Source/driver/Castro.cpp +++ b/Source/driver/Castro.cpp @@ -606,7 +606,7 @@ Castro::read_params () // the default max_level of AMRErrorTagInfo is 1000, but make sure // that it is reasonable for Castro - BL_ASSERT(info.m_max_level < MAX_LEVEL); + BL_ASSERT(info.m_max_level < MAX_LEV); if (ppr.countval("value_greater")) { Vector value; From 55d3800c67481aeff8c05b35f3c102b17733720a Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Fri, 26 Apr 2024 19:43:15 -0400 Subject: [PATCH 5/6] fix again --- Source/driver/Castro.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/driver/Castro.cpp b/Source/driver/Castro.cpp index 6a03660c42..28691bded4 100644 --- a/Source/driver/Castro.cpp +++ b/Source/driver/Castro.cpp @@ -591,7 +591,12 @@ Castro::read_params () if (ppr.countval("max_level") > 0) { int max_level; ppr.get("max_level", max_level); + BL_ASSERT(max_level <= MAX_LEV); info.SetMaxLevel(max_level); + } else { + // the default max_level of AMRErrorTagInfo is 1000, but make sure + // that it is reasonable for Castro + info.SetMaxLevel(MAX_LEV); } if (ppr.countval("volume_weighting") > 0) { int volume_weighting; @@ -604,10 +609,6 @@ Castro::read_params () info.SetDerefine(derefine); } - // the default max_level of AMRErrorTagInfo is 1000, but make sure - // that it is reasonable for Castro - BL_ASSERT(info.m_max_level < MAX_LEV); - if (ppr.countval("value_greater")) { Vector value; ppr.getarr("value_greater", value, 0, ppr.countval("value_greater")); From 035973c7aef3892b871345d23a3256e9b44089a8 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Fri, 26 Apr 2024 20:02:55 -0400 Subject: [PATCH 6/6] don't have an inputs go > 15 levels --- Exec/gravity_tests/advecting_white_dwarf/inputs | 2 +- Exec/hydro_tests/Sedov/inputs.helm_scaling | 4 ++-- Exec/hydro_tests/Sedov/inputs.mini-Castro | 4 ++-- Exec/hydro_tests/Sedov/inputs.mini-Castro.gpu_test | 2 +- Exec/radiation_tests/Rad2Tshock/inputs.M2 | 2 +- Exec/radiation_tests/Rad2Tshock/inputs.M2.mg | 2 +- Exec/radiation_tests/Rad2Tshock/inputs.M2.test | 2 +- Exec/radiation_tests/Rad2Tshock/inputs.M2.test.multid | 2 +- Exec/radiation_tests/Rad2Tshock/inputs.M5 | 2 +- Exec/radiation_tests/Rad2Tshock/inputs.M5.mg | 2 +- Exec/radiation_tests/Rad2Tshock/inputs.M5.mg.test | 2 +- Exec/radiation_tests/Rad2Tshock/inputs.M5.mg.test.multid | 2 +- Exec/radiation_tests/Rad2Tshock/inputs_y.M5 | 2 +- Exec/radiation_tests/Rad2Tshock/inputs_z.M5 | 2 +- Exec/scf_tests/single_star/inputs_helm_nonrotating | 2 +- Exec/scf_tests/single_star/inputs_helm_nonrotating.test | 2 +- Exec/scf_tests/single_star/inputs_helm_rotating | 2 +- Exec/science/Detonation/inputs-collision | 2 +- Exec/science/Detonation/inputs-collision.testsuite | 2 +- Exec/science/wdmerger/inputs | 2 +- Exec/science/wdmerger/tests/inputs_pakmor | 2 +- Exec/science/wdmerger/tests/inputs_scaling | 2 +- Exec/science/wdmerger/tests/tde/inputs.test | 2 +- .../wdmerger/tests/wdmerger_collision/inputs_2d_collision | 2 +- 24 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Exec/gravity_tests/advecting_white_dwarf/inputs b/Exec/gravity_tests/advecting_white_dwarf/inputs index dd0c95d9ca..ee4da189a0 100644 --- a/Exec/gravity_tests/advecting_white_dwarf/inputs +++ b/Exec/gravity_tests/advecting_white_dwarf/inputs @@ -84,7 +84,7 @@ amr.refinement_indicators = density # Density refinement criterion amr.refine.density.value_greater = 1.0e3 amr.refine.density.field_name = density -amr.refine.density.max_level = 20 +amr.refine.density.max_level = 15 ############################################################################################ # Physics to include diff --git a/Exec/hydro_tests/Sedov/inputs.helm_scaling b/Exec/hydro_tests/Sedov/inputs.helm_scaling index 9df7b1e789..62de469567 100644 --- a/Exec/hydro_tests/Sedov/inputs.helm_scaling +++ b/Exec/hydro_tests/Sedov/inputs.helm_scaling @@ -40,11 +40,11 @@ amr.max_grid_size = 128 amr.refinement_indicators = dengrad_rel -amr.refine.dengrad_rel.max_level = 20 +amr.refine.dengrad_rel.max_level = 15 amr.refine.dengrad_rel.relative_gradient = 0.25 amr.refine.dengrad_rel.field_name = density -amr.refine.dengrad_rel.max_level = 20 +amr.refine.dengrad_rel.max_level = 15 amr.refine.dengrad_rel.relative_gradient = 0.25 amr.refine.dengrad_rel.field_name = Temp diff --git a/Exec/hydro_tests/Sedov/inputs.mini-Castro b/Exec/hydro_tests/Sedov/inputs.mini-Castro index 65af4d4f7f..becf4e6d01 100644 --- a/Exec/hydro_tests/Sedov/inputs.mini-Castro +++ b/Exec/hydro_tests/Sedov/inputs.mini-Castro @@ -40,11 +40,11 @@ amr.max_grid_size = 128 amr.refinement_indicators = dengrad_rel tempgrad_rel -amr.refine.dengrad_rel.max_level = 20 +amr.refine.dengrad_rel.max_level = 15 amr.refine.dengrad_rel.relative_gradient = 0.25 amr.refine.dengrad_rel.field_name = density -amr.refine.tempgrad_rel.max_level = 20 +amr.refine.tempgrad_rel.max_level = 15 amr.refine.tempgrad_rel.relative_gradient = 0.25 amr.refine.tempgrad_rel.field_name = Temp diff --git a/Exec/hydro_tests/Sedov/inputs.mini-Castro.gpu_test b/Exec/hydro_tests/Sedov/inputs.mini-Castro.gpu_test index f8d4786075..5488862c41 100644 --- a/Exec/hydro_tests/Sedov/inputs.mini-Castro.gpu_test +++ b/Exec/hydro_tests/Sedov/inputs.mini-Castro.gpu_test @@ -41,7 +41,7 @@ amr.max_grid_size = 32 amr.refinement_indicators = dengrad_rel -amr.refine.dengrad_rel.max_level = 20 +amr.refine.dengrad_rel.max_level = 15 amr.refine.dengrad_rel.relative_gradient = 0.25 amr.refine.dengrad_rel.field_name = density diff --git a/Exec/radiation_tests/Rad2Tshock/inputs.M2 b/Exec/radiation_tests/Rad2Tshock/inputs.M2 index 76a012388a..2ebd7132f5 100644 --- a/Exec/radiation_tests/Rad2Tshock/inputs.M2 +++ b/Exec/radiation_tests/Rad2Tshock/inputs.M2 @@ -23,7 +23,7 @@ amr.grid_eff = 0.7 # what constitutes an efficient grid amr.refinement_indicators = tempgrad_rel -amr.refine.tempgrad_rel.max_level = 20 +amr.refine.tempgrad_rel.max_level = 15 amr.refine.tempgrad_rel.relative_gradient = 0.1 amr.refine.tempgrad_rel.field_name = Temp diff --git a/Exec/radiation_tests/Rad2Tshock/inputs.M2.mg b/Exec/radiation_tests/Rad2Tshock/inputs.M2.mg index 2eacc28fa3..bd04553b4a 100644 --- a/Exec/radiation_tests/Rad2Tshock/inputs.M2.mg +++ b/Exec/radiation_tests/Rad2Tshock/inputs.M2.mg @@ -25,7 +25,7 @@ amr.grid_eff = 0.7 # what constitutes an efficient grid amr.refinement_indicators = tempgrad_rel -amr.refine.tempgrad_rel.max_level = 20 +amr.refine.tempgrad_rel.max_level = 15 amr.refine.tempgrad_rel.relative_gradient = 0.1 amr.refine.tempgrad_rel.field_name = Temp diff --git a/Exec/radiation_tests/Rad2Tshock/inputs.M2.test b/Exec/radiation_tests/Rad2Tshock/inputs.M2.test index 0b28b41c72..87888735e6 100644 --- a/Exec/radiation_tests/Rad2Tshock/inputs.M2.test +++ b/Exec/radiation_tests/Rad2Tshock/inputs.M2.test @@ -23,7 +23,7 @@ amr.grid_eff = 0.7 # what constitutes an efficient grid amr.refinement_indicators = tempgrad_rel -amr.refine.tempgrad_rel.max_level = 20 +amr.refine.tempgrad_rel.max_level = 15 amr.refine.tempgrad_rel.relative_gradient = 0.1 amr.refine.tempgrad_rel.field_name = Temp diff --git a/Exec/radiation_tests/Rad2Tshock/inputs.M2.test.multid b/Exec/radiation_tests/Rad2Tshock/inputs.M2.test.multid index 056f3c4096..8fda66fe8a 100644 --- a/Exec/radiation_tests/Rad2Tshock/inputs.M2.test.multid +++ b/Exec/radiation_tests/Rad2Tshock/inputs.M2.test.multid @@ -23,7 +23,7 @@ amr.grid_eff = 0.7 # what constitutes an efficient grid amr.refinement_indicators = tempgrad_rel -amr.refine.tempgrad_rel.max_level = 20 +amr.refine.tempgrad_rel.max_level = 15 amr.refine.tempgrad_rel.relative_gradient = 0.1 amr.refine.tempgrad_rel.field_name = Temp diff --git a/Exec/radiation_tests/Rad2Tshock/inputs.M5 b/Exec/radiation_tests/Rad2Tshock/inputs.M5 index 9ca75ead57..975756b11f 100644 --- a/Exec/radiation_tests/Rad2Tshock/inputs.M5 +++ b/Exec/radiation_tests/Rad2Tshock/inputs.M5 @@ -23,7 +23,7 @@ amr.grid_eff = 0.7 # what constitutes an efficient grid amr.refinement_indicators = tempgrad_rel -amr.refine.tempgrad_rel.max_level = 20 +amr.refine.tempgrad_rel.max_level = 15 amr.refine.tempgrad_rel.relative_gradient = 0.1 amr.refine.tempgrad_rel.field_name = Temp diff --git a/Exec/radiation_tests/Rad2Tshock/inputs.M5.mg b/Exec/radiation_tests/Rad2Tshock/inputs.M5.mg index 5e96bf7185..4774442535 100644 --- a/Exec/radiation_tests/Rad2Tshock/inputs.M5.mg +++ b/Exec/radiation_tests/Rad2Tshock/inputs.M5.mg @@ -24,7 +24,7 @@ amr.grid_eff = 0.7 # what constitutes an efficient grid amr.refinement_indicators = tempgrad_rel -amr.refine.tempgrad_rel.max_level = 20 +amr.refine.tempgrad_rel.max_level = 15 amr.refine.tempgrad_rel.relative_gradient = 0.1 amr.refine.tempgrad_rel.field_name = Temp diff --git a/Exec/radiation_tests/Rad2Tshock/inputs.M5.mg.test b/Exec/radiation_tests/Rad2Tshock/inputs.M5.mg.test index 5041ee225a..f5bb1324c6 100644 --- a/Exec/radiation_tests/Rad2Tshock/inputs.M5.mg.test +++ b/Exec/radiation_tests/Rad2Tshock/inputs.M5.mg.test @@ -24,7 +24,7 @@ amr.grid_eff = 0.7 # what constitutes an efficient grid amr.refinement_indicators = tempgrad_rel -amr.refine.tempgrad_rel.max_level = 20 +amr.refine.tempgrad_rel.max_level = 15 amr.refine.tempgrad_rel.relative_gradient = 0.1 amr.refine.tempgrad_rel.field_name = Temp diff --git a/Exec/radiation_tests/Rad2Tshock/inputs.M5.mg.test.multid b/Exec/radiation_tests/Rad2Tshock/inputs.M5.mg.test.multid index 7e7067894d..e770a06bb1 100644 --- a/Exec/radiation_tests/Rad2Tshock/inputs.M5.mg.test.multid +++ b/Exec/radiation_tests/Rad2Tshock/inputs.M5.mg.test.multid @@ -24,7 +24,7 @@ amr.grid_eff = 0.7 # what constitutes an efficient grid amr.refinement_indicators = tempgrad_rel -amr.refine.tempgrad_rel.max_level = 20 +amr.refine.tempgrad_rel.max_level = 15 amr.refine.tempgrad_rel.relative_gradient = 0.1 amr.refine.tempgrad_rel.field_name = Temp diff --git a/Exec/radiation_tests/Rad2Tshock/inputs_y.M5 b/Exec/radiation_tests/Rad2Tshock/inputs_y.M5 index c1067e903d..48fe587859 100644 --- a/Exec/radiation_tests/Rad2Tshock/inputs_y.M5 +++ b/Exec/radiation_tests/Rad2Tshock/inputs_y.M5 @@ -23,7 +23,7 @@ amr.grid_eff = 0.7 # what constitutes an efficient grid amr.refinement_indicators = tempgrad_rel -amr.refine.tempgrad_rel.max_level = 20 +amr.refine.tempgrad_rel.max_level = 15 amr.refine.tempgrad_rel.relative_gradient = 0.1 amr.refine.tempgrad_rel.field_name = Temp diff --git a/Exec/radiation_tests/Rad2Tshock/inputs_z.M5 b/Exec/radiation_tests/Rad2Tshock/inputs_z.M5 index 159efd0a22..eaf6c8df10 100644 --- a/Exec/radiation_tests/Rad2Tshock/inputs_z.M5 +++ b/Exec/radiation_tests/Rad2Tshock/inputs_z.M5 @@ -23,7 +23,7 @@ amr.grid_eff = 0.7 # what constitutes an efficient grid amr.refinement_indicators = tempgrad_rel -amr.refine.tempgrad_rel.max_level = 20 +amr.refine.tempgrad_rel.max_level = 15 amr.refine.tempgrad_rel.relative_gradient = 0.1 amr.refine.tempgrad_rel.field_name = Temp diff --git a/Exec/scf_tests/single_star/inputs_helm_nonrotating b/Exec/scf_tests/single_star/inputs_helm_nonrotating index a18ffd0bd5..f1264e56e0 100644 --- a/Exec/scf_tests/single_star/inputs_helm_nonrotating +++ b/Exec/scf_tests/single_star/inputs_helm_nonrotating @@ -61,6 +61,6 @@ amr.derive_plot_vars = ALL amr.refinement_indicators = denerr -amr.refine.denerr.max_level = 20 +amr.refine.denerr.max_level = 15 amr.refine.denerr.value_greater = 1.e6 amr.refine.denerr.field_name = density diff --git a/Exec/scf_tests/single_star/inputs_helm_nonrotating.test b/Exec/scf_tests/single_star/inputs_helm_nonrotating.test index 9a1b4c78ee..64c74428e7 100644 --- a/Exec/scf_tests/single_star/inputs_helm_nonrotating.test +++ b/Exec/scf_tests/single_star/inputs_helm_nonrotating.test @@ -61,6 +61,6 @@ amr.derive_plot_vars = ALL amr.refinement_indicators = denerr -amr.refine.denerr.max_level = 20 +amr.refine.denerr.max_level = 15 amr.refine.denerr.value_greater = 1.e6 amr.refine.denerr.field_name = density diff --git a/Exec/scf_tests/single_star/inputs_helm_rotating b/Exec/scf_tests/single_star/inputs_helm_rotating index 0c6e9fe747..eadcd4d130 100644 --- a/Exec/scf_tests/single_star/inputs_helm_rotating +++ b/Exec/scf_tests/single_star/inputs_helm_rotating @@ -61,7 +61,7 @@ amr.derive_plot_vars = ALL amr.refinement_indicators = denerr -amr.refine.denerr.max_level = 20 +amr.refine.denerr.max_level = 15 amr.refine.denerr.value_greater = 1.e6 amr.refine.denerr.field_name = density diff --git a/Exec/science/Detonation/inputs-collision b/Exec/science/Detonation/inputs-collision index 39edd5ae7a..6141c839b1 100644 --- a/Exec/science/Detonation/inputs-collision +++ b/Exec/science/Detonation/inputs-collision @@ -51,7 +51,7 @@ amr.refine.dengrad_rel.max_level = 0 amr.refine.dengrad_rel.relative_gradient = 0.5 amr.refine.dengrad_rel.field_name = density -amr.refine.dxnucerr.max_level = 20 +amr.refine.dxnucerr.max_level = 15 amr.refine.dxnucerr.value_greater = 1.e-16 amr.refine.dxnucerr.field_name = t_sound_t_enuc diff --git a/Exec/science/Detonation/inputs-collision.testsuite b/Exec/science/Detonation/inputs-collision.testsuite index 66bed9133a..355fed8c15 100644 --- a/Exec/science/Detonation/inputs-collision.testsuite +++ b/Exec/science/Detonation/inputs-collision.testsuite @@ -51,7 +51,7 @@ amr.refine.dengrad_rel.max_level = 0 amr.refine.dengrad_rel.relative_gradient = 0.5 amr.refine.dengrad_rel.field_name = density -amr.refine.dxnucerr.max_level = 20 +amr.refine.dxnucerr.max_level = 15 amr.refine.dxnucerr.value_greater = 1.e-16 amr.refine.dxnucerr.field_name = t_sound_t_enuc diff --git a/Exec/science/wdmerger/inputs b/Exec/science/wdmerger/inputs index c8dc81beaa..5def509a0d 100644 --- a/Exec/science/wdmerger/inputs +++ b/Exec/science/wdmerger/inputs @@ -137,7 +137,7 @@ amr.refinement_indicators = density temperature # Density refinement criterion amr.refine.density.value_greater = 1.0e0 amr.refine.density.field_name = density -amr.refine.density.max_level = 20 +amr.refine.density.max_level = 15 # Temperature refinement criterion amr.refine.temperature.value_greater = 5.0e8 diff --git a/Exec/science/wdmerger/tests/inputs_pakmor b/Exec/science/wdmerger/tests/inputs_pakmor index 8cfa6d6027..6432b3bf57 100644 --- a/Exec/science/wdmerger/tests/inputs_pakmor +++ b/Exec/science/wdmerger/tests/inputs_pakmor @@ -149,7 +149,7 @@ amr.refine.density.max_level = 1 # Density2 refinement criterion amr.refine.density2.value_greater = 1.0e5 amr.refine.density2.field_name = density -amr.refine.density2.max_level = 20 +amr.refine.density2.max_level = 15 # Temperature refinement criterion amr.refine.temperature.value_greater = 5.0e8 diff --git a/Exec/science/wdmerger/tests/inputs_scaling b/Exec/science/wdmerger/tests/inputs_scaling index cd48f143b3..03c95c1636 100644 --- a/Exec/science/wdmerger/tests/inputs_scaling +++ b/Exec/science/wdmerger/tests/inputs_scaling @@ -149,7 +149,7 @@ amr.refine.density.max_level = 1 # Density2 refinement criterion amr.refine.density2.value_greater = 1.0e5 amr.refine.density2.field_name = density -amr.refine.density2.max_level = 20 +amr.refine.density2.max_level = 15 # Temperature refinement criterion amr.refine.temperature.value_greater = 5.0e8 diff --git a/Exec/science/wdmerger/tests/tde/inputs.test b/Exec/science/wdmerger/tests/tde/inputs.test index fcd9708cae..59ffbb9aac 100644 --- a/Exec/science/wdmerger/tests/tde/inputs.test +++ b/Exec/science/wdmerger/tests/tde/inputs.test @@ -76,7 +76,7 @@ amr.refinement_indicators = density # Density refinement criterion amr.refine.density.value_greater = 1.0e4 amr.refine.density.field_name = density -amr.refine.density.max_level = 20 +amr.refine.density.max_level = 15 ############################################################################################ # Physics to include diff --git a/Exec/science/wdmerger/tests/wdmerger_collision/inputs_2d_collision b/Exec/science/wdmerger/tests/wdmerger_collision/inputs_2d_collision index a718a7124f..8a2bca0293 100644 --- a/Exec/science/wdmerger/tests/wdmerger_collision/inputs_2d_collision +++ b/Exec/science/wdmerger/tests/wdmerger_collision/inputs_2d_collision @@ -107,7 +107,7 @@ amr.refinement_indicators = density # Density refinement criterion amr.refine.density.value_greater = 1.0e2 amr.refine.density.field_name = density -amr.refine.density.max_level = 20 +amr.refine.density.max_level = 15 # Avoid tagging near the domain boundary castro.max_tagging_radius = 0.75e0