Implement klu_z_print()
This commit is contained in:
parent
ea52cd7ba0
commit
9481013fe0
|
|
@ -840,6 +840,26 @@ void *klu_l_malloc (size_t, size_t, klu_l_common *) ;
|
|||
void *klu_l_free (void *, size_t, size_t, klu_l_common *) ;
|
||||
void *klu_l_realloc (size_t, size_t, size_t, void *, klu_l_common *) ;
|
||||
|
||||
int klu_print
|
||||
(
|
||||
int *Ap,
|
||||
int *Ai,
|
||||
double *Ax,
|
||||
int n,
|
||||
int *IntToExtRowMap,
|
||||
int *IntToExtColMap
|
||||
) ;
|
||||
|
||||
int klu_z_print
|
||||
(
|
||||
int *Ap,
|
||||
int *Ai,
|
||||
double *Ax,
|
||||
int n,
|
||||
int *IntToExtRowMap,
|
||||
int *IntToExtColMap
|
||||
) ;
|
||||
|
||||
|
||||
/* ========================================================================== */
|
||||
/* === KLU version ========================================================== */
|
||||
|
|
|
|||
|
|
@ -427,3 +427,34 @@ Int KLU_extract_Udiag /* returns TRUE if successful, FALSE otherwise */
|
|||
|
||||
return (TRUE) ;
|
||||
}
|
||||
|
||||
Int KLU_print
|
||||
(
|
||||
Int *Ap,
|
||||
Int *Ai,
|
||||
double *Ax,
|
||||
int n,
|
||||
int *IntToExtRowMap,
|
||||
int *IntToExtColMap
|
||||
)
|
||||
{
|
||||
Entry *Az ;
|
||||
int i, j ;
|
||||
|
||||
Az = (Entry *)Ax ;
|
||||
for (i = 0 ; i < n ; i++)
|
||||
{
|
||||
for (j = Ap [i] ; j < Ap [i + 1] ; j++)
|
||||
{
|
||||
|
||||
#ifdef COMPLEX
|
||||
fprintf (stderr, "Row: %d\tCol: %d\tValue: %-.9g j%-.9g\n", IntToExtRowMap [Ai [j] + 1], IntToExtColMap [i + 1], Az [j].Real, Az [j].Imag) ;
|
||||
#else
|
||||
fprintf (stderr, "Row: %d\tCol: %d\tValue: %-.9g\n", IntToExtRowMap [Ai [j] + 1], IntToExtColMap [i + 1], Az [j]) ;
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@
|
|||
#define KLU_extract_Udiag klu_z_extract_Udiag
|
||||
#define KLU_condest klu_z_condest
|
||||
#define KLU_flops klu_z_flops
|
||||
#define KLU_print klu_z_print
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -136,6 +137,7 @@
|
|||
#define KLU_extract_Udiag klu_extract_Udiag
|
||||
#define KLU_condest klu_condest
|
||||
#define KLU_flops klu_flops
|
||||
#define KLU_print klu_print
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -521,8 +521,10 @@ SMPprintRHS (SMPmatrix *Matrix, char *Filename, RealVector RHS, RealVector iRHS)
|
|||
void
|
||||
SMPprint (SMPmatrix *Matrix, char *Filename)
|
||||
{
|
||||
if (!Matrix->CKTkluMODE)
|
||||
if (Matrix->CKTkluMODE)
|
||||
{
|
||||
klu_z_print (Matrix->CKTkluAp, Matrix->CKTkluAi, Matrix->CKTkluAx_Complex, Matrix->CKTkluN, Matrix->SPmatrix->IntToExtRowMap, Matrix->SPmatrix->IntToExtColMap) ;
|
||||
} else {
|
||||
if (Filename)
|
||||
spFileMatrix (Matrix->SPmatrix, Filename, "Circuit Matrix", 0, 1, 1) ;
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue