other fixes
This commit is contained in:
parent
5dc9605e3f
commit
ed17c28db2
|
|
@ -454,19 +454,20 @@ SMPnewMatrix (SMPmatrix *Matrix, int size)
|
||||||
void
|
void
|
||||||
SMPdestroy (SMPmatrix *Matrix)
|
SMPdestroy (SMPmatrix *Matrix)
|
||||||
{
|
{
|
||||||
|
spDestroy (Matrix->SPmatrix) ;
|
||||||
|
|
||||||
if (Matrix->CKTkluMODE)
|
if (Matrix->CKTkluMODE)
|
||||||
{
|
{
|
||||||
spDestroy (Matrix->SPmatrix) ;
|
|
||||||
klu_free_numeric (&(Matrix->CKTkluNumeric), Matrix->CKTkluCommon) ;
|
klu_free_numeric (&(Matrix->CKTkluNumeric), Matrix->CKTkluCommon) ;
|
||||||
klu_free_symbolic (&(Matrix->CKTkluSymbolic), Matrix->CKTkluCommon) ;
|
klu_free_symbolic (&(Matrix->CKTkluSymbolic), Matrix->CKTkluCommon) ;
|
||||||
free (Matrix->CKTkluAp) ;
|
free (Matrix->CKTkluAp) ;
|
||||||
free (Matrix->CKTkluAi) ;
|
free (Matrix->CKTkluAi) ;
|
||||||
free (Matrix->CKTkluAx) ;
|
free (Matrix->CKTkluAx) ;
|
||||||
free (Matrix->CKTdiag_CSC) ;
|
|
||||||
free (Matrix->CKTkluIntermediate) ;
|
free (Matrix->CKTkluIntermediate) ;
|
||||||
|
free (Matrix->CKTbindStruct) ;
|
||||||
|
free (Matrix->CKTdiag_CSC) ;
|
||||||
|
free (Matrix->CKTkluAx_Complex) ;
|
||||||
free (Matrix->CKTkluIntermediate_Complex) ;
|
free (Matrix->CKTkluIntermediate_Complex) ;
|
||||||
} else {
|
|
||||||
spDestroy (Matrix->SPmatrix) ;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -532,8 +533,8 @@ SMPgetError (SMPmatrix *Matrix, int *Col, int *Row)
|
||||||
{
|
{
|
||||||
if (Matrix->CKTkluMODE)
|
if (Matrix->CKTkluMODE)
|
||||||
{
|
{
|
||||||
*Row = Matrix->SPmatrix->IntToExtRowMap [Matrix->CKTkluCommon->singular_col] ;
|
*Row = Matrix->SPmatrix->IntToExtRowMap [Matrix->CKTkluCommon->singular_col + 1] ;
|
||||||
*Col = Matrix->SPmatrix->IntToExtColMap [Matrix->CKTkluCommon->singular_col] ;
|
*Col = Matrix->SPmatrix->IntToExtColMap [Matrix->CKTkluCommon->singular_col + 1] ;
|
||||||
} else {
|
} else {
|
||||||
spWhereSingular (Matrix->SPmatrix, Row, Col) ;
|
spWhereSingular (Matrix->SPmatrix, Row, Col) ;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -106,11 +106,6 @@ CKTsetup(CKTcircuit *ckt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef KLU
|
|
||||||
if (ckt->CKTmatrix->CKTkluMODE)
|
|
||||||
SMPnnz (ckt->CKTmatrix) ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef KLU
|
#ifdef KLU
|
||||||
if (ckt->CKTmatrix->CKTkluMODE)
|
if (ckt->CKTmatrix->CKTkluMODE)
|
||||||
{
|
{
|
||||||
|
|
@ -120,6 +115,7 @@ CKTsetup(CKTcircuit *ckt)
|
||||||
int n = SMPmatSize (ckt->CKTmatrix) ;
|
int n = SMPmatSize (ckt->CKTmatrix) ;
|
||||||
ckt->CKTmatrix->CKTkluN = n ;
|
ckt->CKTmatrix->CKTkluN = n ;
|
||||||
|
|
||||||
|
SMPnnz (ckt->CKTmatrix) ;
|
||||||
int nz = ckt->CKTmatrix->CKTklunz ;
|
int nz = ckt->CKTmatrix->CKTklunz ;
|
||||||
|
|
||||||
ckt->CKTmatrix->CKTkluAp = TMALLOC (int, n + 1) ;
|
ckt->CKTmatrix->CKTkluAp = TMALLOC (int, n + 1) ;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue