Jspice3
indic.c
Go to the documentation of this file.
1 /***************************************************************************
2 JSPICE3 adaptation of Spice3f2 - Copyright (c) Stephen R. Whiteley 1992
3 Copyright 1990 Regents of the University of California. All rights reserved.
4 Authors: 1993 Stephen R. Whiteley
5 ****************************************************************************/
6 
7 #include "spice.h"
8 #include <stdio.h>
9 #include "inddefs.h"
10 #include "util.h"
11 #include "sperror.h"
12 
13 
14 int
15 INDgetic(inModel,ckt)
16 
17 GENmodel *inModel;
18 CKTcircuit *ckt;
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 }
39 
40 
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
int INDgetic(GENmodel *inModel, CKTcircuit *ckt)
Definition: indic.c:15
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