Skip to content

Commit

Permalink
Merge branch 'main' of github.com:amrex-astro/MAESTROeX
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Jan 21, 2024
2 parents e71e491 + e45cc0d commit 4407450
Show file tree
Hide file tree
Showing 65 changed files with 288 additions and 2,184 deletions.
18 changes: 18 additions & 0 deletions .codespell-ignore-words
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
blocs
bloc
inout
pres
bion
tye
delt
thi
daa
numer
clen
coul
dum
crate
vie
fromm
nd
hsi
5 changes: 5 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[codespell]
skip = .git,*.ipynb,*.bib,*.ps,*~,periodic_table.list,track-enucdot-profile
ignore-words = .codespell-ignore-words


39 changes: 39 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: codespell

on:
push:
branches:
- development
- main
pull_request:
branches:
- development

jobs:
codespell:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Cache pip
uses: actions/cache@v3
with:
# this path is specific to Ubuntu
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: pip install codespell

- name: Run codespell
run: |
codespell
14 changes: 12 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# 23.08
# 24.01

* Fixed a race condition on GPUs (#402)

# 23.10

* a new option, `basestate_use_pres_model` was added (#398)
this allows us to use (rho, p) from the initial model instead of
(rho, T) to establish the thermodynamics.

# 23.09

* remove the SDC code paths. This is no longer supported by
Microphysics and is not being tested.
Expand All @@ -7,7 +17,7 @@

* the test_diffusion unit test was cleaned up and now gives the
expected convergence (#336, #381)

# 23.05

* MAESTROeX now monitors the burn_t success flag and aborts if there
Expand Down
4 changes: 2 additions & 2 deletions CITATION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MAESTROeX derives from MAESTRO. When citing the code, please cite the
two primary alrogithm papers below as well as any of the MAESTRO papers appropriate
to the discussion.
two primary algorithm papers below as well as any of the MAESTRO
papers appropriate to the discussion.

@ARTICLE{2019ApJ...887..212F,
author = {{Fan}, Duoming and {Nonaka}, Andrew and {Almgren}, Ann S. and
Expand Down
2 changes: 1 addition & 1 deletion Exec/science/README
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ flame/

sub_chandra/

Surpise! We're modelling convection. This time in 3D spherical
Surprise! We're modelling convection. This time in 3D spherical
in the helium shell on the surface of a sub-Chandrasekhar mass
carbon/oxygen white dwarf. Such systems can potentially yield
a variety of explosive outcomes. This setup is the basis for
Expand Down
2 changes: 1 addition & 1 deletion Exec/science/code_comp/MaestroBaseState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void Maestro::InitBaseState(BaseState<Real>& rho0, BaseState<Real>& rhoh0,

// do HSE using RK2

// out intergration starts at y - h
// out integration starts at y - h
Real h = r == 0 ? base_geom.dr(n) * 0.5 : base_geom.dr(n);

auto k = dUdy(y - h, U_old);
Expand Down
2 changes: 1 addition & 1 deletion Exec/science/flame/_parameters
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ smooth_len_frac real 0.025
XC12_ref_threshold real 1.d-3

# do the burning only once for each vertical coordinate
do_average_burn logical .false.
do_average_burn integer 0

# acceptable relative error for a cell compared to the average
# at that vertical coord if do_average_burn = T (should be smaller
Expand Down
16 changes: 8 additions & 8 deletions Exec/science/fully_convective_star/_parameters
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@namespace: problem

velpert_amplitude real 1.e5
velpert_radius real 2.e7
velpert_scale real 1.e7
velpert_steep real 1.e5
tag_density_1 real 1.0
tag_density_2 real 0.1
tag_density_3 real 0.05
use_analytic_heating logical .false.
velpert_amplitude real 1.e5
velpert_radius real 2.e7
velpert_scale real 1.e7
velpert_steep real 1.e5
tag_density_1 real 1.0
tag_density_2 real 0.1
tag_density_3 real 0.05
use_analytic_heating integer 0
2 changes: 1 addition & 1 deletion Exec/science/rotating_star/ModelParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void ModelParser::ReadFile(const std::string& model_file_name) {
varnames_stored[i] = maestro::trim(line.substr(ipos));
}

// alocate storage for the model data
// allocate storage for the model data
model_state.resize(npts_model);
for (auto i = 0; i < npts_model; ++i) {
model_state[i].resize(nvars_model);
Expand Down
20 changes: 10 additions & 10 deletions Exec/science/rotating_star/_parameters
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@namespace: problem

velpert_amplitude real 1.e5
velpert_radius real 2.e7
velpert_scale real 1.e7
velpert_steep real 1.e5
tag_density_1 real 5.e7
tag_density_2 real 1.e8
tag_density_3 real 1.e8
particle_temp_cutoff real 6.e8
particle_tpert_threshold real 2.e7
use_analytic_heating logical .false.
velpert_amplitude real 1.e5
velpert_radius real 2.e7
velpert_scale real 1.e7
velpert_steep real 1.e5
tag_density_1 real 5.e7
tag_density_2 real 1.e8
tag_density_3 real 1.e8
particle_temp_cutoff real 6.e8
particle_tpert_threshold real 2.e7
use_analytic_heating integer 0
2 changes: 1 addition & 1 deletion Exec/science/toy_convect/_parameters
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@namespace: problem

# Velocity field initialization
apply_vel_field logical .false.
apply_vel_field integer 0

# Initial velocity field vortex scale
velpert_scale real 1.0d2
Expand Down
2 changes: 1 addition & 1 deletion Exec/science/urca/analysis/fad_excess.f90
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ program fad_excess

plot_name(1) = "adiabatic excess"

! parse the arguements
! parse the arguments
narg = command_argument_count()

farg = 1
Expand Down
2 changes: 1 addition & 1 deletion Exec/science/urca/analysis/fconv_radial.f90
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ program fconv_radial
component_names(2) = "adiabatic gradient"
component_names(3) = "ledoux gradient"

! parse the arguements
! parse the arguments
narg = command_argument_count()

farg = 1
Expand Down
2 changes: 1 addition & 1 deletion Exec/science/urca/analysis/fneutrinos.f90
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ program fneutrinos
dx = plotfile_get_dx(pf, 1)

! get the index bounds for the finest level.
! Note, lo and hi are ZERO-based indicies
! Note, lo and hi are ZERO-based indices
flo = lwb(plotfile_get_pd_box(pf, pf%flevel))
fhi = upb(plotfile_get_pd_box(pf, pf%flevel))

Expand Down
2 changes: 1 addition & 1 deletion Exec/science/urca/analysis/probin.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
! This file is automatically generated by write_probin.py at
! compile-time.
!
! To add a runtime parameter, do so by editting the appropriate _parameters
! To add a runtime parameter, do so by editing the appropriate _parameters
! file.

! This module stores the runtime parameters. The probin_init() routine is
Expand Down
7 changes: 4 additions & 3 deletions Exec/science/urca/analysis/scripts/slice-convgrad
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env python
import argparse

import numpy as np
import yt
from yt import derived_field
import numpy as np
import argparse

parser = argparse.ArgumentParser()
parser.add_argument('infile', type=str, help='Name of input plotfile.')
Expand All @@ -15,7 +16,7 @@ parser.add_argument('-sign', '--sign', action='store_true', help='If supplied, p
parser.add_argument('-fmin', '--field_min', type=float, help='Minimum scale for colorbar.')
parser.add_argument('-fmax', '--field_max', type=float, help='Maximum scale for colorbar.')
parser.add_argument('-log', '--logscale', action='store_true', help='If supplied, use a log scale for the field.')
parser.add_argument('-symlog', '--symlog', action='store_true', help='If supplied, use symlog scaling, which is linear near zero, to accomodate positive and negative values.')
parser.add_argument('-symlog', '--symlog', action='store_true', help='If supplied, use symlog scaling, which is linear near zero, to accommodate positive and negative values.')
parser.add_argument('-linthresh', '--linthresh', type=float, help='Linear threshold for symlog scaling. (Default is 0.1)')
parser.add_argument('-dc', '--drawcells', action='store_true', help='If supplied, draw the cell edges.')
parser.add_argument('-dg', '--drawgrids', action='store_true', help='If supplied, draw the grids.')
Expand Down
7 changes: 4 additions & 3 deletions Exec/science/urca/analysis/scripts/slice-enucdot
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
#!/usr/bin/env python
import argparse

import numpy as np
import yt
from yt import derived_field
import numpy as np
import argparse

parser = argparse.ArgumentParser()
parser.add_argument('infile', type=str, help='Name of input plotfile.')
parser.add_argument('-w', '--width', type=float,
help='Width of slice (cm). Default is domain width.')
parser.add_argument('-axis', '--axis', type=str, default='x', help='Axis along which to slice. Should be "x", "y", or "z".')
parser.add_argument('-symlog', '--symlog', action='store_true', help='If supplied, use symlog scaling, which is linear near zero, to accomodate positive and negative values of Hnuc.')
parser.add_argument('-symlog', '--symlog', action='store_true', help='If supplied, use symlog scaling, which is linear near zero, to accommodate positive and negative values of Hnuc.')
parser.add_argument('-logmax', '--logmax', type=float,
help='Log of the +/- maximum Hnuc value.')
parser.add_argument('-rho', '--rhocontours', type=float, nargs='+', help='Draws contours for the densities provided (g/cm^3).')
Expand Down
9 changes: 5 additions & 4 deletions Exec/science/urca/analysis/scripts/slice-field
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ Use yt to slice a boxlib plotfile supplied through the domain center.
Donald E. Willcox
"""
import yt
from yt import derived_field
import numpy as np
import argparse

import numpy as np
import yt
from UrcaAnalysis.yt_extensions import UrcaShellFields
from yt import derived_field

parser = argparse.ArgumentParser()
parser.add_argument('infile', type=str, help='Name of input plotfile.')
Expand All @@ -19,7 +20,7 @@ parser.add_argument('-axis', '--axis', type=str, default='x',
parser.add_argument('-w', '--width', type=float,
help='Width of slice (cm). Default is domain width.')
parser.add_argument('-log', '--logscale', action='store_true', help='If supplied, use a log scale for the field.')
parser.add_argument('-symlog', '--symlog', type=float, help='If supplied, use symlog scaling, which is linear near zero, to accomodate positive and negative values of the field. Pass the value of the field at which to linearize the colorbar.')
parser.add_argument('-symlog', '--symlog', type=float, help='If supplied, use symlog scaling, which is linear near zero, to accommodate positive and negative values of the field. Pass the value of the field at which to linearize the colorbar.')
parser.add_argument('-rho', '--rhocontours', type=float, nargs='+', help='Draws contours for the densities provided (g/cm^3).')
parser.add_argument('-rhocolors', '--rhocolors', type=str, nargs='+', default='cyan', help='Color(s) of density contours.')
parser.add_argument('-ctr', '--center', type=float, nargs='+', help='Centers the plot on the coordinates provided (x, y, z).')
Expand Down
11 changes: 5 additions & 6 deletions Exec/science/urca/analysis/scripts/streamlines
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#!/usr/bin/env python
import yt
import numpy as np
import matplotlib.pylab as pl

from yt.visualization.api import Streamlines
from yt.units import cm
import numpy as np
import yt
from mpl_toolkits.mplot3d import Axes3D
from yt.units import cm
from yt.visualization.api import Streamlines

# Load the dataset
ds = yt.load('wd_512_rhoc4-5_plt64636')
Expand All @@ -24,7 +23,7 @@ pos = pos_dx
streamlines = Streamlines(ds, pos, ('boxlib', 'x_vel'), ('boxlib', 'y_vel'), ('boxlib', 'z_vel'), get_magnitude=True, volume=ds.all_data())
streamlines.integrate_through_volume()

# Create a 3D plot, trace the streamlines throught the 3D volume of the plot
# Create a 3D plot, trace the streamlines through the 3D volume of the plot
fig=pl.figure()
ax = Axes3D(fig)
for stream in streamlines.streamlines:
Expand Down
8 changes: 4 additions & 4 deletions Exec/science/xrb_layered/_parameters
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ xrb_pert_type integer 1
xrb_pert_height real -1.0d0

# Turn on (.true.) or off (.false.) sponging at the bottom of the domain.
xrb_use_bottom_sponge logical .false.
xrb_use_bottom_sponge integer 0

# minimum value to use for the sponge
sponge_min real 0.01d0
Expand All @@ -25,7 +25,7 @@ sponge_min real 0.01d0
diag_define_layer real 0.1

# Velocity field initialization
apply_vel_field logical .false.
apply_vel_field integer 0

# Initial velocity field vortex scale (2-d); thickness of velocity layer (3-d)
velpert_scale real 1.0d2
Expand All @@ -43,7 +43,7 @@ velpert_steep real 12.d0
num_vortices integer 1

# look at the deltap diagnostic
do_deltap_diag logical .false.
do_deltap_diag integer 0

# minimum value to use for species in tag_boxes
tag_minval real 1.0d-4
Expand All @@ -56,7 +56,7 @@ tag_maxval real 0.99d0
tag_xfac real 1.d-16

# density tagging
do_dens_tagging logical .false.
do_dens_tagging integer 0

lo_dens_tag real 5.4d5
hi_dens_tag real 1.75d6
Expand Down
8 changes: 4 additions & 4 deletions Exec/science/xrb_mixed/_parameters
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ xrb_pert_type integer 1
xrb_pert_height real -1.0d0

# Turn on (.true.) or off (.false.) sponging at the bottom of the domain.
xrb_use_bottom_sponge logical .false.
xrb_use_bottom_sponge integer 0

# minimum value to use for the sponge
sponge_min real 0.01d0
Expand All @@ -25,7 +25,7 @@ sponge_min real 0.01d0
diag_define_layer real 0.1

# Velocity field initialization
apply_vel_field logical .false.
apply_vel_field integer 0

# Initial velocity field vortex scale (2-d); thickness of velocity layer (3-d)
velpert_scale real 1.0d2
Expand All @@ -43,7 +43,7 @@ velpert_steep real 12.d0
num_vortices integer 1

# look at the deltap diagnostic
do_deltap_diag logical .false.
do_deltap_diag integer 0

# minimum value to use for species in tag_boxes
tag_minval real 1.0d-4
Expand All @@ -56,7 +56,7 @@ tag_maxval real 0.99d0
tag_xfac real 1.d-16

# density tagging
do_dens_tagging logical .false.
do_dens_tagging integer 0

lo_dens_tag real 5.4d5
hi_dens_tag real 1.75d6
Expand Down
2 changes: 1 addition & 1 deletion Exec/test_problems/double_bubble/MaestroInitData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using namespace amrex;
using namespace problem_rp;

// prototype for pertubation function to be called on the
// prototype for perturbation function to be called on the
// device (if USE_CUDA=TRUE)
AMREX_GPU_DEVICE
void Perturb(const Real p0, const Real* s0, Real* perturbations,
Expand Down
Loading

0 comments on commit 4407450

Please sign in to comment.