Skip to content

Commit

Permalink
Minor change in lu tests
Browse files Browse the repository at this point in the history
  • Loading branch information
romeric committed May 7, 2020
1 parent d92bf05 commit 5654474
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions tests/test_lu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ void test_factorisation() {
FASTOR_EXIT_ASSERT(std::abs(sum(A - L % U)) < BigTol);
}

// LU 33x33
// LU 33x33 - this is just to check for compilation as size 33
// is when we switch over to block recursive algorithm
{
constexpr size_t M = 33;
Tensor<size_t,M> p;
Expand All @@ -279,31 +280,16 @@ void test_factorisation() {
A(i,i) = 100+i;
}

lu(A, L, U);
FASTOR_EXIT_ASSERT(std::abs(sum(A - L % U)) < BigTol);

lu<LUCompType::BlockLU>(A, L, U);
FASTOR_EXIT_ASSERT(std::abs(sum(A - L % U)) < BigTol);

lu<LUCompType::BlockLUPiv>(A, L, U, p);
FASTOR_EXIT_ASSERT(std::abs(sum(A - L % U)) < BigTol);

lu<LUCompType::BlockLUPiv>(A, L, U, P);
FASTOR_EXIT_ASSERT(std::abs(sum(A - L % U)) < BigTol);

lu<LUCompType::SimpleLU>(A, L, U);
FASTOR_EXIT_ASSERT(std::abs(sum(A - L % U)) < BigTol);

lu<LUCompType::SimpleLUPiv>(A, L, U, p);
FASTOR_EXIT_ASSERT(std::abs(sum(A - L % U)) < BigTol);

lu<LUCompType::SimpleLUPiv>(A, L, U, P);
FASTOR_EXIT_ASSERT(std::abs(sum(A - L % U)) < BigTol);
}

// LU 37x37
// LU 34x34
{
constexpr size_t M = 37;
constexpr size_t M = 34;
Tensor<size_t,M> p;
Tensor<T,M,M> L, U, P;

Expand Down

0 comments on commit 5654474

Please sign in to comment.