Browse Source

SMPnewMatrix(), add 'size' to the function arguments

pre-master-46
rlar 9 years ago
parent
commit
fb4f462388
  1. 2
      src/include/ngspice/smpdefs.h
  2. 2
      src/maths/ni/niinit.c
  3. 4
      src/maths/sparse/spsmp.c

2
src/include/ngspice/smpdefs.h

@ -27,7 +27,7 @@ void SMPcaSolve(SMPmatrix *Matrix, double RHS[], double iRHS[],
void SMPcSolve( SMPmatrix *, double [], double [], double [], double []);
void SMPsolve( SMPmatrix *, double [], double []);
int SMPmatSize( SMPmatrix *);
int SMPnewMatrix( SMPmatrix ** );
int SMPnewMatrix( SMPmatrix **, int );
void SMPdestroy( SMPmatrix *);
int SMPpreOrder( SMPmatrix *);
void SMPprint( SMPmatrix * , char *);

2
src/maths/ni/niinit.c

@ -25,5 +25,5 @@ NIinit(CKTcircuit *ckt)
int Error;
#endif /* SPARSE */
ckt->CKTniState = NIUNINITIALIZED;
return(SMPnewMatrix( &(ckt->CKTmatrix) ) );
return SMPnewMatrix(&(ckt->CKTmatrix), 0);
}

4
src/maths/sparse/spsmp.c

@ -249,10 +249,10 @@ SMPmatSize(SMPmatrix *Matrix)
* SMPnewMatrix()
*/
int
SMPnewMatrix(SMPmatrix **pMatrix)
SMPnewMatrix(SMPmatrix **pMatrix, int size)
{
int Error;
*pMatrix = spCreate( 0, 1, &Error );
*pMatrix = spCreate( size, 1, &Error );
return Error;
}

Loading…
Cancel
Save