diff --git a/examples/09_derivative/09_derivative.cpp b/examples/09_derivative/09_derivative.cpp index 8c40835a..8b7059df 100644 --- a/examples/09_derivative/09_derivative.cpp +++ b/examples/09_derivative/09_derivative.cpp @@ -43,12 +43,12 @@ template void initialize(RealView1DType& x, RealView1DType& y, ComplexView2DType& ikx, ComplexView2DType& iky, RealView3DType& u) { - using value_type = typename RealView1DType::non_const_value_type; - const auto pi = Kokkos::numbers::pi_v; - value_type Lx = 2.0 * pi, Ly = 2.0 * pi; + using value_type = typename RealView1DType::non_const_value_type; + const auto pi = Kokkos::numbers::pi_v; + const value_type Lx = 2.0 * pi, Ly = 2.0 * pi; const int nx = u.extent(2), ny = u.extent(1), nz = u.extent(0); - value_type dx = Lx / static_cast(nx), - dy = Ly / static_cast(ny); + const value_type dx = Lx / static_cast(nx), + dy = Ly / static_cast(ny); // Initialize grids auto h_x = Kokkos::create_mirror_view(x); @@ -180,7 +180,7 @@ void compute_derivative(const int nx, const int ny, const int nz, } }); - // Baclward transform u_hat -> u (=IFFT (u_hat)) + // Backward transform u_hat -> u (=IFFT (u_hat)) c2r_plan.execute(u_hat, u); // normalization is made here exec.fence(); seconds = timer.seconds(); @@ -190,7 +190,7 @@ void compute_derivative(const int nx, const int ny, const int nz, auto h_dudxy = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(), dudxy); - double epsilon = 1.e-8; + const double epsilon = 1.e-8; for (int iz = 0; iz < nz; ++iz) { for (int iy = 0; iy < ny; ++iy) { for (int ix = 0; ix < nx; ++ix) {