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

Go to the source code of this file.

Functions

int CAPgetic (GENmodel *inModel, CKTcircuit *ckt)
 

Function Documentation

int CAPgetic ( GENmodel inModel,
CKTcircuit ckt 
)

Definition at line 16 of file capgetic.c.

20 {
21 
22  CAPmodel *model = (CAPmodel*)inModel;
23  CAPinstance *here;
24  /*
25  * grab initial conditions out of rhs array. User specified, so use
26  * external nodes to get values
27  */
28 
29  for ( ; model; model = model->CAPnextModel) {
30  for (here = model->CAPinstances; here;
31  here = here->CAPnextInstance) {
32  if (!here->CAPicGiven) {
33  here->CAPinitCond =
34  *(ckt->CKTrhs + here->CAPposNode) -
35  *(ckt->CKTrhs + here->CAPnegNode);
36  }
37  }
38  }
39  return (OK);
40 }
int CAPnegNode
Definition: capdefs.h:26
struct sCAPinstance * CAPnextInstance
Definition: capdefs.h:21
unsigned CAPicGiven
Definition: capdefs.h:45
CAPinstance * CAPinstances
Definition: capdefs.h:57
#define OK
Definition: iferrmsg.h:17
int CAPposNode
Definition: capdefs.h:25
double CAPinitCond
Definition: capdefs.h:28
static char model[32]
Definition: subckt.c:76
struct sCAPmodel * CAPnextModel
Definition: capdefs.h:55
double * CKTrhs
Definition: cktdefs.h:97