diff --git a/CHANGELOG.md b/CHANGELOG.md index b635ae78d..c8c4b761a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -98,7 +98,7 @@ - CUDA and HIP support and testing in continuous integration - Mirror view capability for AoSoA - New performance benchmarks for sorting, communication, and neighbor lists -- Improving AoSoA memory managment with empty() and shrinkToFit() +- Improving AoSoA memory management with empty() and shrinkToFit() - Second level neighbor parallel for and reduce algorithms for triplet operations - Unmanaged AoSoA for wrapping user memory diff --git a/core/src/Cabana_CommunicationPlan.hpp b/core/src/Cabana_CommunicationPlan.hpp index 4db3bbeac..77c7dd746 100644 --- a/core/src/Cabana_CommunicationPlan.hpp +++ b/core/src/Cabana_CommunicationPlan.hpp @@ -528,7 +528,7 @@ class CommunicationPlan \brief Get the number of export elements. \return The number of export elements. - Whenever the communciation plan is applied, this is the total number of + Whenever the communication plan is applied, this is the total number of elements expected to be input on the sending ranks (in the forward communication plan). This will be different than the number returned by totalNumExport() if some of the export ranks used in the construction @@ -928,7 +928,7 @@ class CommunicationPlan \brief Create the export steering vector. Creates an array describing which export element ids are moved to which - location in the send buffer of the communcation plan. Ordered such that + location in the send buffer of the communication plan. Ordered such that if a rank sends to itself then those values come first. \param neighbor_ids The id of each element in the neighbor send buffers. @@ -951,7 +951,7 @@ class CommunicationPlan \brief Create the export steering vector. Creates an array describing which export element ids are moved to which - location in the contiguous send buffer of the communcation plan. Ordered + location in the contiguous send buffer of the communication plan. Ordered such that if a rank sends to itself then those values come first. \param neighbor_ids The id of each element in the neighbor send buffers. diff --git a/core/src/Cabana_Distributor.hpp b/core/src/Cabana_Distributor.hpp index 245e282e4..0d55ab11e 100644 --- a/core/src/Cabana_Distributor.hpp +++ b/core/src/Cabana_Distributor.hpp @@ -395,7 +395,7 @@ void migrate( const Distributor_t& distributor, const AoSoA_t& src, \param distributor The distributor to use for the migration. \param aosoa The AoSoA containing the data to be migrated. Upon input, must have the same number of elements as the inputs used to construct the - destributor. At output, it will be the same size as th enumber of import + distributor. At output, it will be the same size as th enumber of import elements on this rank provided by the distributor. Before using this function, consider reserving enough memory in the data structure so reallocating is not necessary. @@ -446,7 +446,7 @@ void migrate( ExecutionSpace exec_space, const Distributor_t& distributor, \param distributor The distributor to use for the migration. \param aosoa The AoSoA containing the data to be migrated. Upon input, must have the same number of elements as the inputs used to construct the - destributor. At output, it will be the same size as th enumber of import + distributor. At output, it will be the same size as th enumber of import elements on this rank provided by the distributor. Before using this function, consider reserving enough memory in the data structure so reallocating is not necessary. @@ -476,7 +476,7 @@ void migrate( const Distributor_t& distributor, AoSoA_t& aosoa, \param distributor The distributor to use for the migration. \param src The slice containing the data to be migrated. Must have the same - number of elements as the inputs used to construct the destributor. + number of elements as the inputs used to construct the distributor. \param dst The slice to which the migrated data will be written. Must be the same size as the number of imports given by the distributor on this rank. Call totalNumImport() on the distributor to get this size value. @@ -656,7 +656,7 @@ void migrate( ExecutionSpace, const Distributor_t& distributor, \param distributor The distributor to use for the migration. \param src The slice containing the data to be migrated. Must have the same - number of elements as the inputs used to construct the destributor. + number of elements as the inputs used to construct the distributor. \param dst The slice to which the migrated data will be written. Must be the same size as the number of imports given by the distributor on this rank. Call totalNumImport() on the distributor to get this size value. diff --git a/core/src/Cabana_HDF5ParticleOutput.hpp b/core/src/Cabana_HDF5ParticleOutput.hpp index 239a08798..7ff75e9fd 100644 --- a/core/src/Cabana_HDF5ParticleOutput.hpp +++ b/core/src/Cabana_HDF5ParticleOutput.hpp @@ -901,7 +901,7 @@ void readTimeStep( HDF5Config h5_config, const std::string& prefix, // Get the rank of the dataspace. ndims = H5Sget_simple_extent_ndims( filespace_id ); - // Get the extents fo the file dataspace. + // Get the extents of the file dataspace. H5Sget_simple_extent_dims( filespace_id, dimsf, NULL ); std::vector all_offsets( comm_size ); diff --git a/core/src/Cabana_Slice.hpp b/core/src/Cabana_Slice.hpp index c343a5618..5954800b6 100644 --- a/core/src/Cabana_Slice.hpp +++ b/core/src/Cabana_Slice.hpp @@ -631,7 +631,7 @@ class Slice } /*! - \brief Assignement operator for different memory spaces for assigning + \brief Assignment operator for different memory spaces for assigning new memory access traits to the view. \tparam MAT Memory access type \param rhs The slice to shallow copy with a potentially different memory diff --git a/core/src/impl/Cabana_TypeTraits.hpp b/core/src/impl/Cabana_TypeTraits.hpp index 20fac97e3..46e191e9f 100644 --- a/core/src/impl/Cabana_TypeTraits.hpp +++ b/core/src/impl/Cabana_TypeTraits.hpp @@ -27,7 +27,7 @@ namespace Impl template struct IsPowerOfTwo { - static_assert( N > 0, "Vector length must be greather than 0" ); + static_assert( N > 0, "Vector length must be greater than 0" ); static constexpr bool value = ( ( N & ( N - 1 ) ) == 0 ); }; diff --git a/core/unit_test/tstAoSoA.hpp b/core/unit_test/tstAoSoA.hpp index e15bcb62e..baa8b4b60 100644 --- a/core/unit_test/tstAoSoA.hpp +++ b/core/unit_test/tstAoSoA.hpp @@ -167,7 +167,7 @@ void testAoSoA() checkDataMembers( aosoa, fval, dval, ival, dim_1, dim_2, dim_3 ); // Now extend the capacity of the container. First make the capacity - // smaller - this wont actually do anything because we never decrease the + // smaller - this won't actually do anything because we never decrease the // allocation of the container. aosoa.reserve( 1 ); diff --git a/core/unit_test/tstNeighborList.hpp b/core/unit_test/tstNeighborList.hpp index 25301bb89..f61192ff4 100644 --- a/core/unit_test/tstNeighborList.hpp +++ b/core/unit_test/tstNeighborList.hpp @@ -127,7 +127,7 @@ void testVerletListFull() checkFullNeighborList( nlist, test_data.N2_list_copy, test_data.num_particle ); - // Test rebuild function with explict execution space. + // Test rebuild function with explicit execution space. nlist.build( TEST_EXECSPACE{}, position, 0, position.size(), test_data.test_radius, test_data.cell_size_ratio, test_data.grid_min, test_data.grid_max ); diff --git a/core/unit_test/tstSort.hpp b/core/unit_test/tstSort.hpp index 97e0c8b70..359c42451 100644 --- a/core/unit_test/tstSort.hpp +++ b/core/unit_test/tstSort.hpp @@ -510,7 +510,7 @@ void testBinBySliceDataOnly() auto bin_size_mirror = Kokkos::create_mirror_view_and_copy( Kokkos::HostSpace(), bin_size ); - // Check the result of the sort. Make sure nothing moved execpt the + // Check the result of the sort. Make sure nothing moved except the // binning data. auto mirror = Cabana::create_mirror_view_and_copy( Kokkos::HostSpace(), aosoa ); diff --git a/example/core_tutorial/01_hello_world/hello_world.cpp b/example/core_tutorial/01_hello_world/hello_world.cpp index 85069b7f3..4bc07f889 100644 --- a/example/core_tutorial/01_hello_world/hello_world.cpp +++ b/example/core_tutorial/01_hello_world/hello_world.cpp @@ -19,7 +19,7 @@ int main( int argc, char* argv[] ) { /* The Kokkos runtime used by Cabana must be initialized and finalized. - Kokkos::ScopeGuard inializes Kokkos and guarantees it is finalized, + Kokkos::ScopeGuard initializes Kokkos and guarantees it is finalized, even if the code returns early. */ Kokkos::ScopeGuard scope_guard( argc, argv ); diff --git a/example/core_tutorial/05_slice/slice_example.cpp b/example/core_tutorial/05_slice/slice_example.cpp index be2091498..eb40e0543 100644 --- a/example/core_tutorial/05_slice/slice_example.cpp +++ b/example/core_tutorial/05_slice/slice_example.cpp @@ -80,7 +80,7 @@ void sliceExample() Create a slice over each tuple member in the AoSoA. An integer template parameter is used to indicate which member to slice. A slice object simply wraps the data associated with an AoSoA member in a more - conventient accessor structure. A slice therefore has the same memory + convenient accessor structure. A slice therefore has the same memory space as the AoSoA from which it was derived. Slices may optionally be assigned a label. This label is not included in the memory tracker because slices are unmanaged memory but may still be used for diagnostic diff --git a/example/core_tutorial/06_deep_copy/deep_copy_example.cpp b/example/core_tutorial/06_deep_copy/deep_copy_example.cpp index 5287f6d23..02e4d580e 100644 --- a/example/core_tutorial/06_deep_copy/deep_copy_example.cpp +++ b/example/core_tutorial/06_deep_copy/deep_copy_example.cpp @@ -117,9 +117,9 @@ void deepCopyExample() the same memory space as dst_aosoa was created in (in this case if dst_aosoa is already on the host) we will receive the same dst_aosoa back - no memory allocations or copies will occur. This is particularly useful - for writing code that will run on both heterogenous and homogenous - architectures where the heterogenous case requires an allocation and a - copy while the homogenous case does not. + for writing code that will run on both heterogeneous and homogeneous + architectures where the heterogeneous case requires an allocation and a + copy while the homogeneous case does not. */ /* diff --git a/example/core_tutorial/11_migration/migration_example.cpp b/example/core_tutorial/11_migration/migration_example.cpp index 08353acb0..88936c8e7 100644 --- a/example/core_tutorial/11_migration/migration_example.cpp +++ b/example/core_tutorial/11_migration/migration_example.cpp @@ -158,8 +158,8 @@ void migrationExample() // Make a new AoSoA. Note that this has the same data types, vector // length, and memory space as the original aosoa. // - // Also note how this AoSoA is sized. The distrubutor computes how many - // imported elements each rank will recieve. We discard 10 elements, get + // Also note how this AoSoA is sized. The distributor computes how many + // imported elements each rank will receive. We discard 10 elements, get // 10 from our neighbor, and keep 80 of our own so this number should be 90. Cabana::AoSoA destination( "destination", distributor.totalNumImport() ); diff --git a/example/grid_tutorial/01_types/types_example.cpp b/example/grid_tutorial/01_types/types_example.cpp index 98b178c52..ffd7efbff 100644 --- a/example/grid_tutorial/01_types/types_example.cpp +++ b/example/grid_tutorial/01_types/types_example.cpp @@ -81,8 +81,8 @@ void typesExample() /* Related, there are type tags to distinguish local and global indexing: - local indicies are unique only within a given MPI rank, while global - indicies are unique across all MPI ranks. For example, a given node might + local indices are unique only within a given MPI rank, while global + indices are unique across all MPI ranks. For example, a given node might have a different local index on different MPI ranks if it is a ghost, but it will always have a unique global index on every MPI rank. diff --git a/example/grid_tutorial/05_index_space/index_space_example.cpp b/example/grid_tutorial/05_index_space/index_space_example.cpp index 90cee9a4a..6558eeaaa 100644 --- a/example/grid_tutorial/05_index_space/index_space_example.cpp +++ b/example/grid_tutorial/05_index_space/index_space_example.cpp @@ -92,7 +92,7 @@ void indexSpaceExample() std::cout << "Size: " << is3.size() << std::endl; /* - Finally, it is possible to check whether a given set of indicies in within + Finally, it is possible to check whether a given set of indices in within the range of an index space (in this case false and then true based on the second indices). */ @@ -106,7 +106,7 @@ void indexSpaceExample() /* Index spaces can also have dimensions appended. Using the 3D index space created above, we create a 4D index space (the minimum input can be - ommitted to start from zero). + omitted to start from zero). */ auto is4 = Cabana::Grid::appendDimension( is3, 3, 10 ); std::cout << "\nappended 4D index space:\nExtent: "; diff --git a/example/grid_tutorial/06_local_grid/local_grid_example.cpp b/example/grid_tutorial/06_local_grid/local_grid_example.cpp index f4fd1aae1..20af3a0db 100644 --- a/example/grid_tutorial/06_local_grid/local_grid_example.cpp +++ b/example/grid_tutorial/06_local_grid/local_grid_example.cpp @@ -161,7 +161,7 @@ void localGridExample() std::cout << "\n" << std::endl; /* - It is possible to convert between local and global indicies if needed in + It is possible to convert between local and global indices if needed in the IndexConversion namespace. */ diff --git a/example/grid_tutorial/09_grid_parallel/grid_parallel_example.cpp b/example/grid_tutorial/09_grid_parallel/grid_parallel_example.cpp index bf66206a1..ec437386d 100644 --- a/example/grid_tutorial/09_grid_parallel/grid_parallel_example.cpp +++ b/example/grid_tutorial/09_grid_parallel/grid_parallel_example.cpp @@ -80,7 +80,7 @@ void gridParallelExample() Here we use a lambda function for simplicity, but a functor with or without tag arguments are also options. Note that the kernel signature - uses the three indicies of the 3D grid. We set every value on the cells in + uses the three indices of the 3D grid. We set every value on the cells in the grid to 1. */ auto array_view = array->view(); diff --git a/example/grid_tutorial/11_semi_structured_solver_multi_variate/hypre_semi_structured_solver_multi_example.cpp b/example/grid_tutorial/11_semi_structured_solver_multi_variate/hypre_semi_structured_solver_multi_example.cpp index 9e14a7dfc..40c174f09 100644 --- a/example/grid_tutorial/11_semi_structured_solver_multi_variate/hypre_semi_structured_solver_multi_example.cpp +++ b/example/grid_tutorial/11_semi_structured_solver_multi_variate/hypre_semi_structured_solver_multi_example.cpp @@ -193,7 +193,7 @@ int main( int argc, char* argv[] ) The hypre solver capabilities used by Cabana must be initialized and finalized. HYPRE_Finalize() finalizes hypre. A call to HYPRE_Finalize() should not occur before all calls to hypre - capabilites are finished. + capabilities are finished. */ HYPRE_Finalize(); } diff --git a/example/grid_tutorial/11_structured_solver/structured_solver_example.cpp b/example/grid_tutorial/11_structured_solver/structured_solver_example.cpp index b0cc1ca4e..fd4e7d8c6 100644 --- a/example/grid_tutorial/11_structured_solver/structured_solver_example.cpp +++ b/example/grid_tutorial/11_structured_solver/structured_solver_example.cpp @@ -82,7 +82,7 @@ void structuredSolverExample() { 0, 0, 0 }, { -1, 0, 0 }, { 1, 0, 0 }, { 0, -1, 0 }, { 0, 1, 0 }, { 0, 0, -1 }, { 0, 0, 1 } }; - // Create an array and initialze to zero. + // Create an array and initialize to zero. auto lhs = Cabana::Grid::createArray( "lhs", vector_layout ); Cabana::Grid::ArrayOp::assign( *lhs, 0.0, Cabana::Grid::Own() ); @@ -109,7 +109,7 @@ void structuredSolverExample() Cabana::Grid::Dim::K ); // Fill out laplacian entries of reference solver. Entities on the system - // boundary need to be initialzed to zero. + // boundary need to be initialized to zero. Kokkos::parallel_for( "fill_ref_entries", createExecutionPolicy( owned_space, ExecutionSpace() ), diff --git a/example/grid_tutorial/11_structured_solver_hypre/hypre_structured_solver_example.cpp b/example/grid_tutorial/11_structured_solver_hypre/hypre_structured_solver_example.cpp index 8724084fd..648a1bc5c 100644 --- a/example/grid_tutorial/11_structured_solver_hypre/hypre_structured_solver_example.cpp +++ b/example/grid_tutorial/11_structured_solver_hypre/hypre_structured_solver_example.cpp @@ -183,8 +183,8 @@ int main( int argc, char* argv[] ) The hypre solver capabilities used by Cabana must be initialized and finalized. HYPRE_Finalize() finalizes hypre. A call to HYPRE_Finalize() should not occur before all calls to hypre - capabilites are finished. This call is placed outside the hypre solver - function to ensure the hypre objects are out of scope + capabilities are finished. This call is placed outside the hypre + solver function to ensure the hypre objects are out of scope */ HYPRE_Finalize(); } diff --git a/example/grid_tutorial/12_halo/halo_example.cpp b/example/grid_tutorial/12_halo/halo_example.cpp index 7d00947f1..17d40f224 100644 --- a/example/grid_tutorial/12_halo/halo_example.cpp +++ b/example/grid_tutorial/12_halo/halo_example.cpp @@ -121,7 +121,7 @@ void gridHaloExample() /* Create a halo. Note that this is done with the array data and that no - communication has occured yet. The halo width (within the value + communication has occurred yet. The halo width (within the value allocated) is also passed, together with options for the type of communication: - Node pattern communicates with 26 MPI neighbors in 3D (8 in 2D) diff --git a/example/grid_tutorial/15_interpolation/interpolation_example.cpp b/example/grid_tutorial/15_interpolation/interpolation_example.cpp index 41ed57da6..ba7e9c0c6 100644 --- a/example/grid_tutorial/15_interpolation/interpolation_example.cpp +++ b/example/grid_tutorial/15_interpolation/interpolation_example.cpp @@ -218,7 +218,7 @@ void interpolationExample() * particle maps to several grid points), which requires an underlying * Kokkos::ScatterView for the data being interpolated. Of note, a * thread-level interface provides methods to perform interpolations for a - * single particle datum to neighboring mesh entitites. + * single particle datum to neighboring mesh entities. * * Cabana::Grid also provides a convenience interface for defining * field-based P2G or G2P operators, by wrapping the thread-level @@ -258,7 +258,7 @@ void interpolationExample() auto scalar_view = scalar_grid_field->view(); // Print out a random grid point before value interpolation. - std::cout << "Invididual grid point at (5, 5):\n\tbefore " + std::cout << "Individual grid point at (5, 5):\n\tbefore " "p2g::value interpolation: " << scalar_view( 5, 5, 0 ); @@ -282,7 +282,7 @@ void interpolationExample() // Print out before gradient interpolation. auto vector_view = vector_grid_field->view(); - std::cout << "Invididual grid point at (5, 5):\n\tbefore " + std::cout << "Individual grid point at (5, 5):\n\tbefore " "p2g::gradient interpolation: <"; std::cout << vector_view( 5, 5, 0 ) << ", " << vector_view( 5, 5, 1 ) << ">"; @@ -301,7 +301,7 @@ void interpolationExample() // Reset the grid to zero and print before divergence interpolation. Cabana::Grid::ArrayOp::assign( *vector_grid_field, 0.0, Cabana::Grid::Ghost() ); - std::cout << "Invididual grid point at (5, 5):\n\tbefore " + std::cout << "Individual grid point at (5, 5):\n\tbefore " "p2g::divergence interpolation: <"; std::cout << vector_view( 5, 5, 0 ) << ", " << vector_view( 5, 5, 1 ) << ">"; @@ -320,7 +320,7 @@ void interpolationExample() // Reset the grid to zero and print before vector value interpolation. Cabana::Grid::ArrayOp::assign( *vector_grid_field, 0.0, Cabana::Grid::Ghost() ); - std::cout << "Invididual grid point at (5, 5, 5):\n\tbefore " + std::cout << "Individual grid point at (5, 5, 5):\n\tbefore " "p2g::value interpolation: <"; std::cout << vector_view( 5, 5, 0 ) << ", " << vector_view( 5, 5, 1 ) << ">"; diff --git a/grid/src/Cabana_Grid_FastFourierTransform.hpp b/grid/src/Cabana_Grid_FastFourierTransform.hpp index 002b4040b..eb3d734a3 100644 --- a/grid/src/Cabana_Grid_FastFourierTransform.hpp +++ b/grid/src/Cabana_Grid_FastFourierTransform.hpp @@ -651,7 +651,7 @@ class HeffteFastFourierTransform //---------------------------------------------------------------------------// // heFFTe creation //---------------------------------------------------------------------------// -//! Creation function for heFFTe FFT with explict FFT backend. +//! Creation function for heFFTe FFT with explicit FFT backend. //! \param exec_space Kokkos execution space //! \param layout FFT entity array //! \param params FFT parameters @@ -681,7 +681,7 @@ auto createHeffteFastFourierTransform( exec_space, layout, params ); } -//! Creation function for heFFTe FFT with explict FFT backend and default +//! Creation function for heFFTe FFT with explicit FFT backend and default //! parameters. //! \param exec_space Kokkos execution space //! \param layout FFT entity array @@ -722,7 +722,7 @@ auto createHeffteFastFourierTransform( exec_space, layout ); } -//! Creation function for heFFTe FFT with explict FFT backend. +//! Creation function for heFFTe FFT with explicit FFT backend. //! \param layout FFT entity array //! \param params FFT parameters template > return highCorner( dim ) - lowCorner( dim ); } - //! \brief Get the global numer of cells in a given dimension. + //! \brief Get the global number of cells in a given dimension. //! \param dim Spatial dimension. int globalNumCell( const std::size_t dim ) const { @@ -448,7 +448,7 @@ class GlobalMesh> return highCorner( dim ) - lowCorner( dim ); } - //! \brief Get the global numer of cells in a given dimension. + //! \brief Get the global number of cells in a given dimension. //! \param dim Spatial dimension. int globalNumCell( const std::size_t dim ) const { diff --git a/grid/src/Cabana_Grid_Halo.hpp b/grid/src/Cabana_Grid_Halo.hpp index 35d36ed99..3d4b2c061 100644 --- a/grid/src/Cabana_Grid_Halo.hpp +++ b/grid/src/Cabana_Grid_Halo.hpp @@ -911,7 +911,7 @@ class Halo // The tag we use for sending to each neighbor. std::vector _send_tags; - // The tag we use for receiveing from each neighbor. + // The tag we use for receiving from each neighbor. std::vector _receive_tags; // For each neighbor, send/receive buffers for data we own. diff --git a/grid/src/Cabana_Grid_HypreSemiStructuredSolver.hpp b/grid/src/Cabana_Grid_HypreSemiStructuredSolver.hpp index ce127cb5f..280571545 100644 --- a/grid/src/Cabana_Grid_HypreSemiStructuredSolver.hpp +++ b/grid/src/Cabana_Grid_HypreSemiStructuredSolver.hpp @@ -417,7 +417,7 @@ class HypreSemiStructuredSolver } /*! - \brief Print the hypre matrix to ouput file + \brief Print the hypre matrix to output file \param prefix File prefix for where hypre output is written */ void printMatrix( const char* prefix ) @@ -426,7 +426,7 @@ class HypreSemiStructuredSolver } /*! - \brief Print the hypre LHS to ouput file + \brief Print the hypre LHS to output file \param prefix File prefix for where hypre output is written */ void printLHS( const char* prefix ) @@ -435,7 +435,7 @@ class HypreSemiStructuredSolver } /*! - \brief Print the hypre RHS to ouput file + \brief Print the hypre RHS to output file \param prefix File prefix for where hypre output is written */ void printRHS( const char* prefix ) diff --git a/grid/src/Cabana_Grid_HypreStructuredSolver.hpp b/grid/src/Cabana_Grid_HypreStructuredSolver.hpp index 28d9d7a21..4ba700890 100644 --- a/grid/src/Cabana_Grid_HypreStructuredSolver.hpp +++ b/grid/src/Cabana_Grid_HypreStructuredSolver.hpp @@ -283,7 +283,7 @@ class HypreStructuredSolver } /*! - \brief Print the hypre matrix to ouput file + \brief Print the hypre matrix to output file \param prefix File prefix for where hypre output is written */ void printMatrix( const char* prefix ) @@ -292,7 +292,7 @@ class HypreStructuredSolver } /*! - \brief Print the hypre LHS to ouput file + \brief Print the hypre LHS to output file \param prefix File prefix for where hypre output is written */ void printLHS( const char* prefix ) @@ -301,7 +301,7 @@ class HypreStructuredSolver } /*! - \brief Print the hypre RHS to ouput file + \brief Print the hypre RHS to output file \param prefix File prefix for where hypre output is written */ void printRHS( const char* prefix ) diff --git a/grid/src/Cabana_Grid_LocalMesh.hpp b/grid/src/Cabana_Grid_LocalMesh.hpp index f65f6db6b..04ed161cd 100644 --- a/grid/src/Cabana_Grid_LocalMesh.hpp +++ b/grid/src/Cabana_Grid_LocalMesh.hpp @@ -28,7 +28,7 @@ namespace Cabana namespace Grid { //---------------------------------------------------------------------------// -// Forward decalaration of local mesh. +// Forward declaration of local mesh. template class LocalMesh; diff --git a/grid/src/Cabana_Grid_ParticleGridDistributor.hpp b/grid/src/Cabana_Grid_ParticleGridDistributor.hpp index 92852e072..3e3de1242 100644 --- a/grid/src/Cabana_Grid_ParticleGridDistributor.hpp +++ b/grid/src/Cabana_Grid_ParticleGridDistributor.hpp @@ -283,7 +283,7 @@ createParticleGridDistributor( const LocalGridType& local_grid, migrating. \param force_migrate Migrate particles outside the local domain regardless of ghosted halo. - \return Whether any particle migration occured. + \return Whether any particle migration occurred. */ template bool particleGridMigrate( const LocalGridType& local_grid, @@ -332,7 +332,7 @@ bool particleGridMigrate( const LocalGridType& local_grid, migrating. \param force_migrate Migrate particles outside the local domain regardless of ghosted halo. - \return Whether any particle migration occured. + \return Whether any particle migration occurred. */ template bool particleGridMigrate( const LocalGridType& local_grid, diff --git a/grid/src/Cabana_Grid_SparseArray.hpp b/grid/src/Cabana_Grid_SparseArray.hpp index f730c54e8..4af74b1e0 100644 --- a/grid/src/Cabana_Grid_SparseArray.hpp +++ b/grid/src/Cabana_Grid_SparseArray.hpp @@ -43,7 +43,7 @@ namespace Experimental /*! \brief Entity layout for sparse array data on the local sparse mesh. - \tparam DataTypes Array memeber types (Cabana::MemberTypes) + \tparam DataTypes Array member types (Cabana::MemberTypes) \tparam EntityType Array entity type: Cell, Node, Edge, or Face \tparam MeshType Mesh type: SparseMesh \tparam SparseMapType: sparse map type @@ -63,7 +63,7 @@ class SparseArrayLayout //! Entity Type using entity_type = EntityType; - //! Array memeber types, such as Cabana::MemberTypes + //! Array member types, such as Cabana::MemberTypes using member_types = DataTypes; //! Abbreviation for Sparse Map Type @@ -513,7 +513,7 @@ class SparseArray // ------------------------------------------------------------------------ /*! - \brief Access element from cell IJK, access correponding element's + \brief Access element from cell IJK, access corresponding element's channels with extra indices \param cell_ijk Cell ID in each dimension \param ids Ids to access channels inside a data member/element @@ -546,7 +546,7 @@ class SparseArray /*! \brief Access element in a hierarchical manner, from tile IJK and then - local cell IJK, access correponding element's channels with extra indices + local cell IJK, access corresponding element's channels with extra indices \param tile_ijk Tile ID in each dimension \param local_cell_ijk Local Cell ID in each dimension \param ids Ids to access channels inside a data member/element @@ -584,7 +584,7 @@ class SparseArray /*! \brief Access element in a hierarchical manner, from 1D tile ID and then - local cell IJK, access correponding element's channels with extra indices + local cell IJK, access corresponding element's channels with extra indices \param tile_id the 1D Tile ID \param local_cell_ijk Local Cell ID in each dimension \param ids Ids to access channels inside a data member/element @@ -621,7 +621,7 @@ class SparseArray /*! \brief Access element in a hierarchical manner, from 1D tile ID and then - 1D local cell ID, access correponding element's channels with extra + 1D local cell ID, access corresponding element's channels with extra indices \param tile_id the 1D Tile ID \param cell_id the 1D Local Cell ID diff --git a/grid/src/Cabana_Grid_SparseDimPartitioner.hpp b/grid/src/Cabana_Grid_SparseDimPartitioner.hpp index 9f289bebe..56d53ee7e 100644 --- a/grid/src/Cabana_Grid_SparseDimPartitioner.hpp +++ b/grid/src/Cabana_Grid_SparseDimPartitioner.hpp @@ -583,7 +583,7 @@ class SparseDimPartitioner : public BlockPartitioner } /*! - \brief optimize the partition in three dimensions seperately + \brief optimize the partition in three dimensions separately \param is_changed label if the partition is changed after the optimization \param iter_seed seed number to choose the starting dimension of the optimization @@ -636,7 +636,7 @@ class SparseDimPartitioner : public BlockPartitioner // equal_start_point: register the beginning pos of potentially // equivalent partitions int equal_start_point = 1; - // last_point: the opimized position for the lask partition + // last_point: the optimized position for the lask partition int last_point = 0; // current_workload: the workload between [last_point, point_i) Kokkos::View current_workload( diff --git a/grid/src/Cabana_Grid_SparseHalo.hpp b/grid/src/Cabana_Grid_SparseHalo.hpp index 70a3062dc..e154e51ad 100644 --- a/grid/src/Cabana_Grid_SparseHalo.hpp +++ b/grid/src/Cabana_Grid_SparseHalo.hpp @@ -173,7 +173,7 @@ class SparseHalo // add neighbor to the list _neighbor_ranks.push_back( rank ); // set the tag to use for sending data to this neighbor - // the corresponding neighbor will have the same recieving tag + // the corresponding neighbor will have the same receiving tag _send_tags.push_back( neighbor_id( n ) ); // set the tag to use for receiving data from this neighbor // the corresponding neighbor will have the same sending tag @@ -276,7 +276,7 @@ class SparseHalo // well-prepared during construction/initialization) if ( rank == _neighbor_ranks[i] ) { - // get shared tile index spcae from local grid + // get shared tile index space from local grid _owned_tile_spaces.push_back( local_grid ->template sharedTileIndexSpace( @@ -492,7 +492,7 @@ class SparseHalo } // if the current owned share space and the neighbor's ghosted share // space is non-emty, the neighbor will send data to us and we need - // to recieve data accordingly + // to receive data accordingly if ( !( h_counting( Index::own ) == 0 || h_neighbor_counting( Index::ghost ) == 0 ) ) { @@ -547,7 +547,7 @@ class SparseHalo /*! \brief Gather data into our ghosted share space from their owners. - \tparam ExecSpace exectution space + \tparam ExecSpace execution space \tparam SparseArrayType sparse array type \tparam SparseMapType sparse map type \param exec_space execution space @@ -578,7 +578,7 @@ class SparseHalo MPI_Barrier( comm ); // ------------------------------------------------------------------ - // communicate steering (array keys) for all valid sends and recieves + // communicate steering (array keys) for all valid sends and receives std::vector steering_requests( valid_recvs.size() + valid_sends.size(), MPI_REQUEST_NULL ); const int mpi_tag_steering = 3214; @@ -716,7 +716,7 @@ class SparseHalo /*! \brief Scatter data from our ghosts to their owners using the given type of reduce operation. - \tparam ExecSpace exectution space + \tparam ExecSpace execution space \tparam ReduceOp The type of reduction functor \tparam SparseArrayType sparse array type \tparam SparseMapType sparse map type @@ -750,7 +750,7 @@ class SparseHalo MPI_Barrier( comm ); // ------------------------------------------------------------------ - // communicate steering (array keys) for all valid sends and recieves + // communicate steering (array keys) for all valid sends and receives std::vector steering_requests( valid_recvs.size() + valid_sends.size(), MPI_REQUEST_NULL ); const int mpi_tag_steering = 214; @@ -1255,7 +1255,7 @@ class SparseHalo std::vector> _valid_neighbor_ids; // sending tags std::vector _send_tags; - // receiving tages + // receiving tags std::vector _receive_tags; // owned view buffers diff --git a/grid/src/Cabana_Grid_SparseIndexSpace.hpp b/grid/src/Cabana_Grid_SparseIndexSpace.hpp index ca1d1999f..22d15d9b6 100644 --- a/grid/src/Cabana_Grid_SparseIndexSpace.hpp +++ b/grid/src/Cabana_Grid_SparseIndexSpace.hpp @@ -32,7 +32,7 @@ #include //---------------------------------------------------------------------------// -// Naming convension: +// Naming convention: // Tile ID / Tile ijk = 3D tile indexing, i.e., (i, j, k) // Tile No. = 1D number indicating the tile position in the allocated array // Tile key / Hash key = 1D number, computed with the given indexing method and @@ -157,7 +157,7 @@ constexpr int bitPack( const uint64_t mask, const uint64_t data ) \brief (Host/Device) Spread out the data bits where the corresponding bit of the mask is 1 \param mask mask value - \param data integer to be spreaded + \param data integer to be spread */ KOKKOS_INLINE_FUNCTION constexpr uint64_t bitSpread( const uint64_t mask, const int data ) @@ -743,7 +743,7 @@ class BlockMap \param size_x, size_y, size_z The size of the block (MPI rank) in each dimension (Unit: tile) \param pre_alloc_size Expected capacity of the - allocator to store the tiles when tile nums exceed the capcity + allocator to store the tiles when tile nums exceed the capacity */ BlockMap( const int size_x, const int size_y, const int size_z, const value_type pre_alloc_size ) @@ -1029,7 +1029,7 @@ class TileMap /*! \brief Compute a single number from given coordinates - \tparam Func Transfer fuctions from coords to the single number + \tparam Func Transfer functions from coords to the single number \param coords Input coordinates */ template @@ -1048,7 +1048,7 @@ class TileMap \brief Compute the coordinates from a given single number; The dimension of the coordinate is determined by the input param number - \tparam Func Transfer fuctions from the single number to coords + \tparam Func Transfer functions from the single number to coords \param key The given single number \param coords The output coordinates */ diff --git a/grid/src/Cabana_Grid_SparseLocalGrid.hpp b/grid/src/Cabana_Grid_SparseLocalGrid.hpp index db14ee554..5dec92aae 100644 --- a/grid/src/Cabana_Grid_SparseLocalGrid.hpp +++ b/grid/src/Cabana_Grid_SparseLocalGrid.hpp @@ -237,7 +237,7 @@ class LocalGrid> const std::array& off_ijk, const int halo_width ) const; - // More genearl implementations for node and cell center indices + // More general implementations for node and cell center indices // Note: In Sparse grid, each cell considers the left-most node and its cell // center as belongings, i.e., Node and Cell share the same element-to-cell // mapping, thus sharse the same interface. diff --git a/grid/unit_test/tstGlobalGrid.hpp b/grid/unit_test/tstGlobalGrid.hpp index f6f925e26..fe41d5440 100644 --- a/grid/unit_test/tstGlobalGrid.hpp +++ b/grid/unit_test/tstGlobalGrid.hpp @@ -503,7 +503,7 @@ void sparseGridTest3d() global_num_cell[Dim::K] + 1 ); } - // Check the number of edges entires + // Check the number of edges entries { // Number of I edges EXPECT_EQ( global_grid->globalNumEntity( Edge(), Dim::I ), diff --git a/grid/unit_test/tstSparseArray.hpp b/grid/unit_test/tstSparseArray.hpp index d270a1397..7a996d5d4 100644 --- a/grid/unit_test/tstSparseArray.hpp +++ b/grid/unit_test/tstSparseArray.hpp @@ -158,7 +158,7 @@ void generate_random_particles( const int particle_number, template void sparse_array_test( int par_num, EntityType entity ) { - // basic senario information + // basic scenario information constexpr int size_tile_per_dim = 32; constexpr int cell_per_tile_dim = 4; constexpr int cell_per_tile = @@ -403,7 +403,7 @@ void sparse_array_test( int par_num, EntityType entity ) template void full_occupy_test( EntityType entity ) { - // basic senario information + // basic scenario information constexpr int size_tile_per_dim = 8; constexpr int cell_per_tile_dim = 4; constexpr int cell_per_tile = diff --git a/grid/unit_test/tstSparseDimPartitioner.hpp b/grid/unit_test/tstSparseDimPartitioner.hpp index 28b87cb8f..da789bde2 100644 --- a/grid/unit_test/tstSparseDimPartitioner.hpp +++ b/grid/unit_test/tstSparseDimPartitioner.hpp @@ -91,8 +91,8 @@ void uniform_distribution_automatic_rank() } // test ownedCellsPerDimension function - // Ground truth should be the average cell num in ranks (based on the inital - // partition) + // Ground truth should be the average cell num in ranks (based on the + // initial partition) std::array cart_rank; std::array periodic_dims = { 0, 0, 0 }; int reordered_cart_ranks = 1; @@ -430,7 +430,7 @@ void random_distribution_automatic_rank( int occupy_num_per_rank, // compute workload from a sparseMap and do partition optimization partitioner.optimizePartition( sis, MPI_COMM_WORLD ); } - // use particle positions to compute teh workload on MPI ranks + // use particle positions to compute the workload on MPI ranks else { // randomly generate a fixed number of particles on each MPI rank diff --git a/grid/unit_test/tstSparseHalo.hpp b/grid/unit_test/tstSparseHalo.hpp index b8cf15681..f82888b7e 100644 --- a/grid/unit_test/tstSparseHalo.hpp +++ b/grid/unit_test/tstSparseHalo.hpp @@ -393,7 +393,7 @@ template void haloScatterAndGatherTest( ReduceOp reduce_op, EntityType entity ) { using T = float; - // general senario and grid information + // general scenario and grid information constexpr int size_tile_per_dim = 16; constexpr int cell_per_tile_dim = 4; constexpr int cell_bits_per_tile_dim = 2; @@ -478,7 +478,7 @@ void haloScatterAndGatherTest( ReduceOp reduce_op, EntityType entity ) // compute ground truth of each halo grids according to reduce-op type // the grid should have base value x assigned by the owner - // and every other ghosters assign 0.1x to the gird + // and every other ghosters assign 0.1x to the grid // x is a factor multiplied to different data members std::unordered_map ground_truth; TestData base_values{ { 1.0, 10.0, 100.0 }, 0.1f };