Skip to content

Commit

Permalink
Merge pull request #1929 from ndellingwood/fix-pair
Browse files Browse the repository at this point in the history
Test_ODE_Newton: Add template parameters for Kokkos::pair
  • Loading branch information
ndellingwood authored Aug 3, 2023
2 parents fe9a5ac + 8a7a48a commit 1bca364
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions ode/unit_test/Test_ODE_Newton.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,24 @@ struct NewtonSolve_wrapper {
void operator()(const int idx) const {
// Take subviews to create the local problem
auto local_x = Kokkos::subview(
x, Kokkos::pair(my_nls.neqs * idx, my_nls.neqs * (idx + 1)));
x, Kokkos::pair<int, int>(static_cast<int>(my_nls.neqs * idx),
static_cast<int>(my_nls.neqs * (idx + 1))));
auto local_rhs = Kokkos::subview(
rhs, Kokkos::pair(my_nls.neqs * idx, my_nls.neqs * (idx + 1)));
rhs, Kokkos::pair<int, int>(static_cast<int>(my_nls.neqs * idx),
static_cast<int>(my_nls.neqs * (idx + 1))));
auto local_update = Kokkos::subview(
update, Kokkos::pair(my_nls.neqs * idx, my_nls.neqs * (idx + 1)));
update,
Kokkos::pair<int, int>(static_cast<int>(my_nls.neqs * idx),
static_cast<int>(my_nls.neqs * (idx + 1))));
auto local_J = Kokkos::subview(
J, Kokkos::pair(my_nls.neqs * idx, my_nls.neqs * (idx + 1)),
J,
Kokkos::pair<int, int>(static_cast<int>(my_nls.neqs * idx),
static_cast<int>(my_nls.neqs * (idx + 1))),
Kokkos::ALL());
auto local_tmp = Kokkos::subview(
tmp, Kokkos::pair(my_nls.neqs * idx, my_nls.neqs * (idx + 1)),
tmp,
Kokkos::pair<int, int>(static_cast<int>(my_nls.neqs * idx),
static_cast<int>(my_nls.neqs * (idx + 1))),
Kokkos::ALL());

// Run Newton nonlinear solver
Expand Down

0 comments on commit 1bca364

Please sign in to comment.