Skip to content

Commit

Permalink
Merge branch 'development' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Mar 1, 2021
2 parents 2499072 + 6e075fa commit 5e0a1b9
Show file tree
Hide file tree
Showing 56 changed files with 394 additions and 7,262 deletions.
18 changes: 2 additions & 16 deletions Exec/Make.Castro
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,6 @@ USE_ALL_CASTRO ?= TRUE

USE_AMR_CORE ?= TRUE

# hack for now -- CUDA processing doesn't respect functions blocked by
# ifdefs, so we need to define EXTRA_THERMO
ifeq ($(USE_CUDA),TRUE)
DEFINES += -DEXTRA_THERMO
endif

# all Castro problems use a dimension-agnostic interface
DIMENSION_AGNOSTIC = TRUE

Expand Down Expand Up @@ -347,16 +341,8 @@ endif

include $(Bpack)

ifeq ($(MEGA_FORTRAN), TRUE)
F90EXE_sources += mega_f.F90
#$(depEXETempDir)/f90.depends: mega_f.F90
else
f90EXE_sources += $(ca_f90EXE_sources)
F90EXE_sources += $(ca_F90EXE_sources)
endif

mega_f.F90: $(ca_F90EXE_sources) $(ca_f90EXE_sources)
$(AMREX_HOME)/Tools/F_scripts/f90cat.py $^
f90EXE_sources += $(ca_f90EXE_sources)
F90EXE_sources += $(ca_F90EXE_sources)

INCLUDE_LOCATIONS += $(Blocs)
VPATH_LOCATIONS += $(Blocs)
Expand Down
3 changes: 0 additions & 3 deletions Exec/hydro_tests/rotating_torus/Prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ Castro::compute_moment_of_inertia()
// Get the Castro level
Castro& ca_lev = getLevel(lev);

// Update the local level we're on.
ca_set_amr_info(lev, -1, -1, -1.0, -1.0);

// Add up the moment of inertia on this level
int idir = -1; // So we do r**2, rather than any particular direction
moment += ca_lev.locSquaredSum("density", time, idir, local_flag);
Expand Down
21 changes: 21 additions & 0 deletions Exec/reacting_tests/nse_test/convergence_simplified_sdc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

# echo the commands
set -x

EXEC=./Castro2d.gnu.MPI.SMPLSDC.ex
RUNPARAMS="
castro.time_integration_method=3
"

mpiexec -n 8 ${EXEC} inputs.64 ${RUNPARAMS} >& /dev/null
mpiexec -n 8 ${EXEC} inputs.128 ${RUNPARAMS} >& /dev/null
mpiexec -n 8 ${EXEC} inputs.256 ${RUNPARAMS} >& /dev/null

RichardsonConvergenceTest2d.gnu.ex coarFile=nse_test_64_plt00080 mediFile=nse_test_128_plt00160 fineFile=nse_test_256_plt00320 >& nse_convergence_simple_sdc_lo.out

mpiexec -n 8 ${EXEC} inputs.512 ${RUNPARAMS} >& /dev/null

RichardsonConvergenceTest2d.gnu.ex coarFile=nse_test_128_plt00160 mediFile=nse_test_256_plt00320 fineFile=nse_test_512_plt00640 >& nse_convergence_simple_sdc_hi.out


4 changes: 4 additions & 0 deletions Exec/reacting_tests/nse_test/create_pretty_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ def read_convergence(file_lo, file_hi):
"rho_He4": r"$\rho X(\isotm{He}{4})$",
"rho_C12": r"$\rho X(\isotm{C}{12})$",
"rho_O16": r"$\rho X(\isotm{O}{16})$",
"rho_Cr48": r"$\rho X(\isotm{Cr}{48})$",
"rho_Fe52": r"$\rho X(\isotm{Fe}{52})$",
"rho_Fe54": r"$\rho X(\isotm{Fe}{54})$",
"rho_Ni56": r"$\rho X(\isotm{Ni}{56})$",
"rho_Fe56": r"$\rho X(\isotm{Fe}{56})$",
"rho_Ye": r"$\rho Y_e$",
"rho_abar": r"$\rho \bar{A}$",
Expand Down
6,426 changes: 0 additions & 6,426 deletions Exec/science/rotating_star/15m_500_sec.hse.6400

This file was deleted.

3 changes: 2 additions & 1 deletion Exec/science/rotating_star/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ USE_MPI = TRUE

USE_GRAV = TRUE
USE_REACT = TRUE
USE_NSE = TRUE

USE_CXX_MODEL_PARSER = TRUE

# This sets the EOS directory in $(MICROPHYSICS_HOME)/eos
EOS_DIR := helmholtz

# This sets the network directory in $(MICROPHYSICS_HOME)/networks
NETWORK_DIR := aprox21
NETWORK_DIR := aprox19

INTEGRATOR_DIR := VODE

Expand Down
4 changes: 2 additions & 2 deletions Exec/science/rotating_star/probin
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
&fortin

model_name = "15m_500_sec.hse.6400"
model_name = "15m_aprox19.6400"

/

Expand All @@ -19,7 +19,7 @@
max_tempgrad_lev = -1

dengrad = 1.e18
denerr = 0.5e9
denerr = 0.5e5

velgrad = 1.e18
velerr = 1.e18
Expand Down
8 changes: 0 additions & 8 deletions Exec/science/wdmerger/Prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ Castro::wd_update (Real time, Real dt)

for (int lev = 0; lev <= parent->finestLevel(); lev++) {

ca_set_amr_info(lev, -1, -1, -1.0, -1.0);

Castro& c_lev = getLevel(lev);

GeometryData geomdata = c_lev.geom.data();
Expand Down Expand Up @@ -276,8 +274,6 @@ Castro::wd_update (Real time, Real dt)

}

ca_set_amr_info(level, -1, -1, -1.0, -1.0);

// Compute effective radii of stars at various density cutoffs

bool local_flag = true;
Expand Down Expand Up @@ -421,8 +417,6 @@ void Castro::volInBoundary (Real time, Real& vol_P, Real& vol_S, Real rho_cutoff

for (int lev = 0; lev <= parent->finestLevel(); lev++) {

ca_set_amr_info(lev, -1, -1, -1.0, -1.0);

Castro& c_lev = getLevel(lev);

const auto dx = c_lev.geom.CellSizeArray();
Expand Down Expand Up @@ -502,8 +496,6 @@ void Castro::volInBoundary (Real time, Real& vol_P, Real& vol_S, Real rho_cutoff
if (!local)
amrex::ParallelDescriptor::ReduceRealSum({vol_P, vol_S});

ca_set_amr_info(level, -1, -1, -1.0, -1.0);

}


Expand Down
38 changes: 38 additions & 0 deletions Exec/science/wdmerger/inputs_2d
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ castro.dual_energy_eta1 = 1.0e-3
# Threshold for when to use (E - K) in updating internal energy
castro.dual_energy_eta2 = 1.0e-4

# Use Coulomb corrections in Helmholtz EOS
eos.use_eos_coulomb = 1

# Keep EOS inputs constant after EOS evaluation
eos.eos_input_is_constant = 1

############################################################################################
# Reactions/Network
############################################################################################
Expand All @@ -201,6 +207,38 @@ castro.react_rho_min = 1.0e6
# Maximum density for allowing nuclear burning
castro.react_rho_max = 1.0e12

# Smallest allowable mass fraction
network.small_x = 1.0e-12

# Burn at constant volume
integrator.do_constant_volume_burn = 1

# Evaluate the RHS during the burn
integrator.call_eos_in_rhs = 1

# Integration tolerances
integrator.rtol_spec = 1.0e-6
integrator.atol_spec = 1.0e-6

integrator.rtol_temp = 1.0e-6
integrator.atol_temp = 1.0e-6

integrator.rtol_enuc = 1.0e-6
integrator.atol_enuc = 1.0e-6

# Do not abort or retry on a failed burn (Castro will handle this)
integrator.abort_on_failure = 0
integrator.retry_burn = 0

# Renormalize abundances during the burn
integrator.renormalize_abundances = 1

# Maximum temperature allowed in the burn
integrator.MAX_TEMP = 1.0e10

# Use tabular rate evaluation when availble
network.use_tables = 1

############################################################################################
# Gravity
############################################################################################
Expand Down
38 changes: 38 additions & 0 deletions Exec/science/wdmerger/inputs_3d
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ castro.dual_energy_eta1 = 1.0e-3
# Threshold for when to use (E - K) in updating internal energy
castro.dual_energy_eta2 = 1.0e-4

# Use Coulomb corrections in Helmholtz EOS
eos.use_eos_coulomb = 1

# Keep EOS inputs constant after EOS evaluation
eos.eos_input_is_constant = 1

############################################################################################
# Reactions/Network
############################################################################################
Expand All @@ -204,6 +210,38 @@ castro.react_rho_min = 1.0e6
# Maximum density for allowing nuclear burning
castro.react_rho_max = 1.0e12

# Smallest allowable mass fraction
network.small_x = 1.0e-12

# Burn at constant volume
integrator.do_constant_volume_burn = 1

# Evaluate the RHS during the burn
integrator.call_eos_in_rhs = 1

# Integration tolerances
integrator.rtol_spec = 1.0e-6
integrator.atol_spec = 1.0e-6

integrator.rtol_temp = 1.0e-6
integrator.atol_temp = 1.0e-6

integrator.rtol_enuc = 1.0e-6
integrator.atol_enuc = 1.0e-6

# Do not abort or retry on a failed burn (Castro will handle this)
integrator.abort_on_failure = 0
integrator.retry_burn = 0

# Renormalize abundances during the burn
integrator.renormalize_abundances = 1

# Maximum temperature allowed in the burn
integrator.MAX_TEMP = 1.0e10

# Use tabular rate evaluation when availble
network.use_tables = 1

############################################################################################
# Gravity
############################################################################################
Expand Down
39 changes: 0 additions & 39 deletions Exec/science/wdmerger/probin
Original file line number Diff line number Diff line change
Expand Up @@ -94,43 +94,4 @@

&extern

! Note that some of the parameters in this
! namelist are specific to the default EOS,
! network, and/or integrator used in the
! makefile. If you try a different set of
! microphysics routines be sure to check that
! the parameters in here are consistent, as
! Fortran does not like seeing unknown variables
! in the namelist.

small_x = 1.d-12

use_eos_coulomb = T
eos_input_is_constant = T

do_constant_volume_burn = T
call_eos_in_rhs = T

rtol_spec = 1.d-6
atol_spec = 1.d-6

rtol_temp = 1.d-6
atol_temp = 1.d-6

rtol_enuc = 1.d-6
atol_enuc = 1.d-6

abort_on_failure = F
retry_burn = F

renormalize_abundances = T

MAX_TEMP = 1.d10

! Note that not every network has tabular
! rates enabled, so for some networks the
! following option will have no effect.

use_tables = T

/
8 changes: 0 additions & 8 deletions Exec/science/wdmerger/sum_integrated_quantities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@ Castro::sum_integrated_quantities ()
for (int lev = 0; lev <= finest_level; lev++)
{

// Update the local level we're on.

ca_set_amr_info(lev, -1, -1, -1.0, -1.0);

// Get the current level from Castro

Castro& ca_lev = getLevel(lev);
Expand Down Expand Up @@ -148,10 +144,6 @@ Castro::sum_integrated_quantities ()

}

// Return to the original level.

ca_set_amr_info(level, -1, -1, -1.0, -1.0);

// Do the reductions.

int nfoo_sum = 18;
Expand Down
6 changes: 6 additions & 0 deletions Exec/science/wdmerger/tests/tde/inputs.test
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ castro.small_temp = 1.e5
# Minimum allowable density (g / cm**3)
castro.small_dens = 1.e-5

# Use Coulomb corrections in Helmholtz EOS
eos.use_eos_coulomb = 1

# Keep EOS inputs constant after EOS evaluation
eos.eos_input_is_constant = 1

############################################################################################
# Gravity
############################################################################################
Expand Down
39 changes: 0 additions & 39 deletions Exec/science/wdmerger/tests/tde/probin
Original file line number Diff line number Diff line change
Expand Up @@ -42,43 +42,4 @@

&extern

! Note that some of the parameters in this
! namelist are specific to the default EOS,
! network, and/or integrator used in the
! makefile. If you try a different set of
! microphysics routines be sure to check that
! the parameters in here are consistent, as
! Fortran does not like seeing unknown variables
! in the namelist.

small_x = 1.d-12

use_eos_coulomb = T
eos_input_is_constant = T

do_constant_volume_burn = T
call_eos_in_rhs = T

rtol_spec = 1.d-6
atol_spec = 1.d-6

rtol_temp = 1.d-6
atol_temp = 1.d-6

rtol_enuc = 1.d-6
atol_enuc = 1.d-6

abort_on_failure = F
retry_burn = F

renormalize_abundances = T

MAX_TEMP = 1.d10

! Note that not every network has tabular
! rates enabled, so for some networks the
! following option will have no effect.

use_tables = T

/
Loading

0 comments on commit 5e0a1b9

Please sign in to comment.