Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Jun 1, 2020
2 parents 46365d9 + c6a9471 commit f5ae79e
Show file tree
Hide file tree
Showing 263 changed files with 15,461 additions and 3,491 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions .github/workflows/c-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: cpp-linter

on: [pull_request]
jobs:
cpp-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Get submodules
run: git submodule update --init

- name: Run cpp linter
uses: AMReX-Astro/cpp-linter-action@master
with:
build_path: 'Exec/science/flame_wave'
make_options: '-j 2 USE_OMP=FALSE USE_MPI=FALSE USE_CUDA=FALSE DEBUG=TRUE'
ignore_files: 'amrex|Microphysics'
header_filter: 'Castro'

- name: Archive clang tidy report
uses: actions/upload-artifact@v1
with:
name: clang-tidy-report
path: clang-tidy-report.txt

# - name: Archive clang format report
# uses: actions/upload-artifact@v1
# with:
# name: clang-format-report
# path: clang-format-report.txt

- name: Archive cppcheck report
uses: actions/upload-artifact@v1
with:
name: cppcheck-report
path: cppcheck-report.txt
61 changes: 61 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: github pages

on:
push:
branches:
- master
- development

jobs:
deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2

- name: Install pandoc and doxygen
run: |
sudo apt install pandoc doxygen
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'

- name: Upgrade pip
run: |
# install pip=>20.1 to use "pip cache dir"
python3 -m pip install --upgrade pip
- name: Get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: python3 -m pip install -r ./requirements.txt

- name: Build docs
if: ${{ endsWith(github.ref, 'master') }}
env:
GITHUB_BRANCH: 'master'
run: ./deploy_docs_action.sh

- name: Build docs
if: ${{ endsWith(github.ref, 'development') }}
env:
GITHUB_BRANCH: 'development'
run: ./deploy_docs_action.sh

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
keep_files: true
33 changes: 33 additions & 0 deletions .github/workflows/slack-notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
pull_request:
types: synchronize
name: Slack Notification
jobs:
slackNotification:
name: Slack Notification
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}

- name : GITHUB CONTEXT
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"

- name: Get commit message
run: |
MSG=$(git log --format=%B -n 1)
echo "::set-env name=COMMIT_MSG::$MSG"
- name: Slack Notification
uses: AMReX-Astro/slack-action@master
with:
slack_webhook: ${{ secrets.SLACK_WEBHOOK }}
slack_channel: castro
message: ${{ env.COMMIT_MSG }}
pr_link: ${{ github.event.pull_request.head.repo.html_url }}
author_avatar: ${{ github.event.pull_request.user.avatar_url }}
commit_sha: ${{ github.event.pull_request.head.sha }}
before_sha: ${{ github.event.before }}
25 changes: 0 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,6 @@ 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")
addons:
apt:
packages:
- g++
- gfortran
- libgmp-dev
- libmpfr-dev
- pandoc
- doxygen
install:
- pip install -r requirements.txt
before_script:
- export AMREX_HOME=~/amrex
script:
- ls -l
- pwd
- ./deploy_docs.sh

- name: "clang static analysis"
if: type = pull_request OR type = api OR type = cron
language: cpp
Expand Down
20 changes: 20 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# 20.06

* The parameter castro.density_reset_method has been removed. A density
reset now unconditionally sets the density to small_dens, the temperature
to small_temp, and zeros out the velocities. (#989)

* A constrained-transport corner transport upwind MHD solver has been
added. This can be used by compiling with USE_MPI = TRUE. Presently
it only works for a single level (no AMR). (#307)

* A burning timestep limiter dtnuc_T has been added which restricts the
burning from updating the temperature by more than the factor
dtnuc_T * T / dT/dt. (#972)

* The reaction weights metric implemented in version 20.05 (#863) has been
added to the simplified SDC reactions driver. (#930)

* When using the simplified SDC integration scheme, we now save new-time
Reactions_Type data to plotfiles. (#929)

# 20.05

* The parameter use_custom_knapsack_weights and its associated
Expand Down
3 changes: 3 additions & 0 deletions Docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ help:
clean:
rm -rf build doxy_files source/class source/file source/namespace source/preprocessed_files
rm -f source/classlist.rst source/filelist.rst source/namespacelist.rst
rm -f source/yt_example.rst
rm -rf source/preprocessed_files
rm -rf source/*_files.rst

Expand All @@ -28,6 +29,7 @@ ifneq ($(NO_DOXYGEN),TRUE)
breathe-apidoc --o source doxy_files/xml -g class,file
python3 make_api.py
endif
jupyter nbconvert --to rst source/yt_example.ipynb
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

# Catch-all target: route all unknown targets to Sphinx using the new
Expand All @@ -39,4 +41,5 @@ ifneq ($(NO_DOXYGEN),TRUE)
breathe-apidoc --o source doxy_files/xml -g class,file
endif
python3 make_api.py
jupyter nbconvert --to rst source/yt_example.ipynb
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
4 changes: 4 additions & 0 deletions Docs/source/FlowChart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,13 @@ of each step.

- Free any memory allocated for the level advance.


.. _sec:strangctu:

CTU w/ Strang-split Reactions Flowchart
---------------------------------------


This described the flow using the CTU + Strang-split reactions,
including gravity, rotation, and diffusion. This integration is
selected via ``castro.time_integration_method = 0``.
Expand Down
2 changes: 1 addition & 1 deletion Docs/source/Hydrodynamics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ several main data structures that hold the state.
are “gas” only and those with the “tot” subscript are “gas + radiation”.

.. _table:primlist:
.. table:: The integer variable keys for accessing the primitive state vector.
.. table:: Primitive State Vector Integer Keys

+-----------------------+------------------------+-----------------------+
| **variable** | **quantity** | **note** |
Expand Down
9 changes: 6 additions & 3 deletions Docs/source/Introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Introduction to Castro
**********************

Castro is a adaptive mesh, radiation hydrodynamics code that is
Castro is a adaptive mesh, radiation/MHD hydrodynamics code that is
designed to model astrophysical reacting flows on massively parallel
computers.

Expand All @@ -12,12 +12,15 @@ Castro's major capabilities:
hydrodynamics; 4th order hydro for uniform grids.
(see :ref:`ch:hydro`)

* generalized retry mechanism for recovering from physical
violations over a timestep (see :ref:`ch:retry`)
* 3-dimension constrained transport ideal MHD (single level only currently)
(see :ref:`ch:mhd`)

* multigroup flux-limited diffusion radiation hydrodynamics
(see :ref:`ch:radiation`)

* generalized retry mechanism for recovering from physical
violations over a timestep (see :ref:`ch:retry`)

* adaptive mesh refinement with subcycling; jumps of 2x and 4x
between levels (see :ref:`ch:amr`)

Expand Down
10 changes: 9 additions & 1 deletion Docs/source/Preface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,17 @@ Improvements to the gravity solver and rotation were described in:
* *Double White Dwarf Mergers on Adaptive Meshes I. Methodology and
Code
Verification*, M. P. Katz, M. Zingale, A. C. Calder, F. D. Swesty,
A. S. Almgren, W. Zhang 2016, ApJ, 819, 94.
A. S. Almgren, & W. Zhang, 2016, ApJ, 819, 94.
http://dx.doi.org/10.3847/0004-637X/819/2/94

The 4th order reactive hydrodynamics spectral deferred corrections solver
was described in:

* *Improved Coupling of Hydrodynamics and Nuclear Reactions via Spectral Deferred Corrections*
M. Zingale, M. P. Katz, J. B. Bell, M. L. Minion, A. J. Nonaka, & W. Zhang,
2019, ApJ, 886, 105.
https://ui.adsabs.harvard.edu/link_gateway/2019ApJ...886..105Z/doi:10.3847/1538-4357/ab4e1d

The development of AMReX library is led by the
Center for Computational Sciences and Engineering / Lawrence Berkeley
National Laboratory. Castro development is done collaboratively,
Expand Down
4 changes: 4 additions & 0 deletions Docs/source/_static/theme_overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ code.docutils.literal.notranslate {
font-size: 95%;
}

div#example-notebook div.highlight-default div.highlight {
background-color: inherit;
}

/* override table width restrictions */
@media screen and (min-width: 767px) {

Expand Down
8 changes: 5 additions & 3 deletions Docs/source/build_system.rst
Original file line number Diff line number Diff line change
Expand Up @@ -223,16 +223,18 @@ This is the current build system process.

* ``set_variables.py`` is called

.. index:: set_variables.py, _variables, state_indices.F90, state_indices.H
.. index:: set_variables.py, _variables, state_indices_nd.F90, state_indices.H

* This processes the Castro ``_variables`` file and writes
``state_indices.F90`` and ``state_indices.H`` into the
``state_indices_nd.F90`` and ``state_indices.H`` into the
``tmp_build_dir/castro_sources/`` directory.

These are used to define the size of the various state arrays and
the integer keys to index each state variable.

* The hook for this is in ``Make.Castro`` in the build rule for ``state_indices.F90``
* The hook for this is in ``Make.auto_source`` in the build rule for ``state_indices_nd.F90``

* You can test this portion of the build system by doing ``make test_variables``

* (for ``general_null networks``), ``actual_network.F90`` is created

Expand Down
5 changes: 3 additions & 2 deletions Docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def get_version():
'sphinx.ext.autosummary',
'numpydoc',
'sphinx.ext.githubpages',
'breathe']
'breathe',
'IPython.sphinxext.ipython_console_highlighting']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down Expand Up @@ -99,7 +100,7 @@ def get_version():
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = []
exclude_patterns = ['**.ipynb_checkpoints']

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
Expand Down
36 changes: 31 additions & 5 deletions Docs/source/creating_a_problem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,13 @@ Here, we compute the coordinates of the zone center, ``x``, ``y``, and ``z``
from the zone indices, ``i``, ``j``, and ``k``.


.. _create:bcs:

Boundary conditions
-------------------

.. index:: boundary conditions

Standard boundary conditions, including outflow (zero-gradient), periodic,
and symmetry (reflect) are handled by AMReX directly. Castro has a special
hydrostatic boundary condition that can be used for the lower boundary. It
Expand All @@ -189,13 +192,36 @@ hydrostatic boundary condition here, we set::
castro.hse_interp_temp = 1
castro.hse_reflect_vels = 1

The first parameter tells Castro to use the HSE boundary condition. The next two
control how the temperature and velocity are treated.

A different special boundary condition, ``"interp"`` is available at
The first parameter tells Castro to use the HSE boundary condition.
In filling the ghost cells, hydrostatic equilibrum will be integrated
from the last interior zone into the boundary. We need one more
equation for this integration, so we either interpolate the density or
temperature into the ghost cells, depending on the value of
``castro.hse_interp_temp``. Finally, ``castro.hse_reflect_vels``
determines how we treat the velocity. The default is to give is a
zero gradient, but in tests we've found that reflecting the velocity
while integrating the HSE profile can be better. For modeling a
plane-parallel hydrostatic atmosphere, using the hydrostatic boundary
conditions instead of a simple symmetry boundary is essential when
using the standard CTU PPM solver.

A different special boundary condition, based on outflow, is available at
the upper boundary. This works together with the ``model_parser``
module to fill the ghost cells at the upper boundary with the initial
model data.
model data. You set this as::

castro.hi_bc = 2 2

castro.fill_ambient_bc = 1
castro.ambient_fill_dir = 1
castro.ambient_outflow_vel = 1

where ``ambient_fill_dir`` is the 0-based direction to fill using an
ambient state defined by the problem setup. In this example, we will
override the outflow (2) boundary condition in the y-direction. That
problem setup needs to fill the ``ambient_state(:)`` array defined in
``ambient_module``. An example of using this boundary is in the
``flame_wave`` problem.

The implementations of these boundary conditions is found in
``Castro/Source/problems/bc_ext_fill_nd.F90``.
Expand Down
Loading

0 comments on commit f5ae79e

Please sign in to comment.