mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-08-22 13:57:32 +02:00
Fixed SMPcZeroCol
This commit is contained in:
+11
-1
@@ -724,13 +724,23 @@ SMPcZeroCol (SMPmatrix *eMatrix, int Col)
|
|||||||
|
|
||||||
Col = Matrix->ExtToIntColMap [Col] ;
|
Col = Matrix->ExtToIntColMap [Col] ;
|
||||||
|
|
||||||
|
if (eMatrix->CKTkluMODE)
|
||||||
|
{
|
||||||
|
int i ;
|
||||||
|
for (i = eMatrix->CKTkluAp [Col - 1] ; i < eMatrix->CKTkluAp [Col] ; i++)
|
||||||
|
{
|
||||||
|
eMatrix->CKTkluAx_Complex [2 * i] = 0 ;
|
||||||
|
eMatrix->CKTkluAx_Complex [2 * i + 1] = 0 ;
|
||||||
|
}
|
||||||
|
return 0 ;
|
||||||
|
} else {
|
||||||
for (Element = Matrix->FirstInCol [Col] ; Element != NULL ; Element = Element->NextInCol)
|
for (Element = Matrix->FirstInCol [Col] ; Element != NULL ; Element = Element->NextInCol)
|
||||||
{
|
{
|
||||||
Element->Real = 0.0 ;
|
Element->Real = 0.0 ;
|
||||||
Element->Imag = 0.0 ;
|
Element->Imag = 0.0 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
return spError (Matrix) ;
|
return spError (Matrix) ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user