Jspice3
b1getic.c File Reference
#include "spice.h"
#include <stdio.h>
#include "bsim1def.h"
#include "sperror.h"
Include dependency graph for b1getic.c:

Go to the source code of this file.

Functions

int B1getic (GENmodel *inModel, CKTcircuit *ckt)
 

Function Documentation

int B1getic ( GENmodel inModel,
CKTcircuit ckt 
)

Definition at line 15 of file b1getic.c.

19 {
20 
21  B1model *model = (B1model*)inModel;
22  B1instance *here;
23  /*
24  * grab initial conditions out of rhs array. User specified, so use
25  * external nodes to get values
26  */
27 
28  for( ; model ; model = model->B1nextModel) {
29  for(here = model->B1instances; here ; here = here->B1nextInstance) {
30  if(!here->B1icVBSGiven) {
31  here->B1icVBS =
32  *(ckt->CKTrhs + here->B1bNode) -
33  *(ckt->CKTrhs + here->B1sNode);
34  }
35  if(!here->B1icVDSGiven) {
36  here->B1icVDS =
37  *(ckt->CKTrhs + here->B1dNode) -
38  *(ckt->CKTrhs + here->B1sNode);
39  }
40  if(!here->B1icVGSGiven) {
41  here->B1icVGS =
42  *(ckt->CKTrhs + here->B1gNode) -
43  *(ckt->CKTrhs + here->B1sNode);
44  }
45  }
46  }
47  return(OK);
48 }
double B1icVBS
Definition: bsim1def.h:45
#define OK
Definition: iferrmsg.h:17
double B1icVGS
Definition: bsim1def.h:47
double B1icVDS
Definition: bsim1def.h:46
B1instance * B1instances
Definition: bsim1def.h:303
unsigned B1icVGSGiven
Definition: bsim1def.h:95
static char model[32]
Definition: subckt.c:76
struct sBSIM1model * B1nextModel
Definition: bsim1def.h:301
struct sBSIM1instance * B1nextInstance
Definition: bsim1def.h:22
unsigned B1icVDSGiven
Definition: bsim1def.h:94
unsigned B1icVBSGiven
Definition: bsim1def.h:93
double * CKTrhs
Definition: cktdefs.h:97