Skip to content

Commit

Permalink
CI: Add codespell (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang authored Jul 9, 2024
1 parent 2a17da2 commit ec86f81
Show file tree
Hide file tree
Showing 17 changed files with 44 additions and 16 deletions.
4 changes: 4 additions & 0 deletions .codespell-ignore-words
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Blocs
inout
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,*.bib,*.ps,*.patch,*~,CHANGES,*/tmp_build_dir
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
2 changes: 1 addition & 1 deletion Docs/sphinx_documentation/source/EB.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ incflo provides several options of embedded boundary geometries. The inputs para
determines which geometry is selected by :cpp:`incflo::MakeEBGeometry()` within :cpp:`incflo/src/embedded_boundaries`.
The procedure to create your own EB geometry is described in the AMReX documentation on :ref:`amrex:sec:EB:ebinit`.
As discussed in the AMReX documentation, note that when constructing the EB, we must specify a
maxium coarsening level (``max_crse_level``):
maximum coarsening level (``max_crse_level``):

.. highlight:: c++

Expand Down
2 changes: 1 addition & 1 deletion Docs/sphinx_documentation/source/GettingStarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -370,4 +370,4 @@ files are used for restarting the code. For more information see the AMReX Docum
Visualizing the Results
=======================

Options for visualizing the data are discussed in the AMReX Documenation on :ref:`amrex:Chap:Visualization`.
Options for visualizing the data are discussed in the AMReX Documentation on :ref:`amrex:Chap:Visualization`.
3 changes: 1 addition & 2 deletions Docs/sphinx_documentation/source/InputsProblemDefinition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,9 @@ Setting basic boundary conditions can be specified by inputs preceded by "xlo",
The implementation requires that there is EB separating the inflow and outflow regions,
and only currently treats constant viscosity (i.e. requires the inputs file contains ``incflo.use_tensor_solve = false``).
It does allow for non-constant scalar diffusivity. To create a new problem setup with mixed BCs, one must additionally
specify the Dirchlet and Neumann areas in ``prob/prob_bc.cpp`` In this file there are functions to set the needed BC info for the diffusion solver, the MAC projection, and with the same function, the nodal projection and advection. Comments in the code provide a detailed explaination for each instance. For addditional details on mixed BCs, also see AMReX-Hydro's documentation (:ref:`bcs`).
specify the Dirchlet and Neumann areas in ``prob/prob_bc.cpp`` In this file there are functions to set the needed BC info for the diffusion solver, the MAC projection, and with the same function, the nodal projection and advection. Comments in the code provide a detailed explanation for each instance. For additional details on mixed BCs, also see AMReX-Hydro's documentation (:ref:`bcs`).

..
To create a new setup:
initial conditions go in prob/prob_init_fluid.cpp
inflow boundary conditions are set in prob/prob_bc.H -- the BCType for mixed bc is set at foextrap here to allow the outflow to get appropriately filled, which would already have happened before reaching these functions.
2 changes: 1 addition & 1 deletion src/boundary_conditions/incflo_set_bcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ incflo::make_robinBC_MFs(int lev, MultiFab* state)
Array4<Real> const& f_arr = robin_f.array(mfi);

if (state) {
// state has filled boundry, so can use its ghost cells for the BC values
// state has filled boundary, so can use its ghost cells for the BC values
Array4<Real const> const& bcv = state->const_array(mfi);
// Diffusion, solving for velocity, density, tracer
//
Expand Down
2 changes: 1 addition & 1 deletion src/convection/incflo_compute_advection_term.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ incflo::compute_convective_term (Vector<MultiFab*> const& conv_u,
{
//
// BDS needs umac on physical boundaries.
// Godunov handles physical boundaries interally, but needs periodic ghosts filled.
// Godunov handles physical boundaries internally, but needs periodic ghosts filled.
// MOL doesn't need any umac ghost cells, so it doesn't get here.
//
Real fake_time = 0.;
Expand Down
3 changes: 1 addition & 2 deletions src/particles/ParticleData.H
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class ParticleData
return m_namelist_unalloc;
}

/*! queries if containe has species of a certain name */
/*! queries if container has species of a certain name */
inline bool contains ( const std::string& a_name ) const
{
BL_PROFILE("ParticleData::contains()");
Expand Down Expand Up @@ -238,4 +238,3 @@ class ParticleData

#endif
#endif

2 changes: 1 addition & 1 deletion src/prob/prob_init_fluid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ void incflo::init_periodic_tracer (Box const& vbx, Box const& /*gbx*/,
tracer(i,j,k,1) = A *(std::sin(C*(y+z) - Real(0.00042)) + Real(1.0)) * std::exp(x);
});
} else {
Abort("Unknow periodic tracer probtype");
Abort("Unknown periodic tracer probtype");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/setup/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void incflo::ReadParameters ()
m_redistribution_type != "StateRedist")
amrex::Abort("redistribution type must be NoRedist, FluxRedist, or StateRedist");

if (m_advection_type == "Godunov" && m_godunov_ppm) amrex::Abort("Cant use PPM with EBGodunov");
if (m_advection_type == "Godunov" && m_godunov_ppm) amrex::Abort("Can't use PPM with EBGodunov");
pp.query("write_geom_chk", m_write_geom_chk);
#endif

Expand Down
2 changes: 1 addition & 1 deletion test_2d/benchmark.rotated_planes_y
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ cylinder.center = 0.0 0.0 0.0
incflo.probtype = 6

# Note that with this prob_type, ic_u is used to mean the velocity
# along the direction of the cylinder, irregardless of the direction
# along the direction of the cylinder, regardless of the direction
# of the cylinder
incflo.ic_u = -0.5 #
incflo.ic_v = 0.8660254038 #
Expand Down
2 changes: 1 addition & 1 deletion test_bds_2d/inputs.circ_traceradvect
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
amrex.fpe_trap_invalid=1 # hav a trap to catch a bug
amrex.fpe_trap_invalid=1 # have a trap to catch a bug
incflo.probtype = 14
#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# SIMULATION STOP #
Expand Down
2 changes: 1 addition & 1 deletion test_bds_2d/inputs.gaussian_traceradvect
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
amrex.fpe_trap_invalid=1 # hav a trap to catch a bug
amrex.fpe_trap_invalid=1 # have a trap to catch a bug
incflo.probtype = 15
#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# SIMULATION STOP #
Expand Down
2 changes: 1 addition & 1 deletion test_bds_3d/inputs.circ_traceradvect
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
amrex.fpe_trap_invalid=1 # hav a trap to catch a bug
amrex.fpe_trap_invalid=1 # have a trap to catch a bug
incflo.probtype = 14
#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# SIMULATION STOP #
Expand Down
2 changes: 1 addition & 1 deletion test_bds_3d/inputs.gaussian_traceradvect
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
amrex.fpe_trap_invalid=1 # hav a trap to catch a bug
amrex.fpe_trap_invalid=1 # have a trap to catch a bug
incflo.probtype = 15
#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#
# SIMULATION STOP #
Expand Down

0 comments on commit ec86f81

Please sign in to comment.