Jspice3
indic.c File Reference
#include "spice.h"
#include <stdio.h>
#include "inddefs.h"
#include "util.h"
#include "sperror.h"
Include dependency graph for indic.c:

Go to the source code of this file.

Functions

int INDgetic (GENmodel *inModel, CKTcircuit *ckt)
 

Function Documentation

int INDgetic ( GENmodel inModel,
CKTcircuit ckt 
)

Definition at line 15 of file indic.c.

19 {
20 
21  INDmodel *model = (INDmodel*)inModel;
22  INDinstance *here;
23  /*
24  * Assign initial conditions to rhs array. User specified, so use
25  * external nodes to get values
26  */
27 
28  for ( ; model; model = model->INDnextModel) {
29  for (here = model->INDinstances; here;
30  here = here->INDnextInstance) {
31 
32  if (here->INDicGiven) {
33  *(ckt->CKTrhs + here->INDbrEq) = here->INDinitCond;
34  }
35  }
36  }
37  return (OK);
38 }
struct sINDmodel * INDnextModel
Definition: inddefs.h:96
struct sINDinstance * INDnextInstance
Definition: inddefs.h:27
#define OK
Definition: iferrmsg.h:17
INDinstance * INDinstances
Definition: inddefs.h:99
unsigned INDicGiven
Definition: inddefs.h:82
static char model[32]
Definition: subckt.c:76
double INDinitCond
Definition: inddefs.h:54
int INDbrEq
Definition: inddefs.h:42
double * CKTrhs
Definition: cktdefs.h:97