From a81250320603a2c3d1af5a1256622d186360e508 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Thu, 27 Jan 2022 19:40:16 -0500 Subject: [PATCH] remove some remaining USE_FORT_MICROPHYSICS (#878) --- Make.Microphysics | 8 --- Make.Microphysics_extern | 5 -- constants/Make.package | 3 - constants/constants_cgs.f90 | 76 -------------------------- networks/Make.package | 10 +--- networks/general_null/Make.package | 19 +------ unit_test/burn_cell_sdc/GNUmakefile | 1 - unit_test/test_aprox_rates/GNUmakefile | 1 - unit_test/test_eos/GNUmakefile | 1 - unit_test/test_jac/GNUmakefile | 1 - unit_test/test_react/GNUmakefile | 1 - unit_test/test_screening/GNUmakefile | 2 - unit_test/test_sdc/GNUmakefile | 1 - 13 files changed, 3 insertions(+), 126 deletions(-) delete mode 100644 constants/constants_cgs.f90 diff --git a/Make.Microphysics b/Make.Microphysics index 9af6000230..e2b398f729 100644 --- a/Make.Microphysics +++ b/Make.Microphysics @@ -1,8 +1,6 @@ AMREX_HOME ?= /path/to/amrex MICROPHYSICS_HOME ?= /path/to/Castro -USE_FORT_MICROPHYSICS ?= FALSE - # default is not to compile with CUDA USE_CUDA ?= FALSE @@ -145,12 +143,6 @@ INCLUDE_LOCATIONS += $(MICROPHYSICS_AUTO_SOURCE_DIR) # runtime parameters #------------------------------------------------------------------------------ -# runtime parameter support for extern/ routines -ifeq ($(USE_FORT_MICROPHYSICS), TRUE) - F90EXE_sources += extern.F90 - FEXE_headers += extern_parameters_F.H -endif - CEXE_sources += extern_parameters.cpp CEXE_headers += extern_parameters.H diff --git a/Make.Microphysics_extern b/Make.Microphysics_extern index c55aeebdbc..b2869f6d14 100644 --- a/Make.Microphysics_extern +++ b/Make.Microphysics_extern @@ -1,11 +1,6 @@ # This is the main include makefile for applications that want to use Microphysics # You should set NETWORK_OUTPUT_PATH before including this file -USE_FORT_MICROPHYSICS ?= TRUE -ifeq ($(USE_FORT_MICROPHYSICS), TRUE) - DEFINES += -DMICROPHYSICS_FORT -endif - ifeq ($(USE_SIMPLIFIED_SDC), TRUE) DEFINES += -DSIMPLIFIED_SDC else ifeq ($(USE_TRUE_SDC), TRUE) diff --git a/constants/Make.package b/constants/Make.package index b4a6720916..6135f43bc4 100644 --- a/constants/Make.package +++ b/constants/Make.package @@ -1,4 +1 @@ -ifeq ($(USE_FORT_MICROPHYSICS), TRUE) - f90EXE_sources += constants_cgs.f90 -endif CEXE_headers += fundamental_constants.H diff --git a/constants/constants_cgs.f90 b/constants/constants_cgs.f90 deleted file mode 100644 index d4eac02a7e..0000000000 --- a/constants/constants_cgs.f90 +++ /dev/null @@ -1,76 +0,0 @@ -! Fundamental constants taken from NIST's 2010 CODATA recommended values - -module fundamental_constants_module - - use amrex_fort_module, only : rt => amrex_real - use amrex_constants_module, only: M_PI - - implicit none - - ! newton's gravitational constant - real(kind=rt), parameter :: Gconst = 6.67428e-8_rt ! cm^3/g/s^2 - ! new value; if uncommented initial models will need to be re-HSE'ed - ! real(kind=rt), parameter :: Gconst = 6.67384e-8_rt ! cm^3/g/s^2 - - ! boltzmann's constant - real(kind=rt), parameter :: k_B = 1.3806488e-16_rt ! erg/K - - ! planck's constant over 2pi - real(kind=rt), parameter :: hbar = 1.054571726e-27_rt ! erg s - - ! planck's constant - real(kind=rt), parameter :: hplanck = 6.62606957e-27_rt ! erg s - - ! avogradro's Number - real(kind=rt), parameter :: n_A = 6.02214129e23_rt ! mol^-1 - - ! convert eV to erg - real(kind=rt), parameter :: ev2erg = 1.602176487e-12_rt - - ! convert MeV to eV - real(kind=rt), parameter :: MeV2eV = 1.0e6_rt - - ! mass of proton - real(kind=rt), parameter :: m_p = 1.672621777e-24_rt ! g - - ! mass of neutron - real(kind=rt), parameter :: m_n = 1.674927351e-24_rt ! g - - ! mass of electron - real(kind=rt), parameter :: m_e = 9.10938291e-28_rt ! g - - ! speed of light in vacuum - real(kind=rt), parameter :: c_light = 2.99792458e10_rt ! cm/s - - ! electron charge - ! NIST: q_e = 1.602176565e-19 C - ! - ! C is the SI unit Coulomb; in cgs we have the definition: - ! 1 C = 0.1 * |c_light| * 1 statC - ! where statC is the cgs unit statCoulomb; 1 statC = 1 erg^1/2 cm^1/2 - ! and |c_light| is the speed of light in cgs (but without units) - real(kind=rt), parameter :: q_e = 4.80320451e-10_rt ! erg^1/2 cm^1/2 - - ! stefan-boltzmann constant - real(kind=rt), parameter :: sigma_SB = 5.670373e-5_rt ! erg/s/cm^2/K^4 - - ! radiation constant - real(kind=rt), parameter :: a_rad = 4.0_rt*sigma_SB/c_light - - ! Number of centimeters in a parsec and an AU. - ! Note that since the length of an AU is defined exactly - ! by IAU convention, the length of a parsec is also - ! defined exactly as (6.48e5 / pi) AU. - real(kind=rt), parameter :: AU = 1.49597871e13_rt ! cm - real(kind=rt), parameter :: parsec = 3.085677587679311e18_rt ! cm - - ! Hubble constant (in s^{-1}, converted from 100 (km/s)/Mpc by dividing by 3.08568025e19km/Mpc) - real(kind=rt), parameter :: Hubble_const = 32.407764868e-19_rt - - ! solar mass (from http://asa.usno.navy.mil/SecK/Constants.html) - real(kind=rt), parameter :: M_solar = 1.9884e33_rt - - ! solar radius - real(kind=rt), parameter :: R_solar = 6.957e10_rt - -end module fundamental_constants_module diff --git a/networks/Make.package b/networks/Make.package index d45d18a558..c47cbafae5 100644 --- a/networks/Make.package +++ b/networks/Make.package @@ -90,19 +90,11 @@ net_prop_debug: $(NETWORK_OUTPUT_PATH)/network_properties.H ifneq ($(NETWORK_DIR), general_null) $(NETWORK_OUTPUT_PATH)/network_properties.F90: $(NETWORK_OUTPUT_PATH)/network_properties.H - ifeq ($(USE_FORT_MICROPHYSICS), TRUE) - F90EXE_sources += network_properties.F90 - endif - - ifneq ($(USE_FORT_MICROPHYSICS), TRUE) - net_opts := --skip_fortran - endif - NAUX := $(shell PYTHONPATH=$(MICROPHYSICS_HOME)/networks/general_null $(MICROPHYSICS_HOME)/networks/get_naux.py --microphysics_path "$(MICROPHYSICS_HOME)" --defines "$(DEFINES)" --net "$(NETWORK_DIR)") DEFINES += "-DNAUX_NET=$(NAUX)" $(NETWORK_OUTPUT_PATH)/network_properties.H: - PYTHONPATH=$(MICROPHYSICS_HOME)/networks/general_null $(MICROPHYSICS_HOME)/networks/update_headers.py $(net_opts) \ + PYTHONPATH=$(MICROPHYSICS_HOME)/networks/general_null $(MICROPHYSICS_HOME)/networks/update_headers.py --skip_fortran \ --microphysics_path $(MICROPHYSICS_HOME) \ --net $(NETWORK_DIR) \ --odir $(NETWORK_OUTPUT_PATH) \ diff --git a/networks/general_null/Make.package b/networks/general_null/Make.package index ca40f25279..6c49ddf95b 100644 --- a/networks/general_null/Make.package +++ b/networks/general_null/Make.package @@ -1,10 +1,3 @@ -ifeq ($(USE_FORT_MICROPHYSICS), TRUE) - F90EXE_sources += actual_network.F90 - ifeq ($(USE_REACT),TRUE) - F90EXE_sources += actual_rhs.F90 - endif -endif - CEXE_headers += network_properties.H ifeq ($(USE_REACT),TRUE) @@ -21,23 +14,15 @@ endif $(NETWORK_OUTPUT_PATH)/actual_network.F90: $(NETWORK_OUTPUT_PATH)/network_properties.H -ifeq ($(USE_FORT_MICROPHYSICS), TRUE) - NETWORK_TEMPLATE := $(MICROPHYSICS_HOME)/networks/general_null/network.template - fort_opts := -t $(NETWORK_TEMPLATE) -o $(NETWORK_OUTPUT_PATH)/actual_network.F90 -else - NETWORK_TEMPLATE := - fort_opts := -endif - NAUX := $(shell $(MICROPHYSICS_HOME)/networks/general_null/get_naux.py --defines "$(DEFINES)" $(GENERAL_NET_INPUTS)) DEFINES += "-DNAUX_NET=$(NAUX)" -$(NETWORK_OUTPUT_PATH)/network_properties.H: $(GENERAL_NET_INPUTS) $(strip $(NETWORK_TEMPLATE)) +$(NETWORK_OUTPUT_PATH)/network_properties.H: $(GENERAL_NET_INPUTS) @echo " " @echo "---------------------------------------------------------------------------" @echo "WRITING network files:" @if [ ! -d $(NETWORK_OUTPUT_PATH) ]; then mkdir -p $(NETWORK_OUTPUT_PATH); fi - $(MICROPHYSICS_HOME)/networks/general_null/write_network.py $(fort_opts) \ + $(MICROPHYSICS_HOME)/networks/general_null/write_network.py \ -s $(GENERAL_NET_INPUTS) \ --other_properties $(MICROPHYSICS_HOME)/networks/general_null/NETWORK_PROPERTIES \ --header_template $(MICROPHYSICS_HOME)/networks/general_null/network_header.template \ diff --git a/unit_test/burn_cell_sdc/GNUmakefile b/unit_test/burn_cell_sdc/GNUmakefile index 96316b0d79..fd12cf45c8 100644 --- a/unit_test/burn_cell_sdc/GNUmakefile +++ b/unit_test/burn_cell_sdc/GNUmakefile @@ -19,7 +19,6 @@ USE_CXX_REACTIONS = TRUE USE_EXTRA_THERMO = TRUE -USE_FORT_MICROPHYSICS = FALSE BL_NO_FORT = TRUE USE_MICROPHYSICS_DEBUG = TRUE diff --git a/unit_test/test_aprox_rates/GNUmakefile b/unit_test/test_aprox_rates/GNUmakefile index 6fb67f8eea..d008bdc5cf 100644 --- a/unit_test/test_aprox_rates/GNUmakefile +++ b/unit_test/test_aprox_rates/GNUmakefile @@ -16,7 +16,6 @@ EBASE = main USE_EXTRA_THERMO = TRUE -USE_FORT_MICROPHYSICS = FALSE BL_NO_FORT=TRUE # define the location of the CASTRO top directory diff --git a/unit_test/test_eos/GNUmakefile b/unit_test/test_eos/GNUmakefile index 5e01049508..9211fa3204 100644 --- a/unit_test/test_eos/GNUmakefile +++ b/unit_test/test_eos/GNUmakefile @@ -16,7 +16,6 @@ EBASE = main USE_EXTRA_THERMO = TRUE -USE_FORT_MICROPHYSICS = FALSE BL_NO_FORT=TRUE # define the location of the CASTRO top directory diff --git a/unit_test/test_jac/GNUmakefile b/unit_test/test_jac/GNUmakefile index 307d0fa37b..d4d7380dbe 100644 --- a/unit_test/test_jac/GNUmakefile +++ b/unit_test/test_jac/GNUmakefile @@ -18,7 +18,6 @@ USE_EXTRA_THERMO = TRUE USE_CXX_REACTIONS = TRUE -USE_FORT_MICROPHYSICS = FALSE BL_NO_FORT=TRUE ifeq ($(USE_CXX_REACTIONS),TRUE) diff --git a/unit_test/test_react/GNUmakefile b/unit_test/test_react/GNUmakefile index 9026a54cc7..de4e6d506b 100644 --- a/unit_test/test_react/GNUmakefile +++ b/unit_test/test_react/GNUmakefile @@ -16,7 +16,6 @@ EBASE = main USE_CXX_REACTIONS = TRUE -USE_FORT_MICROPHYSICS = FALSE BL_NO_FORT=TRUE ifeq ($(USE_CXX_REACTIONS),TRUE) diff --git a/unit_test/test_screening/GNUmakefile b/unit_test/test_screening/GNUmakefile index 862eb4a70e..ee26b61b95 100644 --- a/unit_test/test_screening/GNUmakefile +++ b/unit_test/test_screening/GNUmakefile @@ -23,8 +23,6 @@ ifeq ($(USE_CXX_REACTIONS),TRUE) DEFINES += -DCXX_REACTIONS endif -USE_FORT_MICROPHYSICS = FALSE - # define the location of the CASTRO top directory MICROPHYSICS_HOME := ../.. diff --git a/unit_test/test_sdc/GNUmakefile b/unit_test/test_sdc/GNUmakefile index 2bb2b29a72..d15e11dee4 100644 --- a/unit_test/test_sdc/GNUmakefile +++ b/unit_test/test_sdc/GNUmakefile @@ -19,7 +19,6 @@ USE_CXX_REACTIONS = TRUE USE_EXTRA_THERMO = TRUE -USE_FORT_MICROPHYSICS = FALSE BL_NO_FORT = TRUE ifeq ($(USE_CXX_REACTIONS),TRUE)