diff --git a/src/scheme/AcousticSolver.hpp b/src/scheme/AcousticSolver.hpp index b12da32edc122e28b318bc414dc7d1386f80b8f6..3ed9eaa3ad88661181d7d95a739c10e9cd3ae3fc 100644 --- a/src/scheme/AcousticSolver.hpp +++ b/src/scheme/AcousticSolver.hpp @@ -99,13 +99,11 @@ private: KOKKOS_INLINE_FUNCTION const Kokkos::View<const Rdd*> computeAr(const Kokkos::View<const Rdd**>& Ajr) { - const Kokkos::View<const unsigned short*> node_nb_cells = m_connectivity.nodeNbCells(); - Kokkos::parallel_for(m_mesh.numberOfNodes(), KOKKOS_LAMBDA(const int& r) { Rdd sum = zero; const auto& node_to_cell = m_connectivity.m_node_to_cell_matrix.rowConst(r); const auto& node_to_cell_local_node = m_connectivity.m_node_to_cell_local_node_matrix.rowConst(r); - for (int j=0; j<node_nb_cells(r); ++j) { + for (size_t j=0; j<node_to_cell.length; ++j) { const unsigned int J = node_to_cell(j); const unsigned int R = node_to_cell_local_node(j); sum += Ajr(J,R); @@ -122,14 +120,12 @@ private: const Kokkos::View<const Rd**>& Cjr, const Kokkos::View<const Rd*>& uj, const Kokkos::View<const double*>& pj) { - const Kokkos::View<const unsigned short*>& node_nb_cells = m_connectivity.nodeNbCells(); - Kokkos::parallel_for(m_mesh.numberOfNodes(), KOKKOS_LAMBDA(const int& r) { Rd& br = m_br(r); br = zero; const auto& node_to_cell = m_connectivity.m_node_to_cell_matrix.rowConst(r); const auto& node_to_cell_local_node = m_connectivity.m_node_to_cell_local_node_matrix.rowConst(r); - for (int j=0; j<node_nb_cells(r); ++j) { + for (size_t j=0; j<node_to_cell.length; ++j) { const unsigned int J = node_to_cell(j); const unsigned int R = node_to_cell_local_node(j); br += Ajr(J,R)*uj(J) + pj(J)*Cjr(J,R);