Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Apr 1, 2020
2 parents 5a142ef + 342de10 commit a48e25a
Show file tree
Hide file tree
Showing 190 changed files with 9,505 additions and 12,202 deletions.
23 changes: 12 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ AMReX_buildInfo.cpp

# These files are created at build time
Exec/**/extern.F90
Exec/**/extern_parameters.*
Exec/**/prob_params_auto.F90
Exec/**/actual_network.F90
Exec/**/helm_table.dat
Expand All @@ -57,14 +58,14 @@ Exec/**/set_godunov.H

Backtrace.*

sphinx_docs/build
sphinx_docs/doxy_files
sphinx_docs/class
sphinx_docs/classlist.rst
sphinx_docs/source/file/
sphinx_docs/source/filelist.rst
sphinx_docs/source/namespace/
sphinx_docs/source/namespacelist.rst
sphinx_docs/source/runtime_parameters.rst
sphinx_docs/source/*_files.rst
sphinx_docs/source/preprocessed_files
Docs/build
Docs/doxy_files
Docs/class
Docs/classlist.rst
Docs/source/file/
Docs/source/filelist.rst
Docs/source/namespace/
Docs/source/namespacelist.rst
Docs/source/runtime_parameters.rst
Docs/source/*_files.rst
Docs/source/preprocessed_files
16 changes: 1 addition & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ dist: bionic
matrix:
include:
- name: "deploy docs"
if: branch = development OR branch = master
language: python
python:
- "3.7-dev"
before_install:
- export PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g")
# - pwd
# - cd ~/; git clone https://github.com/amrex-codes/amrex
# - cd ~/; git clone https://github.com/amrex-codes/regression_testing
addons:
apt:
packages:
Expand All @@ -27,15 +25,7 @@ matrix:
script:
- ls -l
- pwd
# after_success:
- ./deploy_docs.sh
# deploy:
# provider: pages
# skip-cleanup: true
# github-token: $GITHUB_TOKEN
# keep-history: true
# on:
# branch: master

- name: "clang static analysis"
if: type = pull_request OR type = api OR type = cron
Expand All @@ -45,12 +35,8 @@ matrix:
before_install:
- cd ~/; git clone https://github.com/amrex-codes/amrex
- cd ~/amrex; git checkout development
# - find . -type f -regex ".*\(\.f90\|\.F90\|\.cpp\|\.H\)" -exec bash -c 'echo "#endif" >> "{}"' \;
# - find . -type f -regex ".*\(\.f90\|\.F90\|\.cpp\|\.H\)" -exec bash -c 'sed -i "1s/^/#ifndef __clang_analyzer__\n/" {}' \;
- cd ~/; git clone https://github.com/starkiller-astro/Microphysics.git
- cd ~/Microphysics; git checkout development
# - find . -type f -regex ".*\(\.f90\|\.F90\|\.cpp\|\.H\)" -exec bash -c 'echo "#endif" >> "{}"' \;
# - find . -type f -regex ".*\(\.f90\|\.F90\|\.cpp\|\.H\)" -exec bash -c 'sed -i "1s/^/#ifndef __clang_analyzer__\n/" {}' \;
- cd $TRAVIS_BUILD_DIR
addons:
apt:
Expand Down
23 changes: 23 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
# 20.04

* The parameter castro.allow_small_energy has been removed. The
code behavior is now similar to what it would have been with
allow_small_energy == 0 (the internal energy can never be
smaller than that allowed by small_temp). (#817)

* All boundary fill interfaces other than hypfill and denfill have
been removed. So, we no longer support overriding the boundary
conditions for data other than State_Type. Radiation still has
its own set of custom boundary conditions that can be accessed
through the inputs file, as described in the docs. (#815)

* The conversion of the CTU hydrodynamics code to C++ continues.
The Riemann solvers were converted to C++ (#801) and the
hybrid momentum routines (#805), the PLM reconstruction (#814),
the conversion of primitive to conserved variables (#804)

* We've changed how the backup for retries is done. Presently if
use_retry is enabled we make a pre-emptive copy of the StateData
right at the beginning of the timestep. Now we only backup when
we detect that a retry is needed (#812)

# 20.03

* We now depend on the fundamental constants from Microphysics
Expand Down
4 changes: 1 addition & 3 deletions Docs/add_doxy_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,4 @@ def process_fortran_file(filename):
if filename[-2:] == ".H":
process_header_file(filename)
elif filename[-4:] == ".cpp":
process_cpp_file(filename)
elif filename[-4:].lower() == ".f90":
process_fortran_file(filename)
process_cpp_file(filename)
13 changes: 0 additions & 13 deletions Docs/make_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,19 +163,6 @@ def fortran_apidoc(filename, filepath):

subdir_output_data += """file/{}
""".format(rst_name)
elif f[-4:] == ".F90" or f[-4:] == ".f90":

# NOTE: I've had to declare some exceptions here as
# for some reason sphinx does not like these files
if subdir == 'problems' and (f[-6:-4] == '1d' or f[-6:-4] == '2d' or f[-6:-4] == '3d'):
continue

if f not in ['HABEC_1D.F90', 'HABEC_2D.F90', 'HABEC_3D.F90', 'RAD_1D.F90', 'RAD_2D.F90', 'RAD_3D.F90']:

fortran_apidoc(f, os.path.join(rootdir, subdir))

subdir_output_data += """file/{}
""".format(f[:-4] + "_f")

subdir_file.write(subdir_output_data)

Expand Down
15 changes: 1 addition & 14 deletions Docs/preprocess_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,6 @@ def remove_device_routines(filename, filepath):

if __name__ == "__main__":

excl_files = ['HABEC_1D.F90', 'HABEC_2D.F90', 'HABEC_3D.F90', 'RAD_1D.F90', 'RAD_2D.F90', 'RAD_3D.F90', 'bc_fill_3d.F90',
'problem_tagging_3d.f90',
'bc_ext_fill_3d.F90',
'Prob_1d.f90',
'Prob_3d.f90',
'bc_ext_fill_1d.F90',
'bc_fill_1d.F90',
'bc_ext_fill_2d.F90',
'problem_tagging_1d.f90',
'bc_fill_2d.F90',
'Prob_2d.f90',
'problem_tagging_2d.f90']

# make the output directory if it does not exist
if not os.path.exists(outdir):
os.makedirs(outdir)
Expand All @@ -129,7 +116,7 @@ def remove_device_routines(filename, filepath):
# loop over files in subdirectories and run strip_directives on all
# C++ header files and Fortran files
for f in sorted(os.listdir(os.path.join(rootdir, subdir))):
if ((f[-2:] == ".H" and f[-4:] != "_F.H") or f[-4:] == ".F90" or f[-4:] == ".f90") and f not in excl_files:
if (f[-2:] == ".H" and f[-4:] != "_F.H"):
strip_directives(f, os.path.join(rootdir, subdir), outdir)
delete_lines(f, outdir)
remove_device_routines(f, outdir)
15 changes: 2 additions & 13 deletions Docs/source/Hydrodynamics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -640,14 +640,8 @@ We compute the primtive variables from the conserved variables.

- :math:`p,T`: use the EOS.

First, if castro.allow_negative_energy is 0 (it defaults to
1) and :math:`e < 0`, we do the following:

#. Use the EOS to set :math:`e = e(\rho,T_{\rm small},X_k)`.

#. If :math:`e < 0`, abort the program with an error message.

Now, use the EOS to compute :math:`p,T = p,T(\rho,e,X_k)`.
First, we use the EOS to ensure :math:`e` is no smaller than :math:`e(\rho,T_{\rm small},X_k)`.
Then we use the EOS to compute :math:`p,T = p,T(\rho,e,X_k)`.

We also compute the flattening coefficient, :math:`\chi\in[0,1]`, used in
the edge state prediction to further limit slopes near strong shocks.
Expand Down Expand Up @@ -1151,11 +1145,6 @@ Density Resets

Need to document density_reset_method

Energy
------

Need to document allow_negative_energy and allow_small_energy

.. _app:hydro:flux_limiting:

Flux Limiting
Expand Down
16 changes: 16 additions & 0 deletions Docs/source/_static/theme_overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,19 @@ code.docutils.literal.notranslate {
}
}

.wy-side-nav-search>div.branch{
font-weight:normal;
color:rgba(255,255,255,0.3);
font-size:100%;
display:inline-block;
padding:4px 6px;
margin-top:.8em;
margin-bottom:.5em;
}

.wy-side-nav-search>div.branch>a{
/* margin-top:-.4045em;
margin-bottom:.809em; */
color:#fcfcfc;
font-weight:bold;
}
11 changes: 11 additions & 0 deletions Docs/source/_templates/dev_layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% extends "!layout.html" %}
{% block footer %} {{ super() }}
{% endblock %}


{% block sidebartitle %}
{{ super() }}
<div class="branch">
Branch: <a href="{{ pathto('../', 1) }}{{ pagename }}{{file_suffix}}">master</a> | <a href="{{ pathto('', 1) }}{{ pagename }}{{file_suffix}}">development</a>
</div>
{% endblock %}
11 changes: 11 additions & 0 deletions Docs/source/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% extends "!layout.html" %}
{% block footer %} {{ super() }}
{% endblock %}


{% block sidebartitle %}
{{ super() }}
<div class="branch">
Branch: <a href="{{ pathto('', 1) }}{{ pagename }}{{file_suffix}}">master</a> | <a href="{{ pathto('', 1) }}dev/{{ pagename }}{{file_suffix}}">development</a>
</div>
{% endblock %}
14 changes: 3 additions & 11 deletions Docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ def get_version():
'sphinx.ext.autosummary',
'numpydoc',
'sphinx.ext.githubpages',
'breathe',
'sphinxfortran.fortran_domain',
'sphinxfortran.fortran_autodoc']
'breathe']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand All @@ -77,7 +75,7 @@ def get_version():

# General information about the project.
project = 'Castro'
copyright = '2018, Castro development tem'
copyright = '2018-2020, Castro development tem'
author = 'Castro development team'

html_logo = "castro_logo_hot_200.png"
Expand Down Expand Up @@ -234,10 +232,4 @@ def get_version():

breathe_doxygen_config_options = {'EXTRACT_ALL': 'YES',
'SHOW_USED_FILES': 'YES', 'RECURSIVE': 'YES'
}

# -- Options for sphinx-fortran -----------------------------------------

fortran_src = [os.path.abspath('preprocessed_files')]

fortran_ext = ['f90', 'F90']
}
13 changes: 13 additions & 0 deletions Docs/source/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,16 @@ accompanied by a Castro change, it is best practice to ensure that
the PRs in both Microphysics and Castro have been approved, then
merge the Microphysics PR, then add the update to the Microphysics
submodule to the Castro PR, then merge. A similar process applies for AMReX.


Continuous Integration
======================

We use Travis CI to run integration tests on the code and to build and deploy the documentation. The current status of these tests on the development branch can be found here:

.. image:: https://travis-ci.com/AMReX-Astro/Castro.svg?branch=development
:target: https://travis-ci.com/AMReX-Astro/Castro

Currently, travis runs the `clang static analyzer <https://clang-analyzer.llvm.org/>`_, which finds potential bugs in the code. It also runs a script to convert any tabs in the code into spaces. Both of these are run on pull requests to the Castro GitHub repo, and are run weekly on the development branch.

The travis build settings can be found in the ``.travis.yml`` file.
29 changes: 2 additions & 27 deletions Docs/source/radiation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -366,40 +366,15 @@ See Krumholz et al. 2007 for some discussion on this.
Boundary Conditions
-------------------

Castro needs to know about the boundary conditions for both
the hydrodynamics and radiation portions of the evolution.

Hydrodynamics Evolution
~~~~~~~~~~~~~~~~~~~~~~~

For the hydrodynamics portion of the solve, the boundary conditions
for the normal hydrodynamic state values will be set by the problem’s
hypfill routine (which typically just calls filcc to handle
the usual hydrodynamics boundary types: outflow, symmetry, etc.).

A corresponding radfill routine needs to be written to fill the
ghost cells for the radiation energy density during the hydrodynamics
evolution. Again, this usually will just default to calling
filcc.

Note: if any of the hydrodynamic boundary conditions types are set
to Inflow, then you will need to ensure that the radfill
routine explicitly handles the boundary condition implementation
for the radiation energy density in that case—the filcc
routine will not do a hydrodynamic Inflow boundary.

Radiation Evolution
~~~~~~~~~~~~~~~~~~~

The following parameters are for radiation boundary in the diffusion
The following parameters are for the radiation boundary in the diffusion
equation. They do not affect hydrodynamic boundaries.

- radiation.lo_bc

This sets the action to take at the lower edge of the domain in
each coordinate direction. Possible values are:

- 101 *Dirchlet*:
- 101 *Dirichlet*:

Specify the radiation energy density on the boundary.
For gray radiation, this could be :math:`E_r = a T^4`.
Expand Down
8 changes: 8 additions & 0 deletions Exec/Make.Castro
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ BLAS_LIBRARY ?= -lopenblas

TOP := $(CASTRO_HOME)

# Allow a problem setup to define a root location.
# Otherwise, assume we're building in the current directory.

PROBLEM_DIR ?= ./

# Microphysics is a git submodule of Castro. By default
# we assume it is in the external/ directory.
# The user may override this with their own installation
Expand Down Expand Up @@ -132,6 +137,7 @@ endif

USE_MLMG = FALSE


#------------------------------------------------------------------------------
# Castro directories
#------------------------------------------------------------------------------
Expand Down Expand Up @@ -292,6 +298,8 @@ Bpack += $(foreach dir, $(Pdirs), $(AMREX_HOME)/Src/$(dir)/Make.package)
# directory
NETWORK_OUTPUT_PATH = $(CASTRO_AUTO_SOURCE_DIR)

USE_CXX_EOS := TRUE

include $(MICROPHYSICS_HOME)/Make.Microphysics_extern

Bpack += $(foreach dir, $(EXTERN_CORE), $(dir)/Make.package)
Expand Down
2 changes: 1 addition & 1 deletion Exec/Make.auto_source
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ifeq ($(USE_PROB_PARAMS), TRUE)
endif

PROB_PARAMS_TEMPLATE := $(TOP)/Util/scripts/prob_params.template
PROB_PARAMETERS := ./_prob_params
PROB_PARAMETERS := $(PROBLEM_DIR)/_prob_params

$(CASTRO_AUTO_SOURCE_DIR)/prob_params_auto.F90: $(PROB_PARAMETERS) $(PROB_PARAMS_TEMPLATE)
@if [ ! -d $(CASTRO_AUTO_SOURCE_DIR) ]; then mkdir -p $(CASTRO_AUTO_SOURCE_DIR); fi
Expand Down
Loading

0 comments on commit a48e25a

Please sign in to comment.