Fixed the AC part of the Sensitivity Analysis
This commit is contained in:
parent
48114b1e40
commit
8ac6093e34
|
|
@ -473,6 +473,16 @@ SMPdestroy (SMPmatrix *Matrix)
|
|||
free (Matrix->CKTdiag_CSC) ;
|
||||
free (Matrix->CKTkluAx_Complex) ;
|
||||
free (Matrix->CKTkluIntermediate_Complex) ;
|
||||
Matrix->CKTkluNumeric = NULL ;
|
||||
Matrix->CKTkluSymbolic = NULL ;
|
||||
Matrix->CKTkluAp = NULL ;
|
||||
Matrix->CKTkluAi = NULL ;
|
||||
Matrix->CKTkluAx = NULL ;
|
||||
Matrix->CKTkluIntermediate = NULL ;
|
||||
Matrix->CKTbindStruct = NULL ;
|
||||
Matrix->CKTdiag_CSC = NULL ;
|
||||
Matrix->CKTkluAx_Complex = NULL ;
|
||||
Matrix->CKTkluIntermediate_Complex = NULL ;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -375,20 +375,23 @@ int sens_sens(CKTcircuit *ckt, int restart)
|
|||
if (error)
|
||||
return error;
|
||||
|
||||
//#ifdef KLU
|
||||
// if (ckt->CKTmatrix->CKTkluMODE)
|
||||
// {
|
||||
// /* Conversion from Real Matrix to Complex Matrix */
|
||||
// if (!ckt->CKTmatrix->CKTkluMatrixIsComplex)
|
||||
// {
|
||||
// for (i = 0; i < DEVmaxnum; i++)
|
||||
// if (DEVices [i] && DEVices [i]->DEVbindCSCComplex && ckt->CKThead [i])
|
||||
// DEVices [i]->DEVbindCSCComplex (ckt->CKThead [i], ckt);
|
||||
//
|
||||
// ckt->CKTmatrix->CKTkluMatrixIsComplex = CKTkluMatrixComplex;
|
||||
// }
|
||||
// }
|
||||
//#endif
|
||||
#ifdef KLU
|
||||
if (ckt->CKTmatrix->CKTkluMODE)
|
||||
{
|
||||
/* ReOrder */
|
||||
error = SMPpreOrder (ckt->CKTmatrix);
|
||||
|
||||
/* Conversion from Real Matrix to Complex Matrix */
|
||||
if (!ckt->CKTmatrix->CKTkluMatrixIsComplex)
|
||||
{
|
||||
for (i = 0; i < DEVmaxnum; i++)
|
||||
if (DEVices [i] && DEVices [i]->DEVbindCSCComplex && ckt->CKThead [i])
|
||||
DEVices [i]->DEVbindCSCComplex (ckt->CKThead [i], ckt);
|
||||
|
||||
ckt->CKTmatrix->CKTkluMatrixIsComplex = CKTkluMatrixComplex;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
error = NIacIter(ckt);
|
||||
if (error)
|
||||
|
|
|
|||
Loading…
Reference in New Issue