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

Go to the source code of this file.

Functions

int CAPacLoad (GENmodel *inModel, CKTcircuit *ckt)
 

Function Documentation

int CAPacLoad ( GENmodel inModel,
CKTcircuit ckt 
)

Definition at line 15 of file capacld.c.

19 {
20  CAPmodel *model = (CAPmodel*)inModel;
21  double val;
22  CAPinstance *here;
23 
24  for ( ; model != NULL; model = model->CAPnextModel) {
25  for (here = model->CAPinstances; here != NULL;
26  here = here->CAPnextInstance) {
27 
28  val = ckt->CKTomega * here->CAPcapac;
29  *(here->CAPposPosptr +1) += val;
30  *(here->CAPnegNegptr +1) += val;
31  *(here->CAPposNegptr +1) -= val;
32  *(here->CAPnegPosptr +1) -= val;
33  }
34  }
35  return (OK);
36 }
double * CAPnegPosptr
Definition: capdefs.h:40
struct sCAPinstance * CAPnextInstance
Definition: capdefs.h:21
double * CAPposNegptr
Definition: capdefs.h:38
CAPinstance * CAPinstances
Definition: capdefs.h:57
#define OK
Definition: iferrmsg.h:17
double * CAPposPosptr
Definition: capdefs.h:34
#define NULL
Definition: spdefs.h:121
double CKTomega
Definition: cktdefs.h:198
static char model[32]
Definition: subckt.c:76
double * CAPnegNegptr
Definition: capdefs.h:36
double CAPcapac
Definition: capdefs.h:27
struct sCAPmodel * CAPnextModel
Definition: capdefs.h:55