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

Go to the source code of this file.

Functions

int DIOgetic (GENmodel *inModel, CKTcircuit *ckt)
 

Function Documentation

int DIOgetic ( GENmodel inModel,
CKTcircuit ckt 
)

Definition at line 15 of file diogetic.c.

19 {
20  DIOmodel *model = (DIOmodel*)inModel;
21  DIOinstance *here;
22  /*
23  * grab initial conditions out of rhs array. User specified, so use
24  * external nodes to get values
25  */
26 
27  for ( ; model; model = model->DIOnextModel) {
28  for (here = model->DIOinstances; here;
29  here = here->DIOnextInstance) {
30 
31  if (!here->DIOinitCondGiven) {
32  here->DIOinitCond =
33  *(ckt->CKTrhs + here->DIOposNode) -
34  *(ckt->CKTrhs + here->DIOnegNode);
35  }
36  }
37  }
38  return (OK);
39 }
struct sDIOinstance * DIOnextInstance
Definition: diodefs.h:20
#define OK
Definition: iferrmsg.h:17
DIOinstance * DIOinstances
Definition: diodefs.h:121
unsigned DIOinitCondGiven
Definition: diodefs.h:44
struct sDIOmodel * DIOnextModel
Definition: diodefs.h:119
static char model[32]
Definition: subckt.c:76
int DIOnegNode
Definition: diodefs.h:25
int DIOposNode
Definition: diodefs.h:24
double * CKTrhs
Definition: cktdefs.h:97
double DIOinitCond
Definition: diodefs.h:49