From 06a060c7181f8626c5c4d268dcb9555e50683533 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Mon, 9 Oct 2023 14:40:11 -0400 Subject: [PATCH] update convective_flame, bubble_convergence, and hse_convergence these now get the model size from the_amr_ptr --- Exec/gravity_tests/hse_convergence/_prob_params | 2 -- Exec/gravity_tests/hse_convergence/inputs.ppm.128 | 2 -- Exec/gravity_tests/hse_convergence/inputs.ppm.256 | 2 -- Exec/gravity_tests/hse_convergence/inputs.ppm.512 | 2 -- Exec/gravity_tests/hse_convergence/inputs.ppm.64 | 2 -- .../inputs.sdc2-pslope-reflect.testsuite | 2 -- .../hse_convergence/inputs.sdc4-reflect.testsuite | 2 -- .../hse_convergence/problem_initialize.H | 12 +++++++++++- .../reacting_tests/bubble_convergence/_prob_params | 2 -- .../bubble_convergence/inputs_2d.128 | 2 -- .../bubble_convergence/inputs_2d.256 | 2 -- .../reacting_tests/bubble_convergence/inputs_2d.32 | 2 -- .../bubble_convergence/inputs_2d.512 | 2 -- .../reacting_tests/bubble_convergence/inputs_2d.64 | 2 -- .../bubble_convergence/problem_initialize.H | 13 ++++++++++++- Exec/science/convective_flame/_prob_params | 2 -- Exec/science/convective_flame/inputs.2d.testsuite | 2 -- Exec/science/convective_flame/inputs.2d_good | 2 -- Exec/science/convective_flame/problem_initialize.H | 14 +++++++++++--- 19 files changed, 34 insertions(+), 37 deletions(-) diff --git a/Exec/gravity_tests/hse_convergence/_prob_params b/Exec/gravity_tests/hse_convergence/_prob_params index 4457108874..07cd760aaf 100644 --- a/Exec/gravity_tests/hse_convergence/_prob_params +++ b/Exec/gravity_tests/hse_convergence/_prob_params @@ -1,6 +1,4 @@ -nx_model integer 128 y - dens_base real 1.0_rt y temp_base real 1.0_rt y diff --git a/Exec/gravity_tests/hse_convergence/inputs.ppm.128 b/Exec/gravity_tests/hse_convergence/inputs.ppm.128 index 9429acc5fb..e30d9ca613 100644 --- a/Exec/gravity_tests/hse_convergence/inputs.ppm.128 +++ b/Exec/gravity_tests/hse_convergence/inputs.ppm.128 @@ -78,7 +78,5 @@ amr.derive_plot_vars = ALL problem.dens_base = 1.e7 problem.temp_base = 1.0e8 -problem.nx_model = 128 - # MICROPHYSICS network.small_x = 1.e-10 diff --git a/Exec/gravity_tests/hse_convergence/inputs.ppm.256 b/Exec/gravity_tests/hse_convergence/inputs.ppm.256 index 3328ea8628..04c4070a40 100644 --- a/Exec/gravity_tests/hse_convergence/inputs.ppm.256 +++ b/Exec/gravity_tests/hse_convergence/inputs.ppm.256 @@ -78,7 +78,5 @@ amr.derive_plot_vars = ALL problem.dens_base = 1.e7 problem.temp_base = 1.0e8 -problem.nx_model = 256 - # MICROPHYSICS network.small_x = 1.e-10 diff --git a/Exec/gravity_tests/hse_convergence/inputs.ppm.512 b/Exec/gravity_tests/hse_convergence/inputs.ppm.512 index fde0a3239e..0dec1c39af 100644 --- a/Exec/gravity_tests/hse_convergence/inputs.ppm.512 +++ b/Exec/gravity_tests/hse_convergence/inputs.ppm.512 @@ -78,7 +78,5 @@ amr.derive_plot_vars = ALL problem.dens_base = 1.e7 problem.temp_base = 1.0e8 -problem.nx_model = 512 - # MICROPHYSICS network.small_x = 1.e-10 diff --git a/Exec/gravity_tests/hse_convergence/inputs.ppm.64 b/Exec/gravity_tests/hse_convergence/inputs.ppm.64 index 415117c4da..191a75afe6 100644 --- a/Exec/gravity_tests/hse_convergence/inputs.ppm.64 +++ b/Exec/gravity_tests/hse_convergence/inputs.ppm.64 @@ -78,7 +78,5 @@ amr.derive_plot_vars = ALL problem.dens_base = 1.e7 problem.temp_base = 1.0e8 -problem.nx_model = 64 - # MICROPHYSICS network.small_x = 1.e-10 diff --git a/Exec/gravity_tests/hse_convergence/inputs.sdc2-pslope-reflect.testsuite b/Exec/gravity_tests/hse_convergence/inputs.sdc2-pslope-reflect.testsuite index 7b2b07a152..dda9687b46 100644 --- a/Exec/gravity_tests/hse_convergence/inputs.sdc2-pslope-reflect.testsuite +++ b/Exec/gravity_tests/hse_convergence/inputs.sdc2-pslope-reflect.testsuite @@ -78,7 +78,5 @@ amr.derive_plot_vars = ALL problem.dens_base = 1.e7 problem.temp_base = 1.0e8 -problem.nx_model = 256 - # MICROPHYSICS network.small_x = 1.e-10 diff --git a/Exec/gravity_tests/hse_convergence/inputs.sdc4-reflect.testsuite b/Exec/gravity_tests/hse_convergence/inputs.sdc4-reflect.testsuite index fa2a37723b..e16786edab 100644 --- a/Exec/gravity_tests/hse_convergence/inputs.sdc4-reflect.testsuite +++ b/Exec/gravity_tests/hse_convergence/inputs.sdc4-reflect.testsuite @@ -77,7 +77,5 @@ amr.derive_plot_vars = ALL problem.dens_base = 1.e7 problem.temp_base = 1.0e8 -problem.nx_model = 256 - # MICROPHYSICS network.small_x = 1.e-10 diff --git a/Exec/gravity_tests/hse_convergence/problem_initialize.H b/Exec/gravity_tests/hse_convergence/problem_initialize.H index b286b5138d..975b17f809 100644 --- a/Exec/gravity_tests/hse_convergence/problem_initialize.H +++ b/Exec/gravity_tests/hse_convergence/problem_initialize.H @@ -6,6 +6,7 @@ #include #include #include +#include AMREX_INLINE void problem_initialize () @@ -38,10 +39,19 @@ void problem_initialize () int nbuf = 8; + // we use the fine grid dx for the model resolution + auto fine_geom = global::the_amr_ptr->Geom(global::the_amr_ptr->maxLevel()); + + auto dx = fine_geom.CellSizeArray(); + auto dx_model = dx[AMREX_SPACEDIM-1]; + + int nx_model = static_cast((probhi[AMREX_SPACEDIM-1] - + problo[AMREX_SPACEDIM-1] + 1.e-8_rt) / dx_model); + // generate the initial model -- it will be stored in the model // parser global data - generate_initial_model(problem::nx_model, + generate_initial_model(nx_model, problo[AMREX_SPACEDIM-1], probhi[AMREX_SPACEDIM-1], model_params, nbuf); diff --git a/Exec/reacting_tests/bubble_convergence/_prob_params b/Exec/reacting_tests/bubble_convergence/_prob_params index e37af8c523..d94fea15b6 100644 --- a/Exec/reacting_tests/bubble_convergence/_prob_params +++ b/Exec/reacting_tests/bubble_convergence/_prob_params @@ -1,6 +1,4 @@ -nx_model integer 128 y - dens_base real 1.0_rt y temp_base real 1.0_rt y diff --git a/Exec/reacting_tests/bubble_convergence/inputs_2d.128 b/Exec/reacting_tests/bubble_convergence/inputs_2d.128 index 011a0f71f4..32a0480da7 100644 --- a/Exec/reacting_tests/bubble_convergence/inputs_2d.128 +++ b/Exec/reacting_tests/bubble_convergence/inputs_2d.128 @@ -71,8 +71,6 @@ problem.pert_width = 2.56e5 problem.dens_base = 1.e7 problem.temp_base = 1.0e8 -problem.nx_model = 128 - problem.do_pert = 1 # Refinement diff --git a/Exec/reacting_tests/bubble_convergence/inputs_2d.256 b/Exec/reacting_tests/bubble_convergence/inputs_2d.256 index 3749f3be4c..7f3e24aa19 100644 --- a/Exec/reacting_tests/bubble_convergence/inputs_2d.256 +++ b/Exec/reacting_tests/bubble_convergence/inputs_2d.256 @@ -71,8 +71,6 @@ problem.pert_width = 2.56e5 problem.dens_base = 1.e7 problem.temp_base = 1.0e8 -problem.nx_model = 256 - problem.do_pert = 1 # Refinement diff --git a/Exec/reacting_tests/bubble_convergence/inputs_2d.32 b/Exec/reacting_tests/bubble_convergence/inputs_2d.32 index 10fe20a1e0..cbe10f7351 100644 --- a/Exec/reacting_tests/bubble_convergence/inputs_2d.32 +++ b/Exec/reacting_tests/bubble_convergence/inputs_2d.32 @@ -71,8 +71,6 @@ problem.pert_width = 2.56e5 problem.dens_base = 1.e7 problem.temp_base = 1.0e8 -problem.nx_model = 32 - problem.do_pert = 1 amr.refinement_indicators = temperr tempgrad diff --git a/Exec/reacting_tests/bubble_convergence/inputs_2d.512 b/Exec/reacting_tests/bubble_convergence/inputs_2d.512 index 0f713945c9..fb3f0dcede 100644 --- a/Exec/reacting_tests/bubble_convergence/inputs_2d.512 +++ b/Exec/reacting_tests/bubble_convergence/inputs_2d.512 @@ -71,8 +71,6 @@ problem.pert_width = 2.56e5 problem.dens_base = 1.e7 problem.temp_base = 1.0e8 -problem.nx_model = 512 - problem.do_pert = 1 diff --git a/Exec/reacting_tests/bubble_convergence/inputs_2d.64 b/Exec/reacting_tests/bubble_convergence/inputs_2d.64 index 9dcf39921a..4b8aa67f68 100644 --- a/Exec/reacting_tests/bubble_convergence/inputs_2d.64 +++ b/Exec/reacting_tests/bubble_convergence/inputs_2d.64 @@ -71,8 +71,6 @@ problem.pert_width = 2.56e5 problem.dens_base = 1.e7 problem.temp_base = 1.0e8 -problem.nx_model = 64 - problem.do_pert = 1 # Refinement diff --git a/Exec/reacting_tests/bubble_convergence/problem_initialize.H b/Exec/reacting_tests/bubble_convergence/problem_initialize.H index 22f63efd73..f12e9f83f1 100644 --- a/Exec/reacting_tests/bubble_convergence/problem_initialize.H +++ b/Exec/reacting_tests/bubble_convergence/problem_initialize.H @@ -6,6 +6,7 @@ #include #include #include +#include AMREX_INLINE void problem_initialize () @@ -41,7 +42,17 @@ void problem_initialize () // generate the initial model -- it will be stored in the model // parser global data - generate_initial_model(problem::nx_model, + // we use the fine grid dx for the model resolution + auto fine_geom = global::the_amr_ptr->Geom(global::the_amr_ptr->maxLevel()); + + auto dx = fine_geom.CellSizeArray(); + auto dx_model = dx[AMREX_SPACEDIM-1]; + + int nx_model = static_cast((probhi[AMREX_SPACEDIM-1] - + problo[AMREX_SPACEDIM-1] + 1.e-8_rt) / dx_model); + + + generate_initial_model(nx_model, problo[AMREX_SPACEDIM-1], probhi[AMREX_SPACEDIM-1], model_params, nbuf); diff --git a/Exec/science/convective_flame/_prob_params b/Exec/science/convective_flame/_prob_params index e7e87c7ae0..6d61d68dbe 100644 --- a/Exec/science/convective_flame/_prob_params +++ b/Exec/science/convective_flame/_prob_params @@ -12,8 +12,6 @@ refine_cutoff_frac real 0.5_rt y refine_cutoff_height real 0.0_rt -nx_model integer 128 y - T_hi real 5.e8_rt y T_star real 1.e8_rt y diff --git a/Exec/science/convective_flame/inputs.2d.testsuite b/Exec/science/convective_flame/inputs.2d.testsuite index 93000a86f9..66ae2b04fd 100644 --- a/Exec/science/convective_flame/inputs.2d.testsuite +++ b/Exec/science/convective_flame/inputs.2d.testsuite @@ -87,8 +87,6 @@ problem.cutoff_density = 1.e-8 problem.dtemp = 1.0 -problem.nx_model = 768 - problem.dens_base = 1.0 problem.T_star = 0.75 diff --git a/Exec/science/convective_flame/inputs.2d_good b/Exec/science/convective_flame/inputs.2d_good index d4e0fdc64d..b997075c26 100644 --- a/Exec/science/convective_flame/inputs.2d_good +++ b/Exec/science/convective_flame/inputs.2d_good @@ -88,8 +88,6 @@ problem.cutoff_density = 1.e-8 problem.dtemp = 2.0 -problem.nx_model = 768 - problem.dens_base = 1.0 problem.T_star = 0.75 diff --git a/Exec/science/convective_flame/problem_initialize.H b/Exec/science/convective_flame/problem_initialize.H index 77dce7c934..5d1c9d3bd0 100644 --- a/Exec/science/convective_flame/problem_initialize.H +++ b/Exec/science/convective_flame/problem_initialize.H @@ -7,6 +7,7 @@ #include #include #include +#include AMREX_INLINE void problem_initialize () @@ -123,7 +124,14 @@ void problem_initialize () // lower boundary, we'll add 4 ghostcells to this, so we need to // compute dx - Real dx_model = (probhi[AMREX_SPACEDIM-1] - problo[AMREX_SPACEDIM-1]) / problem::nx_model; + // we use the fine grid dx for the model resolution + auto fine_geom = global::the_amr_ptr->Geom(global::the_amr_ptr->maxLevel()); + + auto dx = fine_geom.CellSizeArray(); + auto dx_model = dx[AMREX_SPACEDIM-1]; + + int nx_model = static_cast((probhi[AMREX_SPACEDIM-1] - + problo[AMREX_SPACEDIM-1] + 1.e-8_rt) / dx_model); int ng = 4; @@ -139,7 +147,7 @@ void problem_initialize () model_params.low_density_cutoff = problem::low_density_cutoff; - generate_initial_model(problem::nx_model + ng, + generate_initial_model(nx_model + ng, problo[AMREX_SPACEDIM-1] - ng * dx_model, probhi[AMREX_SPACEDIM-1], model_params, 0); @@ -149,7 +157,7 @@ void problem_initialize () model_params.T_hi = model_params.T_hi + problem::dtemp; - generate_initial_model(problem::nx_model + ng, + generate_initial_model(nx_model + ng, problo[AMREX_SPACEDIM-1] - ng * dx_model, probhi[AMREX_SPACEDIM-1], model_params, 1);