From 11bcedc1e505bb62d1b62a2ae9a77294b53eb397 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Mon, 23 Sep 2024 13:27:33 -0500 Subject: [PATCH] sparsity --- test/unit/solver/test_linear_solver_policy.hpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/unit/solver/test_linear_solver_policy.hpp b/test/unit/solver/test_linear_solver_policy.hpp index d5589919d..f674e4774 100644 --- a/test/unit/solver/test_linear_solver_policy.hpp +++ b/test/unit/solver/test_linear_solver_policy.hpp @@ -217,10 +217,15 @@ void testExtremeInitialValue(std::size_t number_of_blocks, double initial_value) const size_t size = 5; auto builder = SparseMatrixPolicy::Create(size).SetNumberOfBlocks(number_of_blocks).InitialValue(1e-30); - for (std::size_t i = 0; i < size; ++i) - for (std::size_t j = 0; j < size; ++j) - if (i == j || gen_bool()) + for (std::size_t i = 0; i < size; ++i) { + for (std::size_t j = 0; j < size; ++j) { + if (i == j || gen_bool()) { + std::cout << i << ", " << j << "; "; builder = builder.WithElement(i, j); + } + } + std::cout << std::endl; + } SparseMatrixPolicy A(builder); MatrixPolicy b(number_of_blocks, size, 0.0);