Fixed KLU conversion to complex for SP Analysis

This commit is contained in:
Francesco Lannutti 2024-08-29 00:24:58 +02:00
parent ecc8990e20
commit 02a5f6691e
1 changed files with 14 additions and 0 deletions

View File

@ -760,6 +760,20 @@ SPan(CKTcircuit* ckt, int restart)
else
vsrcRoot = ckt->CKTVSRCid;
#ifdef KLU
if (ckt->CKTmatrix->CKTkluMODE)
{
/* Conversion from Real Matrix to Complex Matrix */
if (!ckt->CKTmatrix->SMPkluMatrix->KLUmatrixIsComplex)
{
for (i = 0 ; i < DEVmaxnum ; i++)
if (DEVices [i] && DEVices [i]->DEVbindCSCComplex && ckt->CKThead [i])
DEVices [i]->DEVbindCSCComplex (ckt->CKThead [i], ckt) ;
ckt->CKTmatrix->SMPkluMatrix->KLUmatrixIsComplex = KLUMatrixComplex ;
}
}
#endif
// Pre-load everything but RF Ports (these will be updated in the next cycle).
error = NIspPreload(ckt);