Jspice3
Main Page
Data Structures
Files
File List
Globals
cappzld.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: 1985 Thomas L. Quarles
5
1992 Stephen R. Whiteley
6
****************************************************************************/
7
8
#include "
spice.h
"
9
#include <stdio.h>
10
#include "
capdefs.h
"
11
#include "
sperror.h
"
12
13
14
/* ARGSUSED */
15
int
16
CAPpzLoad
(inModel,ckt,
s
)
17
18
GENmodel
*inModel;
19
CKTcircuit
*ckt;
20
SPcomplex
*
s
;
21
{
22
CAPmodel
*
model
= (
CAPmodel
*)inModel;
23
double
val;
24
CAPinstance
*here;
25
26
for
( ; model !=
NULL
; model = model->
CAPnextModel
) {
27
for
(here = model->
CAPinstances
; here !=
NULL
;
28
here = here->
CAPnextInstance
) {
29
30
val = here->
CAPcapac
;
31
*(here->
CAPposPosptr
) += val * s->
real
;
32
*(here->
CAPposPosptr
+1) += val * s->
imag
;
33
*(here->
CAPnegNegptr
) += val * s->
real
;
34
*(here->
CAPnegNegptr
+1) += val * s->
imag
;
35
*(here->
CAPposNegptr
) -= val * s->
real
;
36
*(here->
CAPposNegptr
+1) -= val * s->
imag
;
37
*(here->
CAPnegPosptr
) -= val * s->
real
;
38
*(here->
CAPnegPosptr
+1) -= val * s->
imag
;
39
}
40
}
41
return
(
OK
);
42
}
sCAPinstance::CAPnegPosptr
double * CAPnegPosptr
Definition:
capdefs.h:40
sCAPinstance::CAPnextInstance
struct sCAPinstance * CAPnextInstance
Definition:
capdefs.h:21
s
Definition:
cddefs.h:119
CAPpzLoad
int CAPpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
Definition:
cappzld.c:16
CKTcircuit
Definition:
cktdefs.h:62
capdefs.h
sCAPinstance
Definition:
capdefs.h:19
SPcomplex::real
double real
Definition:
complex.h:13
sCAPmodel
Definition:
capdefs.h:53
sCAPinstance::CAPposNegptr
double * CAPposNegptr
Definition:
capdefs.h:38
sCAPmodel::CAPinstances
CAPinstance * CAPinstances
Definition:
capdefs.h:57
OK
#define OK
Definition:
iferrmsg.h:17
sCAPinstance::CAPposPosptr
double * CAPposPosptr
Definition:
capdefs.h:34
sperror.h
NULL
#define NULL
Definition:
spdefs.h:121
spice.h
sGENmodel
Definition:
gendefs.h:39
model
static char model[32]
Definition:
subckt.c:76
sCAPinstance::CAPnegNegptr
double * CAPnegNegptr
Definition:
capdefs.h:36
SPcomplex::imag
double imag
Definition:
complex.h:14
SPcomplex
Definition:
complex.h:12
sCAPinstance::CAPcapac
double CAPcapac
Definition:
capdefs.h:27
sCAPmodel::CAPnextModel
struct sCAPmodel * CAPnextModel
Definition:
capdefs.h:55
src
lib
dev
cap
cappzld.c
Generated by
1.8.11