Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
blegouix committed Jun 17, 2024
1 parent 4cf205d commit b061d93
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions tests/splines/matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,33 +274,6 @@ TEST(Matrix, 3x3Blocks)
solve_and_validate(*matrix);
}


TEST(Matrix, PeriodicBand)
{
std::size_t const N = 10;
std::size_t const k = 3;
std::unique_ptr<ddc::detail::SplinesLinearProblem<Kokkos::DefaultExecutionSpace>> top_left_block
= std::make_unique<ddc::detail::SplinesLinearProblemBand<
Kokkos::DefaultExecutionSpace>>(N - k, k, k);
std::unique_ptr<ddc::detail::SplinesLinearProblem<Kokkos::DefaultExecutionSpace>> matrix
= std::make_unique<ddc::detail::SplinesLinearProblemPeriodicBand<
Kokkos::DefaultExecutionSpace>>(N, k, k, std::move(top_left_block));

// Build a periodic band full-rank matrix
for (std::size_t i(0); i < N; ++i) {
for (std::size_t j(0); j < N; ++j) {
std::size_t diag = std::abs((std::ptrdiff_t)j - (std::ptrdiff_t)i) % N;
if (diag == 0 || diag == N) {
matrix->set_element(i, j, 0.5);
} else if (diag <= k || diag >= N - k) {
matrix->set_element(i, j, -1.0 / k);
}
}
}

solve_and_validate(*matrix);
}

class MatrixSizesFixture : public testing::TestWithParam<std::tuple<std::size_t, std::size_t>>
{
};
Expand Down

0 comments on commit b061d93

Please sign in to comment.