Skip to content

Commit

Permalink
amesos2(KLU2): enhance standalone testing
Browse files Browse the repository at this point in the history
  • Loading branch information
uliegecsm committed Sep 8, 2023
1 parent 7057688 commit 80441c8
Show file tree
Hide file tree
Showing 7 changed files with 204 additions and 210 deletions.
61 changes: 0 additions & 61 deletions packages/amesos2/src/KLU2/Include/klu2_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,67 +198,6 @@ size_t KLU_kernel_factor /* 0 if failure, size of LU if OK */
KLU_common<Entry, Int> *Common /* the control input/output structure */
) ;

template <typename Entry, typename Int>
void KLU_lsolve
(
/* inputs, not modified: */
Int n,
Int Lp [ ],
Int Li [ ],
Unit LU [ ],
Int nrhs,
/* right-hand-side on input, solution to Lx=b on output */
Entry X [ ]
) ;

template <typename Entry, typename Int>
void KLU_ltsolve
(
/* inputs, not modified: */
Int n,
Int Lp [ ],
Int Li [ ],
Unit LU [ ],
Int nrhs,
#ifdef COMPLEX
Int conj_solve,
#endif
/* right-hand-side on input, solution to L'x=b on output */
Entry X [ ]
) ;


template <typename Entry, typename Int>
void KLU_usolve
(
/* inputs, not modified: */
Int n,
Int Up [ ],
Int Ui [ ],
Unit LU [ ],
Entry Udiag [ ],
Int nrhs,
/* right-hand-side on input, solution to Ux=b on output */
Entry X [ ]
) ;

template <typename Entry, typename Int>
void KLU_utsolve
(
/* inputs, not modified: */
Int n,
Int Up [ ],
Int Ui [ ],
Unit LU [ ],
Entry Udiag [ ],
Int nrhs,
#ifdef COMPLEX /* TODO : Need to fix this */
Int conj_solve,
#endif
/* right-hand-side on input, solution to U'x=b on output */
Entry X [ ]
) ;

template <typename Entry, typename Int>
Int KLU_valid
(
Expand Down
4 changes: 2 additions & 2 deletions packages/amesos2/src/KLU2/Source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ klu2_memory.hpp
)

#
# C) Define the targets for package's example
# C) Define the targets for package's test
#

TRIBITS_ADD_EXAMPLE_DIRECTORIES(examples)
TRIBITS_ADD_TEST_DIRECTORIES(tests)
127 changes: 0 additions & 127 deletions packages/amesos2/src/KLU2/Source/examples/klu2_simple.cpp

This file was deleted.

31 changes: 17 additions & 14 deletions packages/amesos2/src/KLU2/Source/klu2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,13 @@ template <typename Entry, typename Int>
void KLU_lsolve
(
/* inputs, not modified: */
Int n,
Int Lip [ ],
Int Llen [ ],
Unit LU [ ],
Int nrhs,
const Int n,
const Int *Lip,
const Int *Llen,
Unit *LU,
const Int nrhs,
/* right-hand-side on input, solution to Lx=b on output */
Entry X [ ]
Entry *X
)
{
Entry x [4], lik ;
Expand Down Expand Up @@ -327,6 +327,9 @@ void KLU_lsolve
}
break ;

default:
throw std::domain_error("More than 4 right-hand sides is not supported.");

}
}

Expand All @@ -344,8 +347,8 @@ void KLU_usolve
(
/* inputs, not modified: */
Int n,
Int Uip [ ],
Int Ulen [ ],
const Int Uip [ ],
const Int Ulen [ ],
Unit LU [ ],
Entry Udiag [ ],
Int nrhs,
Expand Down Expand Up @@ -478,8 +481,8 @@ void KLU_ltsolve
(
/* inputs, not modified: */
Int n,
Int Lip [ ],
Int Llen [ ],
const Int Lip [ ],
const Int Llen [ ],
Unit LU [ ],
Int nrhs,
#ifdef COMPLEX
Expand Down Expand Up @@ -631,11 +634,11 @@ template <typename Entry, typename Int>
void KLU_utsolve
(
/* inputs, not modified: */
Int n,
Int Uip [ ],
Int Ulen [ ],
const Int n,
const Int Uip [ ],
const Int Ulen [ ],
Unit LU [ ],
Entry Udiag [ ],
const Entry Udiag [ ],
Int nrhs,
#ifdef COMPLEX
Int conj_solve,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TRIBITS_ADD_EXECUTABLE_AND_TEST(
klu2_simple
SOURCES klu2_simple.cpp
COMM serial
RUN_SERIAL
)
Loading

0 comments on commit 80441c8

Please sign in to comment.