Skip to content

Commit

Permalink
CI: Add codespell (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang authored Jul 9, 2024
1 parent 1389fb1 commit 0f7b816
Show file tree
Hide file tree
Showing 41 changed files with 123 additions and 94 deletions.
7 changes: 7 additions & 0 deletions .codespell-ignore-words
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Blocs
checkin
inout
Lond
pres
ptd
recuse
3 changes: 3 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
skip = .git,*.ipynb,*.nb,*.bib,*.ps,*.patch,*~,CHANGES,*/tmp_build_dir,Cell_D_*
ignore-words = .codespell-ignore-words
23 changes: 23 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: codespell

on: [push, pull_request]

concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-codespell
cancel-in-progress: true

jobs:
codespell:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install codespell
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends python3-pip
pip3 install --user codespell
- name: Run codespell
run: codespell
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
identity and expression, level of experience, education, socioeconomic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

Expand Down
8 changes: 4 additions & 4 deletions Docs/sphinx_documentation/source/AlgorithmOptions.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

.. _Chap:AlgorithmOptions:

Algortihm Options
Algorithm Options
=================

.. _sec:conserv:

Conservative vs. Non-conservative
---------------------------------

The following must be preceeded by "ns."
The following must be preceded by "ns."

+-------------------------+------------------------------------------------------------------------------+-------------+--------------+
| | Description | Type | Default |
Expand Down Expand Up @@ -37,7 +37,7 @@ IAMR has the option to use a Method of Lines (MOL) or Godunov scheme to compute


For problems without embedded boundaries, there are additional options when using the Godunov method. The following must
be preceeded by "godunov."
be preceded by "godunov."

+-------------------------+-------------------------------------------------------------------------+-------------+--------------+
| | Description | Type | Default |
Expand All @@ -51,7 +51,7 @@ be preceeded by "godunov."
Diffusion
---------

The following must be preceeded by "ns."
The following must be preceded by "ns."

+-------------------------+-----------------------------------------------------------------------+-------------+--------------+
| | Description | Type | Default |
Expand Down
4 changes: 2 additions & 2 deletions Docs/sphinx_documentation/source/Contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ Now you are free to play with your fork (for additional information, you can vis
Making code changes
^^^^^^^^^^^^^^^^^^^^^^^^^^

We do `not` reccomend making any changes within the ``development`` branch. Doing so
We do `not` recommend making any changes within the ``development`` branch. Doing so
will make your local ``development`` branch diverge from the matching branch in the
main IAMR repository.
Instead, we reccomend creating a new branch based on the ``development`` branch.
Instead, we recommend creating a new branch based on the ``development`` branch.
To proceed, make sure you are on the ``development`` branch within the IAMR directory.
Then create branch ``<branch_name>`` (the branch name should reflect the piece
of code you want to add, like ``high_order_interpolation``) with
Expand Down
2 changes: 1 addition & 1 deletion Docs/sphinx_documentation/source/Debugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Diffusion and viscosity can be turned off by setting ``ns.vel_visc_coef = 0`` an
``ns.scal_diff_coefs = 0``.

Sometimes, restarting from a checkpoint file can reduce the amount of time spent waiting for
the code to fail durning the debugging process.
the code to fail during the debugging process.

If the problem only happens with multilevel runs, ``amr.subcycling_mode = None`` will turn
time subcycling off and advance the whole system at the same dt.
Expand Down
2 changes: 1 addition & 1 deletion Docs/sphinx_documentation/source/Getting_Started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ If you would like to display the data in another format, please let us know
and we will point you to whatever we have that can help.

Here we provide instructions on downloading
and using Amrvis. For more infomation on visualization, including using other software
and using Amrvis. For more information on visualization, including using other software
for visualization, please see the :ref:`Visualization` Section.


Expand Down
8 changes: 4 additions & 4 deletions Docs/sphinx_documentation/source/ProblemSetup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Problem Setup

To setup a new problem you must specify:

#. intial conditions
#. initial conditions

#. resolution

Expand Down Expand Up @@ -237,7 +237,7 @@ As an example,
xlo.tracer = 0.
xlo.temp = 1.

sets the boundary condtion type at the low x face to be an inflow with
sets the boundary condition type at the low x face to be an inflow with
xlo.type = “mass_inflow”.
Then xlo.velocity = 1. 0. 0. sets the inflow velocity,
xlo.density = 1. sets the inflow density,
Expand All @@ -263,7 +263,7 @@ zhi.velocity = 1. 0. 0. sets the wall at the high z face to be moving in the
x-direction.
Note that IAMR allows walls to move tangentially, but not in the normal direction.

Users can create more complex Dirichlet boundary condtions by writing
Users can create more complex Dirichlet boundary conditions by writing
their own fill function in ``NS_bcfill.H``, then using that function to create
an ``amrex::StateDescriptor::BndryFunc`` object and specifying which variables
will use it in ``NS_setup.cpp``. More information on boundary conditions is in
Expand All @@ -274,7 +274,7 @@ Tagging criteria for creating AMR Levels

If ``amr.max_level`` is greater than zero, then user specified tagging criteria are
used to define regions for higher levels of refinement.
For infomation on tagging see :ref:`sec:tagging`
For information on tagging see :ref:`sec:tagging`


.. _sec:EB-basics:
Expand Down
9 changes: 4 additions & 5 deletions Docs/sphinx_documentation/source/RunningProblems.rst
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ The following inputs must be preceded by "amr." and control checkpoint/restart.
| check_per | Frequency of checkpoint output by (approximate) simulation time; | Real | -1.0 |
| | if -1 then no checkpoints will be written. (See note below) | | |
+-------------------------+-----------------------------------------------------------------------+-------------+-----------+
| checkpoint_files_output | Should we write checkpoint files? (Takes precident over check_int | Int | 1 |
| checkpoint_files_output | Should we write checkpoint files? (Takes precedent over check_int | Int | 1 |
| | and check_per) | | |
+-------------------------+-----------------------------------------------------------------------+-------------+-----------+
| check_file | Prefix to use for checkpoint output | String | chk |
Expand Down Expand Up @@ -279,7 +279,7 @@ This file has the same format as the ASCII input file:
Log Files
~~~~~~~~~~~~~~~~

The following inputs must be preceeded by "amr."
The following inputs must be preceded by "amr."

+-------------------------+-----------------------------------------------------------------------+-------------+-----------+
| | Description | Type | Default |
Expand Down Expand Up @@ -565,7 +565,7 @@ Initializing the Calculation

These options determine how we initialize the data for the calculation. The data initialization process
ensures that the initial state is consistent with the constraint, and if applicable, the various AMR levels
are consistent with eachother.
are consistent with each other.

The following inputs must be preceded by "ns."

Expand All @@ -584,7 +584,7 @@ The following inputs must be preceded by "ns."
Checking Conservation
---------------------

IAMR has the option to sum up the total mass (and a few other quantites) at a user-defined interval.
IAMR has the option to sum up the total mass (and a few other quantities) at a user-defined interval.

+-------------------------+-----------------------------------------------------------------------+-------------+--------------+
| | Description | Type | Default |
Expand All @@ -605,4 +605,3 @@ for example.

Note that by default the tracer not conservative. To conservatively advect the tracer,
that option must be set in the inputs (see :ref:`sec:conserv`).

4 changes: 2 additions & 2 deletions Docs/sphinx_documentation/source/SetupAndRunning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ infrastructure to read in the inputs parameters.
(See AMReX's documentation on ``ParmParse`` here: :ref:`sec:basics:parmparse`.)

.. tip::
Before making any code changes, we highly reccomend creating a new git branch.
Before making any code changes, we highly recommend creating a new git branch.

Extra points if the new branch's name reflects the changes, e.g. ``couette_flow``.
We do `not` reccomend making any changes within the ``development`` branch because
We do `not` recommend making any changes within the ``development`` branch because
doing so will make your local ``development`` branch diverge from the matching branch
in the main IAMR repository. This can lead to difficulties pulling in updates and bug-fixes
from the main IAMR repo.
Expand Down
16 changes: 8 additions & 8 deletions Docs/sphinx_documentation/source/Software.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ how the interpolation is to be done, in both space and time. Importantly,
the interpolation also requires that coarse data be well-defined over
a time interval that brackets the time instant for which we are evaluating
the grow cell value – this places requirements on how the time-integration
of the various AMR levels are sequenced relative to eachother.
of the various AMR levels are sequenced relative to each other.
In AMReX, the field data associated with the system state, as well as the metadata
associated with inter-level transfers, is bundled (encapsulated) in
a class called “StateData”. The metadata
Expand Down Expand Up @@ -198,7 +198,7 @@ the user supplies data to fill grow cells.

IAMR provides the ability to specify constant Dirichlet BCs
in the inputs file (see section :ref:`sec:dirichlet`).
Users can create more complex Dirichlet boundary condtions by writing
Users can create more complex Dirichlet boundary conditions by writing
their own fill function in ``NS_bcfill.H``, then using that function to create
an ``amrex::StateDescriptor::BndryFunc`` object and specifying which variables
will use it in ``NS_setup.cpp``.
Expand Down Expand Up @@ -369,7 +369,7 @@ the discussion of tiling in AMReX's documentation, :ref:`amrex:sec:basics:mfiter
AMReX’s Non-Tiling Approach
---------------------------

At the highest abstraction level, we have MultiFab (mulitple
At the highest abstraction level, we have MultiFab (multiple
FArrayBoxes). A MultiFab contains an array of Boxes (a Box contains integers specifying the index space it
covers), including Boxes owned by other processors for the
purpose of communication, an array of MPI ranks specifying which MPI
Expand Down Expand Up @@ -433,11 +433,11 @@ Note that the code is almost identical to the one with the non-tiling approach.
Some comments:

- The iterator now takes an extra argument to turn on tiling
(set to true). There is another interface fo MFIter
(set to true). There is another interface of MFIter
that can take an IntVect that explicitly gives the tile size
in each coordinate direction.

If we don’t explictly specify the tile size at the loop, then the
If we don’t explicitly specify the tile size at the loop, then the
runtime parameter :cpp:`fabarray.mfiter_tile_size` can be used to set it
globally.

Expand Down Expand Up @@ -701,9 +701,9 @@ Explicitly defined tagging functions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Explicitly defined error estimation functions can be used either instead of or in addition to
dynmaically generated funtions. These functions can be added to NavierStokes::errorEst() in
dynamically generated functions. These functions can be added to NavierStokes::errorEst() in
NS_error.cpp. Any dynamically generated error functions will operate first.
Please note that while CLEARing a tagged cell is possible, it is not reccomended as it
Please note that while CLEARing a tagged cell is possible, it is not recommended as it
may not have the desired effect.


Expand Down Expand Up @@ -744,7 +744,7 @@ the MultiFab was written to disk.

Think of the number :math:`N` as the number of independent I/O pathways in
your underlying parallel filesystem. Of course a “real” parallel
filesytem should be able to handle any reasonable value of :math:`N`. The
filesystem should be able to handle any reasonable value of :math:`N`. The
value -1 forces :math:`N` to the number of CPUs on which you’re
running, which means that each CPU writes to a unique file, which can
create a very large number of files, which can lead to inode issues.
6 changes: 2 additions & 4 deletions Docs/sphinx_documentation/source/Tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Non-EB:
* **Hotspot**: A hot bubble rising in closed box. Evolves a temperature field and uses
a low Mach number constraint in place of incompressible. AMR refinement criteria is
based on the temperature, but only 2D uses AMR by default. The 3D setup features an
open top (outflow BC) and demonstates how to allow refinement at the outflow (which
open top (outflow BC) and demonstrates how to allow refinement at the outflow (which
is turned off in IAMR by default).


Expand Down Expand Up @@ -136,12 +136,10 @@ Non-EB:
* **HIT**: Homogeneous isentropic forced turbulence with constant density.
This demonstrates defining a new forcing function by using a local edited
version of ``NS_getForce.cpp``. IAMR's make system is automatically configured
to select any local versions of files and ignore the corresponding verions in
to select any local versions of files and ignore the corresponding versions in
``IAMR/Source``. This problem is 3D only.


* **Particles**: Particles in a double shear layer. Uses 2 levels of refinement
and fixed grids. With fixed grids, a grid file (called ``fixed_grids_ml`` here) is
used to define the grids for levels >= 1.


4 changes: 2 additions & 2 deletions Docs/sphinx_documentation/source/Visualization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ the domain:
:math:`>>>` value, location = pf.h.find\_max(‘density’)

The list goes on. A full list of methods and attributes associated
with the heirarchy object (and most any yt object or function) can be
with the hierarchy object (and most any yt object or function) can be
accessed by the help function:

:math:`>>>` help(pf.h)
Expand Down Expand Up @@ -247,7 +247,7 @@ available units. We can access the data within the container:

When the creation of objects is time-consuming, it can be convenient
to save objects so they can be used in another session. To save an
object as part of the .yt file affiliated with the heirarchy:
object as part of the .yt file affiliated with the hierarchy:

:math:`>>>` pf.h.save\_object(my\_data\_container, ‘sphere\_to\_analyze\_later’)

Expand Down
4 changes: 2 additions & 2 deletions Exec/eb_run2d/regtest.2d.bubble
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ ns.redistribution_type = FluxRedist
prob.probtype = 2
prob.blob_center = 0.0 1.5
prob.blob_radius = 0.2
# Background density is 1. Density is incresed by a factor of density_ic inside
# Background density is 1. Density is increased by a factor of density_ic inside
# the bubble
prob.density_ic = 2.0

#mag_vort is stepping out of bounds
#amr.derive_plot_vars = mag_vort diveru avg_pressure
#amr.derive_plot_vars = mag_vort diveru avg_pressure
2 changes: 1 addition & 1 deletion Exec/run2d/regtest.2d.hotspot_rz
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ prob.probtype = 6
prob.blob_center = 0.0 0.01
prob.blob_radius = 0.003
prob.interface_width = 0.00000006
# Background density is 1. Density is incresed by a factor of density_ic inside
# Background density is 1. Density is increased by a factor of density_ic inside
# the bubble
prob.density_ic = 1.229
# Can also set up a flow, defaults to zero
Expand Down
16 changes: 8 additions & 8 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Release version 17.09 (September, 2017)

11/3/17
Release version 17.11 (Novermber, 2017)
Small changes to documentation and code commments.
Release version 17.11 (November, 2017)
Small changes to documentation and code comments.
Added a test problem with an input tracer being forced into the domain with an inflow jet.

12/1/17
Expand Down Expand Up @@ -71,7 +71,7 @@ Minor compiler settings fixes
6/3/19
Bug fix in filling u_mac ghost cells
Fix create_umac_grown for periodic cases
Misc code cleanup; extra arguments, extraenous calls, compiler quieting
Misc code cleanup; extra arguments, extraneous calls, compiler quieting
Parallel reduction cleanup
Various changes to be consistent with AMReX interfaces

Expand Down Expand Up @@ -156,7 +156,7 @@ Minor tiling fixes

12/2/20
Creation from Embiggen of a tool to extrapolate coarse checkpoint file to a finest mesh
Add a "stop_interval" parameter to allow the simulation to stop at a specfic additional time interval after the physical time of a restart checkpoint file
Add a "stop_interval" parameter to allow the simulation to stop at a specific additional time interval after the physical time of a restart checkpoint file
Remove Dpdt_Type and code related to Pressure temporal-centeredness at a Point (vs. Interval)
Test case updates

Expand All @@ -176,7 +176,7 @@ Many small updates to several parts of the code, including:
4/1/21
Cleanup unused options, problems, and inputs files
Fixes to ref_ratio=4 ghost cell bugs
Port some initializtion kernels to C++
Port some initialization kernels to C++
Port some derived functions to C++
Port boundary filling functions to C++
Ghost cell filling bugs
Expand Down Expand Up @@ -214,7 +214,7 @@ Various EB and advection updates and fixes

9/1/21
Diffusion changes - use new multicomponent MLMG solver
In the temperature solve, let ns.temp_cond_coef represent (lamba/c_p)
In the temperature solve, let ns.temp_cond_coef represent (lambda/c_p)
Hydrodynamic algorithm updates
Updates to create_umac_grown
Embedded boundary compile updates
Expand All @@ -225,7 +225,7 @@ Moved slope routines to AMReX-Hydro
Documentation reorganization
Misc. AMR fixes
Misc. cleanup (re-org, quiet compiler warnings, remove unused code)
Misc. compiler fixes and general updates to test and bechmark problems
Misc. compiler fixes and general updates to test and benchmark problems

11/2/21
Various GPU fixes
Expand Down Expand Up @@ -290,4 +290,4 @@ Fix bug in multilevel velocity sync. Misc code cleanup.

12/1/22
Allow BDS for velocity advection (but still not in computing MAC velocities). Note this changes behavior for advection_scheme=BDS option, which before only used BDS for scalars and used Godunov for velocity.
Fix norm calculation in Tutorials/TaylorGreen/benchmarks. Minor clean up.
Fix norm calculation in Tutorials/TaylorGreen/benchmarks. Minor clean up.
Loading

0 comments on commit 0f7b816

Please sign in to comment.