Skip to content

Commit

Permalink
lu decomp
Browse files Browse the repository at this point in the history
  • Loading branch information
K20shores committed Sep 23, 2024
1 parent 29c3f78 commit 302e66c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/unit/solver/test_lu_decomposition_policy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void testDenseMatrix()
bool is_singular{ false };
lud.template Decompose<SparseMatrixPolicy>(A, LU.first, LU.second, is_singular);
check_results<double, SparseMatrixPolicy>(
A, LU.first, LU.second, [&](const double a, const double b) -> void { EXPECT_NEAR(a, b, 1.0e-5); });
A, LU.first, LU.second, [&](const double a, const double b) -> void { EXPECT_NEAR(a, b, 1.0e-10); });
}

template<class SparseMatrixPolicy, class LuDecompositionPolicy>
Expand Down Expand Up @@ -153,7 +153,7 @@ void testRandomMatrix(std::size_t number_of_blocks)
bool is_singular{ false };
lud.template Decompose<SparseMatrixPolicy>(A, LU.first, LU.second, is_singular);
check_results<double, SparseMatrixPolicy>(
A, LU.first, LU.second, [&](const double a, const double b) -> void { EXPECT_NEAR(a, b, 1.0e-5); });
A, LU.first, LU.second, [&](const double a, const double b) -> void { EXPECT_NEAR(a, b, 1.0e-10); });
}

template<class SparseMatrixPolicy, class LuDecompositionPolicy>
Expand All @@ -176,5 +176,5 @@ void testDiagonalMatrix(std::size_t number_of_blocks)
bool is_singular{ false };
lud.template Decompose<SparseMatrixPolicy>(A, LU.first, LU.second, is_singular);
check_results<double, SparseMatrixPolicy>(
A, LU.first, LU.second, [&](const double a, const double b) -> void { EXPECT_NEAR(a, b, 1.0e-5); });
A, LU.first, LU.second, [&](const double a, const double b) -> void { EXPECT_NEAR(a, b, 1.0e-10); });
}

0 comments on commit 302e66c

Please sign in to comment.