diff --git a/Docs/preprocess_files.py b/Docs/preprocess_files.py index 9467e9c946..d28b983fb2 100644 --- a/Docs/preprocess_files.py +++ b/Docs/preprocess_files.py @@ -1,5 +1,5 @@ """ -This script strips out preprocessor directives from C++ headers and Fortran files +This script strips out preprocessor directives from C++ headers and saves the results in source/preprocessed_files """ @@ -17,8 +17,7 @@ def strip_directives(filename, filepath, outpath): Read in file, remove all preprocessor directives and output. This is also going to switch square brackets initializing arrays to - parentheses and remove the new-line characters in these so sphinx - fortran is happy. + parentheses and remove the new-line characters """ with open(os.path.join(filepath, filename)) as infile: diff --git a/Docs/source/build_system.rst b/Docs/source/build_system.rst index ba27ac25b3..928f383871 100644 --- a/Docs/source/build_system.rst +++ b/Docs/source/build_system.rst @@ -42,17 +42,6 @@ Most of these are parameters from AMReX. ``HYPRE_DIR`` or ``HYPRE_OMP_DIR``. -Fortran Support -^^^^^^^^^^^^^^^ - -Radiation currently needs Fortran support. All of the other solvers -and problem set ups do not require Fortran. Fortran support in AMReX -is enabled / disabled via: - - * ``BL_NO_FORT``: if set to ``TRUE``, then no AMReX Fortran source will be built. - This cannot currently be used for the radiation solver. - - Parallelization and GPUs ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -273,15 +262,6 @@ This is the current build system process. * These headers are output into ``tmp_build_dir/castro_sources/``. -* (if Fortran support is enabled) The Fortran dependencies file is created - - * This creates the ``f90.depends`` file in the ``tmp_build_dir`` - - * The script ``amrex/Tools/F_scripts/dep.py`` is used - - * The hook for this is in ``amrex/Tools/GNUMake/Make.rules`` in the - ``$(depEXETempDir)/f90.depends`` target - * The C/C++ dependencies file is created * This creates the individual ``.d`` files in ``tmp_build_dir``, one for each source file diff --git a/Docs/source/faq.rst b/Docs/source/faq.rst index fb144d2a17..4e3d03daf3 100644 --- a/Docs/source/faq.rst +++ b/Docs/source/faq.rst @@ -54,12 +54,12 @@ Debugging I get more information?* The best thing to do is to recompile the code with ``TEST=TRUE`` - set in the ``GNUmakefile``. This will have AMReX catch the - signals raised in both C++ and Fortran functions. Behind the + set in the ``GNUmakefile``. This will have AMReX catch the + signals raised in C++ functions. Behind the scenes, this defines the ``AMREX_TESTING`` preprocessor flag, which will initialize memory allocated in fabs or multifabs to signaling NaNs (sNaN), and use the ``BLBackTrace::handler()`` - function to handle various signals raised in both C++ and Fortran + function to handle various signals raised in C++ functions. This is a Linux/UNIX capability. This gives us a chance to print out backtrace information. The signals include seg fault, floating point exceptions (NaNs, divided by zero and overflow), and diff --git a/Docs/source/rp_intro.rst b/Docs/source/rp_intro.rst index 59683e5853..09b4377d42 100644 --- a/Docs/source/rp_intro.rst +++ b/Docs/source/rp_intro.rst @@ -28,7 +28,7 @@ The Castro parameters that control the behavior of the code and physics modules are listed in ``_cpp_parameters`` and take the form of:: # comment describing the parameter - name type default need in Fortran? ifdef + name type default ifdef Here, @@ -45,13 +45,7 @@ Here, * `default` is the default value of the parameter. -The next columns are optional, but you need to fill in all of the -information up to and including any of the optional columns you need -(e.g., if you are going to provide "need in Fortran?" and "ifdef"). - - * `need in Fortran?` is ``y`` if the runtime parameter should be - made available in Fortran (through ``meth_params_module``). - Note: this option is deprecated. +The next column is optional: * `ifdef` provides the name of a preprocessor name that should wrap this parameter definition—it will only be compiled in if that diff --git a/Exec/Make.Castro b/Exec/Make.Castro index 79e747b5c8..3a8ffa20c8 100644 --- a/Exec/Make.Castro +++ b/Exec/Make.Castro @@ -35,13 +35,7 @@ EOS_HOME ?= $(MICROPHYSICS_HOME)/EOS NETWORK_HOME ?= $(MICROPHYSICS_HOME)/networks CONDUCTIVITY_HOME ?= $(MICROPHYSICS_HOME)/conductivity -# only radiation builds need Fortran -ifeq ($(USE_RAD), TRUE) - BL_NO_FORT := FALSE -else - BL_NO_FORT := TRUE -endif - +BL_NO_FORT := TRUE # AMReX is a git submodule of Castro. By default # we assume it is in the external/ directory. diff --git a/Exec/science/massive_star/problem_initialize_state_data.H b/Exec/science/massive_star/problem_initialize_state_data.H index 0333d7da82..68fd2acfd8 100644 --- a/Exec/science/massive_star/problem_initialize_state_data.H +++ b/Exec/science/massive_star/problem_initialize_state_data.H @@ -7,6 +7,7 @@ #ifdef NSE_TABLE #include #include +#include #endif AMREX_GPU_HOST_DEVICE AMREX_INLINE @@ -128,8 +129,33 @@ void problem_initialize_state_data (int i, int j, int k, } if (problem::interpolate_pres == 1) { - eos(eos_input_rp, eos_state); - state(i,j,k,UTEMP) = eos_state.T; + + // we need to get T from P, rho, but consistent with NSE (if + // we are in NSE) + if (nse_check) { + // this will also change the composition, since the new T + // alters the NSE + nse_T_abar_from_p(eos_state.rho, eos_state.p, eos_state.aux[AuxZero::iye], + eos_state.T, eos_state.aux[AuxZero::iabar]); + state(i,j,k,UTEMP) = eos_state.T; + state(i,j,k,UFX+AuxZero::iabar) = eos_state.aux[AuxZero::iabar]; + + // now call the EOS with the new T and abar to get e + eos(eos_input_rt, eos_state); + + // finally, get the updated B/A + nse_table_t nse_state; + nse_state.T = state(i,j,k,UTEMP); + nse_state.rho = state(i,j,k,URHO); + nse_state.Ye = state(i,j,k,UFX+AuxZero::iye); + nse_interp(nse_state); + + state(i,j,k,UFX+AuxZero::ibea) = nse_state.bea; + + } else { + eos(eos_input_rp, eos_state); + state(i,j,k,UTEMP) = eos_state.T; + } } else { eos(eos_input_rt, eos_state); }