Jspice3
niniter.c File Reference
#include "spice.h"
#include "cktdefs.h"
#include "niext.h"
Include dependency graph for niniter.c:

Go to the source code of this file.

Functions

void NInzIter (CKTcircuit *ckt, int posDrive, int negDrive)
 

Function Documentation

void NInzIter ( CKTcircuit ckt,
int  posDrive,
int  negDrive 
)

Definition at line 22 of file niniter.c.

27 {
28  int i, size;
29 
30  /* clear out the right hand side vector */
31  size = spGetSize(ckt->CKTmatrix,1);
32  for (i = 0; i <= size; i++) {
33  *((ckt->CKTrhs) + i) = 0.0;
34  *((ckt->CKTirhs) + i) = 0.0;
35  }
36 
37  *((ckt->CKTrhs) + posDrive) = 1.0; /* apply unit current excitation */
38  *((ckt->CKTrhs) + negDrive) = -1.0;
40  ckt->CKTrhs,ckt->CKTirhs,ckt->CKTirhs);
41  *ckt->CKTrhs = 0.0;
42  *ckt->CKTirhs = 0.0;
43 }
double * CKTirhs
Definition: cktdefs.h:100
SMPmatrix * CKTmatrix
Definition: cktdefs.h:95
int spGetSize()
void spSolveTransposed()
double * CKTrhs
Definition: cktdefs.h:97