Skip to content

Commit

Permalink
Fix spelling (Exawind#912)
Browse files Browse the repository at this point in the history
  • Loading branch information
marchdf authored Oct 3, 2023
1 parent 469f26f commit b3b7ccc
Show file tree
Hide file tree
Showing 40 changed files with 79 additions and 45 deletions.
9 changes: 9 additions & 0 deletions .codespell-ignore-words
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
blocs
inout
dout
pres
degress
vell
nd
fo
ue
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,spack-build-*,*/build,*/submods,plt*,chk*,__pycache__,.ccls,.ccls-cache,*.pdf,DU21_A17.txt,inspect_abl_io.html
ignore-words = .codespell-ignore-words
24 changes: 23 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ jobs:
ccache-${{github.workflow}}-${{github.job}}-git-
- name: Prepare CUDA environment
run: |
${{github.workspace}}/submods/amrex/.github/workflows/dependencies/ubuntu_free_disk_space.sh
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" | sudo tee /etc/apt/sources.list.d/cuda.list
sudo apt-get update
Expand Down Expand Up @@ -204,12 +205,13 @@ jobs:
ccache-${{github.workflow}}-${{github.job}}-git-
- name: Prepare HIP environment
run: |
${{github.workspace}}/submods/amrex/.github/workflows/dependencies/ubuntu_free_disk_space.sh
wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | sudo apt-key add -
echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/5.6.1/ ubuntu main' | sudo tee /etc/apt/sources.list.d/rocm.list
echo 'export PATH=/opt/rocm/llvm/bin:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin:$PATH' | sudo tee -a /etc/profile.d/rocm.sh
sudo apt-get update
sudo apt-get install -y \
build-essential rocm-dev roctracer-dev rocprofiler-dev rocrand-dev rocprim-dev rocm-libs
build-essential rocm-dev rocrand-dev rocprim-dev
- name: Configure and build
run: |
source /etc/profile.d/rocm.sh
Expand Down Expand Up @@ -266,6 +268,7 @@ jobs:
- name: Prepare SyCL environment
run: |
export DEBIAN_FRONTEND=noninteractive
${{github.workspace}}/submods/amrex/.github/workflows/dependencies/ubuntu_free_disk_space.sh
sudo wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
Expand Down Expand Up @@ -409,6 +412,25 @@ jobs:
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: sarif-results/cpp.sarif
Lint-codespell:
needs: Formatting
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v3
with:
submodules: false
- name: Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Dependencies
run: |
# Install Python packages
python -m pip install --upgrade pip
pip install codespell
- name: Run codespell
run: codespell
# Docker:
# needs: Formatting
# runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/boundary_conditions/BCInterface.H
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/**
* \defgroup field_bc Boundary conditions management
* Boundary conditions managment
* Boundary conditions management
*
* This group documents the boundary condition management interface within
* AMR-Wind. Boundary conditions are registered on a Field instance and are
Expand Down
4 changes: 2 additions & 2 deletions amr-wind/core/FieldRepo.H
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public:
/** Create a new field instance
*
* @param name Unique identifier for this field
* @param ncomp Number of components in this field (defalt: 1)
* @param ncomp Number of components in this field (default: 1)
* @param ngrow Number of ghost cells/nodes for this field (default: 1)
* @param nstates Number of time states for this field (default: 1)
* @param floc Field location (default: cell-centered)
Expand Down Expand Up @@ -267,7 +267,7 @@ public:
*
* Integer fields are used for masks and iblanking with overset meshes
*
* \param name [in] Unique indentifier for the field
* \param name [in] Unique identifier for the field
*/
IntField& declare_int_field(
const std::string& name,
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/core/MLMGOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void MLMGOptions::operator()(amrex::MLMG& mlmg)
else if (hypre_interface == "semi_structured")
mlmg.setHypreInterface(amrex::Hypre::Interface::semi_structed);
else if (hypre_interface == "structured")
mlmg.setHypreInterface(amrex::Hypre::Interface::structed);
mlmg.setHypreInterface(amrex::Hypre::Interface::structured);
else
amrex::Abort(
"Invalid hypre interface. Valid options: ij semi_structured "
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/core/SimTime.H
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ private:
//! Initial starting time index for generating checkpoint files
int m_chkpt_start_index{0};

//! Initial starting time index for generating ouput files
//! Initial starting time index for generating output files
int m_plt_start_index{0};

//! Initial starting time index for regriding
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/equation_systems/PDE.H
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public:
using SchemeType = Scheme;

//! Unique identifier used to register and create this instance on-demand
//! through the factor iterface
//! through the factor interface
static std::string identifier()
{
return PDE::pde_name() + "-" + Scheme::scheme_name();
Expand Down
4 changes: 2 additions & 2 deletions amr-wind/equation_systems/PDEBase.H
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace pde {
* terms, the diffusion term, and the convective term. A PDE may declare
* additional fields that are not stored in this object, but can be queried
* using the FieldRepo instance. For example, the incompressible Navier-Stokes
* (ICNS) always declars density and pressure in addition to the velocity
* (ICNS) always declares density and pressure in addition to the velocity
* fields.
*
*/
Expand All @@ -59,7 +59,7 @@ public:
//! Perform initialization actions for a PDE after the mesh is generated
virtual void initialize() = 0;

//! Preform updates specific to PDE after a regrid is performed
//! Perform updates specific to PDE after a regrid is performed
virtual void post_regrid_actions() = 0;

//! Compute the source (forcing) terms for this PDE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace amr_wind::pde::icns {

/** Boussinesq bouyancy source term
/** Boussinesq buoyancy source term
* \ingroup icns_src we_abl
*
* \f[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace amr_wind::pde::icns {

/** Boussinesq bouyancy source term
/** Boussinesq buoyancy source term
* \ingroup icns_src we_abl
*
* \f[
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/immersed_boundary/bluff_body/bluff_body_ops.H
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace amr_wind::ib {
namespace bluff_body {

/** Parse common data for modeling non-blade bluff bodies via an immersed
* bounary
* boundary
*/
void read_inputs(
BluffBodyBaseData& /*wdata*/,
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/incflo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ bool incflo::regrid_and_update()
m_sim.post_manager().post_regrid_actions();
}

// update cell counts if unitialized or if a regrid happened
// update cell counts if uninitialized or if a regrid happened
if (m_cell_count == -1 || m_time.do_regrid()) {
m_cell_count = 0;
for (int i = 0; i <= finest_level; i++) {
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/ocean_waves/relaxation_zones/stokes_waves_K.H
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void stokes_coefficients(

if (StokesOrder > 5 || StokesOrder < 2) {
amrex::Abort(
"invalid stokes order speficied. It should be between 2,3,4 or 5 ");
"invalid stokes order specified. It should be between 2,3,4 or 5 ");
}
}

Expand Down
2 changes: 1 addition & 1 deletion amr-wind/physics/ChannelFlow.H
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private:

WallFunction m_wall_func;

//! Wall normal directon - Default y direction
//! Wall normal direction - Default y direction
int m_norm_dir{1};

//! initial density value
Expand Down
4 changes: 2 additions & 2 deletions amr-wind/physics/SyntheticTurbulence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void load_turb_plane_data(
auto wvel = ncf.var("wvel");

if ((ir - il) == 1) {
// two consequtive planes load them in one shot
// two consecutive planes load them in one shot
uvel.get(&turb_grid.uvel[0], start, count);
vvel.get(&turb_grid.vvel[0], start, count);
wvel.get(&turb_grid.wvel[0], start, count);
Expand Down Expand Up @@ -458,7 +458,7 @@ SyntheticTurbulence::SyntheticTurbulence(const CFDSim& sim)
// vector)
m_turb_grid.tr_mat = vs::zrot(270.0 - wind_direction);

amrex::Print() << "Synthethic turbulence forcing initialized \n"
amrex::Print() << "Synthetic turbulence forcing initialized \n"
<< " Turbulence file = " << m_turb_filename << "\n"
<< " Box lengths = [" << m_turb_grid.box_len[0] << ", "
<< m_turb_grid.box_len[1] << ", " << m_turb_grid.box_len[2]
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/physics/multiphase/MultiPhase.H
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/** Multiphase physics
*
* This class implemnts the necessary code to simulate multiphase
* This class implements the necessary code to simulate multiphase
* (air-water interaction) problems with AMR-Wind. It reads the
* namespace `MultiPhase' from the input file to determine how the
* initial conditions are generated.
Expand Down
4 changes: 2 additions & 2 deletions amr-wind/physics/multiphase/MultiPhase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ MultiPhase::MultiPhase(CFDSim& sim)
m_interface_capturing_method = amr_wind::InterfaceCapturingMethod::VOF;
auto& vof_eqn = sim.pde_manager().register_transport_pde("VOF");
m_vof = &(vof_eqn.fields().field);
// Create levelset as a auxilliary field only !
// Create levelset as a auxiliary field only !
m_levelset = &(m_sim.repo().get_field("levelset"));
const amrex::Real levelset_default = 0.0;
BCScalar bc_ls(*m_levelset);
Expand All @@ -47,7 +47,7 @@ MultiPhase::MultiPhase(CFDSim& sim)
m_interface_capturing_method = amr_wind::InterfaceCapturingMethod::VOF;
auto& vof_eqn = sim.pde_manager().register_transport_pde("VOF");
m_vof = &(vof_eqn.fields().field);
// Create levelset as a auxilliary field only !
// Create levelset as a auxiliary field only !
m_levelset = &(m_sim.repo().get_field("levelset"));
const amrex::Real levelset_default = 0.0;
BCScalar bc_ls(*m_levelset);
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/utilities/sampling/DTUSpinnerSampler.H
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace amr_wind::sampling {
* Defines probes along a line defined by a time history from `m_azimuth_table`
* and `m_elevation_table` with a length of `m_length`. This determines the
* `start` and `end` points at every time-step and divides the line into equal
* segements as determined by `num_points`. The length of each segment is given
* segments as determined by `num_points`. The length of each segment is given
* by \f[ m_length / (num_points - 1) \f]
*/
class DTUSpinnerSampler : public LidarSampler
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/utilities/sampling/DTUSpinnerSampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void DTUSpinnerSampler::sampling_locations(SampleLocType& locs) const

int offset = k * AMREX_SPACEDIM;

// Loop per spacial dimension
// Loop per spatial dimension
for (int d = 0; d < AMREX_SPACEDIM; ++d) {
dx[d] = (m_end[d + offset] - m_start[d + offset]) / ndiv;
}
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/utilities/sampling/Enstrophy.H
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace amr_wind::enstrophy {
/** enstrophy object
* \ingroup Enstrophy
*
* A concrete impelementation of the post-processing interface that deals with
* A concrete implementation of the post-processing interface that deals with
* the total enstrophy
*
*/
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/utilities/sampling/FieldNorms.H
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace amr_wind::field_norms {
/** field norm object
* \ingroup Field Norm
*
* A concrete impelementation of the post-processing interface that deals with
* A concrete implementation of the post-processing interface that deals with
* norms of fields. FIXME: need to update this
*
*/
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/utilities/sampling/KineticEnergy.H
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace amr_wind::kinetic_energy {
/** kinetic energy object
* \ingroup Kinetic Energy
*
* A concrete impelementation of the post-processing interface that deals with
* A concrete implementation of the post-processing interface that deals with
* integrating total kinetic energy
*
*/
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/utilities/sampling/LidarSampler.H
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace amr_wind::sampling {
* Defines probes along a line defined by a time history from `m_azimuth_table`
* and `m_elevation_table` with a length of `m_length`. This determines the
* `start` and `end` points at every time-step and divides the line into equal
* segements as determined by `num_points`. The length of each segment is given
* segments as determined by `num_points`. The length of each segment is given
* by \f[ m_length / (num_points - 1) \f]
*/
class LidarSampler : public LineSampler
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/utilities/sampling/LineSampler.H
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace amr_wind::sampling {
* \ingroup sampling
*
* Defines probes along a line defined by `start` and `end` coordinates and
* divides it into equal segements as determined by `num_points`. The length of
* divides it into equal segments as determined by `num_points`. The length of
* each segment is given by \f[ (end - start) / (num_points - 1) \f]
*/
class LineSampler : public SamplerBase::Register<LineSampler>
Expand Down
4 changes: 2 additions & 2 deletions amr-wind/utilities/sampling/Sampling.H
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ namespace amr_wind::sampling {
/** Collection of data sampling objects
* \ingroup sampling
*
* A concrete impelementation of the post-processing interface that deals with
* A concrete implementation of the post-processing interface that deals with
* data probes. Multiple instances of sampling entities (e.g., point cloud or
* probes, line, or plane samplers) can be registered. Internally, the data
* probles are represented as amr_wind::sampling::SamplingContainer for
* problems are represented as amr_wind::sampling::SamplingContainer for
* tracking their position within the CFD mesh and updating the fields of
* interest.
*
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/utilities/sampling/WaveEnergy.H
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace amr_wind::wave_energy {
* A concrete implementation of the post-processing interface that deals with
* integrating total wave energy. This routine calculates the kinetic energy
* (KE) and potential energy (PE) according to the following definitions. It
* caclulates the correct potential energy offset, assuming an equilibrium
* calculates the correct potential energy offset, assuming an equilibrium
* water level of 0 unless specified otherwise by an input parameter. It also
* assumes the traditional coordinate system, where interface height/depth is
* in z.
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/wind_energy/actuator/ActuatorContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ void ActuatorContainer::populate_field_buffers()

/** Helper method for ActuatorContainer::sample_fields
*
* Performs a trilinear interpolation of the velocity/desnity field to particle
* Performs a trilinear interpolation of the velocity/density field to particle
* locations. It also updates the particle locations such that the next
* Redistribute call restores the particles back to their original MPI rank
* where they were created.
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/wind_energy/actuator/actuator_types.H
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ struct ActGrid
//! Velocity vector at the sampled locations
VecList vel;

//! Density at the smapled locations
//! Density at the sampled locations
RealList density;

/** Helper method to resize the data arrays defined on the grid
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/wind_energy/actuator/actuator_utils.H
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ gaussian1d(const amrex::Real& dist, const amrex::Real& eps)

/** Compute distance between two points
*
* @param origin Origin for the cylindrical coodinate system
* @param origin Origin for the cylindrical coordinate system
* @param normal Normal relative to origin (defines cylinder orientation)
* @param point1 location of the first point in Cartesian coordinates
* @param point2 location of second point in Cartesian coordinates
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/wind_energy/actuator/disk/disk_spreading.H
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public:
} else if (key == "LinearBasis") {
m_function = &SpreadingFunction::linear_basis_spreading;
} else {
amrex::Abort("Invalide spreading type");
amrex::Abort("Invalid spreading type");
}
} else {
m_function = &SpreadingFunction::linear_basis_in_theta;
Expand Down
4 changes: 2 additions & 2 deletions docs/doxygen/main_page.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# AMR-Wind API documentation {#mainpage}

[AMR-Wind](https://github.com/exawind/amr-wind) is a massively parallel,
block-structured adaptive-mesh, incompressible flow sover for wind turbine and
block-structured adaptive-mesh, incompressible flow solver for wind turbine and
wind farm simulations. The codebase is a wind-focused fork of
[incflo](https://github.com/AMReX-Codes/incflo). The solver is built on top of
the [AMReX library](https://amrex-codes.github.io/amrex). AMReX library provides
Expand Down Expand Up @@ -56,7 +56,7 @@ is organized in subdirectories described below:
- `docs` -- User manual (Sphinx-based) and Doxygen files
- `submods` -- Third-party libraries and dependencies
- `test` -- Regression tests and associated infrastructure
- `tools` -- Miscellanous post-processing scripts and other utilities
- `tools` -- Miscellaneous post-processing scripts and other utilities

When developing new features, we strongly recommend creating a unit-test and
develop features incrementally and testing as you add capabilities. Unit-tests
Expand Down
4 changes: 2 additions & 2 deletions docs/sphinx/developer/coding_guidelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ team.
<https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines>`_ for best
practices when coding in C++.

**Write code targeting heterogenous architectures**
**Write code targeting heterogeneous architectures**

All code must be written in a way such that it can run on GPUs without
errors. Please consult the `GPU section
<https://amrex-codes.github.io/amrex/docs_html/GPU_Chapter.html>`_ in AMReX
documentation to learn the correct data structures and looping paradigms to
use when targeting heterogenous architectures.
use when targeting heterogeneous architectures.

**Unit and regression tests**

Expand Down
Loading

0 comments on commit b3b7ccc

Please sign in to comment.