Skip to content

Commit

Permalink
Merge branch 'sdc_newton_robustness' of github.com:zingale/Castro int…
Browse files Browse the repository at this point in the history
…o sdc_newton_robustness
  • Loading branch information
zingale committed Oct 12, 2023
2 parents 4bee43e + b512a60 commit c6dab80
Show file tree
Hide file tree
Showing 167 changed files with 1,134 additions and 3,492 deletions.
1 change: 0 additions & 1 deletion .github/workflows/good_defines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ AMREX_USE_CUDA
AMREX_USE_GPU
AMREX_USE_OMP
AUX_THERMO
AUX_UPDATE
BL_FORT_USE_LOWERCASE
BL_FORT_USE_UNDERSCORE
BL_FORT_USE_UPPERCASE
Expand Down
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 23.11

* The compile option USE_AUX_UPDATE has been removed. If you want to
manually update the auxiliary parameters, you can use an external
source term or you can use the problem post-timestep hook. (#2614)

# 23.10

* True-SDC no longer evolves density as part of the reaction system
Expand Down
11 changes: 0 additions & 11 deletions Docs/source/FlowChart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,6 @@ of each step.

Only Strang+CTU and simplified-SDC support retries.

#. [AUX_UPDATE] *Auxiliary quantity evolution*

Auxiliary variables in Castro are those that obey a continuity
equation (with optional sources) that are passed into the EOS, but
not subjected to the constraint on mass fractions (summing to one).

The advection and source terms are already dealt with in the
main hydrodynamics advance (above step). A user-supplied routine
ca_auxupdate can be provided here to further update these
quantities.

#. [POINTMASS] *Point mass*

If ``castro.point_mass_fix_solution`` is set, then we
Expand Down
7 changes: 0 additions & 7 deletions Docs/source/build_system.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,6 @@ Hydrodynamics and Source Term Parameters
Simulation Flow Parameters
^^^^^^^^^^^^^^^^^^^^^^^^^^

* ``USE_AUX_UPDATE``: some networks define auxiliary quantities, which in general
Castro will advect, but not otherwise change. If we set ``USE_AUX_UPDATE=TRUE``
then Castro will call a user-supplied routine ``advance_aux()`` that can
change the auxiliary quantities.

.. index:: USE_AUX_UPDATE

* ``USE_POST_SIM``: if this is defined, then Castro will call the user-defined
routine ``problem_post_simulation()`` after the full evolution of the problem
has ended.
Expand Down
4 changes: 0 additions & 4 deletions Exec/Make.Castro
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,6 @@ ifeq ($(USE_SHOCK_VAR), TRUE)
DEFINES += -DSHOCK_VAR
endif

ifeq ($(USE_AUX_UPDATE), TRUE)
DEFINES += -DAUX_UPDATE
endif

ifeq ($(USE_POST_SIM), TRUE)
DEFINES += -DDO_PROBLEM_POST_SIMULATION
endif
Expand Down
2 changes: 0 additions & 2 deletions Exec/gravity_tests/hse_convergence/_prob_params
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

nx_model integer 128 y

dens_base real 1.0_rt y

temp_base real 1.0_rt y
Expand Down
2 changes: 0 additions & 2 deletions Exec/gravity_tests/hse_convergence/inputs.ppm.128
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions Exec/gravity_tests/hse_convergence/inputs.ppm.256
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions Exec/gravity_tests/hse_convergence/inputs.ppm.512
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions Exec/gravity_tests/hse_convergence/inputs.ppm.64
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 11 additions & 1 deletion Exec/gravity_tests/hse_convergence/problem_initialize.H
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <model_parser.H>
#include <initial_model.H>
#include <network.H>
#include <global.H>

AMREX_INLINE
void problem_initialize ()
Expand Down Expand Up @@ -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<int>((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);

Expand Down
2 changes: 0 additions & 2 deletions Exec/gravity_tests/hse_convergence_general/_prob_params
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ X_min real 1.e-4_rt y

cutoff_density real 500.e0_rt y

dx_model real 10.0_rt y

T_hi real 5.e8_rt y

T_star real 1.e8_rt y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ amr.plot_per = 1.e-5 # number of seconds between plotfiles
amr.derive_plot_vars = ALL

# PROBLEM PARAMETERS
problem.dx_model = 20.e0

problem.dens_base = 3.43e6

problem.T_star = 1.e8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ amr.plot_per = 1.e-5 # number of seconds between plotfiles
amr.derive_plot_vars = ALL

# PROBLEM PARAMETERS
problem.dx_model = 20.e0

problem.dens_base = 3.43e6

problem.T_star = 1.e8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ amr.plot_per = 1.e-5 # number of seconds between plotfiles
amr.derive_plot_vars = ALL

# PROBLEM PARAMETERS
problem.dx_model = 20.e0

problem.dens_base = 3.43e6

problem.T_star = 1.e8
Expand Down
10 changes: 8 additions & 2 deletions Exec/gravity_tests/hse_convergence_general/problem_initialize.H
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <initial_model.H>
#include <network.H>
#include <ambient.H>
#include <global.H>

AMREX_INLINE
void problem_initialize ()
Expand Down Expand Up @@ -133,9 +134,14 @@ void problem_initialize ()
amrex::Error("ERROR: fuel mass fractions don't sum to 1");
}

// 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<int>((probhi[AMREX_SPACEDIM-1] -
problo[AMREX_SPACEDIM-1]) / problem::dx_model);
problo[AMREX_SPACEDIM-1]) / dx_model);

int ng = 4;

Expand All @@ -152,7 +158,7 @@ void problem_initialize ()
model_params.low_density_cutoff = problem::low_density_cutoff;

generate_initial_model(nx_model + ng,
problo[AMREX_SPACEDIM-1] - ng*problem::dx_model,
problo[AMREX_SPACEDIM-1] - ng * dx_model,
probhi[AMREX_SPACEDIM-1],
model_params);

Expand Down
1 change: 0 additions & 1 deletion Exec/gravity_tests/hydrostatic_adjust/Problem_Derive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <Derive.H>
#include <Castro.H>
#include <Castro_F.H>
#include <model_parser.H>

using namespace amrex;
Expand Down
1 change: 0 additions & 1 deletion Exec/gravity_tests/uniform_cube/Prob.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <Castro.H>
#include <Castro_F.H>

#include <Gravity.H>

Expand Down
1 change: 0 additions & 1 deletion Exec/gravity_tests/uniform_sphere/Prob.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <Castro.H>
#include <Castro_F.H>

#include <Gravity.H>

Expand Down
2 changes: 0 additions & 2 deletions Exec/hydro_tests/double_bubble/_prob_params
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ single integer 0 y
# at the lower boundary, do we extrapolate the vertical momentum or set it to zero
boundary_type integer 1 y

dx_model real 0.00390625 y

left_bubble_x_center real 0.0_rt

right_bubble_x_center real 0.0_rt
2 changes: 0 additions & 2 deletions Exec/hydro_tests/double_bubble/inputs_2d
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ problem.pert_width = 0.025e0

problem.do_isentropic = 1

problem.dx_model = 0.00390625

# EOS
eos.species_a_name = "A"
eos.species_a_gamma = 1.666e0
Expand Down
2 changes: 0 additions & 2 deletions Exec/hydro_tests/double_bubble/inputs_2d.single
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ problem.do_isentropic = 1

problem.single = 1

problem.dx_model = 0.005859375

# EOS
eos.species_a_name = "A"
eos.species_a_gamma = 1.666e0
Expand Down
2 changes: 0 additions & 2 deletions Exec/hydro_tests/double_bubble/inputs_2d.single.equal
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ problem.do_isentropic = 1

problem.single = 1

problem.dx_model = 0.005859375

# EOS
eos.species_a_name = "A"
eos.species_a_gamma = 1.666e0
Expand Down
2 changes: 0 additions & 2 deletions Exec/hydro_tests/double_bubble/inputs_2d.test
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ problem.pert_width = 0.025e0

problem.do_isentropic = 1

problem.dx_model = 0.00390625

# EOS
eos.species_a_name = "A"
eos.species_a_gamma = 1.666e0
Expand Down
9 changes: 8 additions & 1 deletion Exec/hydro_tests/double_bubble/problem_initialize.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <eos.H>
#include <model_parser.H>
#include <initial_model.H>
#include <global.H>

AMREX_INLINE
void problem_initialize ()
Expand Down Expand Up @@ -37,8 +38,14 @@ void problem_initialize ()

// we'll generate the initial model at the needed resolution

// 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 = (2.0_rt * problem::center[AMREX_SPACEDIM-1] + 1.e-8_rt) /
problem::dx_model;
dx_model;

model_t model_params;
model_params.dens_base = problem::dens_base;
Expand Down
1 change: 0 additions & 1 deletion Exec/hydro_tests/gamma_law_bubble/Problem_Derive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <Derive.H>
#include <Castro.H>
#include <Castro_F.H>
#include <prob_util.H>

using namespace amrex;
Expand Down
2 changes: 0 additions & 2 deletions Exec/hydro_tests/gamma_law_bubble/_prob_params
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@ y_pert_center real 0.7_rt y
pert_width real 0.025_rt y

do_isentropic integer 0 y

dx_model real 0.00390625 y
9 changes: 8 additions & 1 deletion Exec/hydro_tests/gamma_law_bubble/problem_initialize.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <eos.H>
#include <model_parser.H>
#include <initial_model.H>
#include <global.H>

AMREX_INLINE
void problem_initialize ()
Expand All @@ -28,8 +29,14 @@ void problem_initialize ()
// first make a 1D initial model for the entire domain
// we'll create it ourselves, but hook it into the model_parser

// 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 = (2.0_rt * problem::center[AMREX_SPACEDIM-1] + 1.e-8_rt) /
problem::dx_model;
dx_model;

model_t model_params;
model_params.p_base = problem::pres_base;
Expand Down
1 change: 0 additions & 1 deletion Exec/hydro_tests/rotating_torus/Prob.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* Implementations of functions in Problem.H go here */

#include <Castro.H>
#include <Castro_F.H>

using namespace amrex;

Expand Down
1 change: 0 additions & 1 deletion Exec/radiation_tests/RadSphere/Problem_Derive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <Derive.H>
#include <Castro.H>
#include <Castro_F.H>
#include <prob_parameters.H>
#include <extern_parameters.H>
#include <gravity_params.H>
Expand Down
2 changes: 1 addition & 1 deletion Exec/radiation_tests/RadSuOlsonMG/inputs.common
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ geometry.is_periodic = 0 0 0
geometry.coord_sys = 0 # 0 => cart, 1 => RZ, 2 => Spherical

geometry.prob_lo = 0.0 0.0 0.0
geometry.prob_hi = 102.4 1. 1.
geometry.prob_hi = 102.4 0.8 0.8

amr.n_cell = 1024 8 8

Expand Down
2 changes: 0 additions & 2 deletions Exec/radiation_tests/RadThermalWave/Problem_Derive.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#include <AMReX_REAL.H>

#include <Derive.H>
#include <Problem_Derive_F.H>
#include <Castro.H>
#include <Castro_F.H>
#include <fundamental_constants.H>
#include <prob_parameters.H>
#include <cmath>
Expand Down
2 changes: 0 additions & 2 deletions Exec/reacting_tests/bubble_convergence/_prob_params
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

nx_model integer 128 y

dens_base real 1.0_rt y

temp_base real 1.0_rt y
Expand Down
3 changes: 3 additions & 0 deletions Exec/reacting_tests/bubble_convergence/converge_test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# echo the commands
set -x

EXEC=./Castro2d.gnu.MPI.TRUESDC.ex

CONV_TOOL=RichardsonConvergenceTest2d.gnu.ex
Expand Down
Loading

0 comments on commit c6dab80

Please sign in to comment.