Jspice3
Main Page
Data Structures
Files
File List
Globals
indacld.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 "
inddefs.h
"
11
#include "
sperror.h
"
12
#include "
cktext.h
"
13
14
15
int
16
INDacLoad
(inModel,ckt)
17
18
GENmodel
*inModel;
19
CKTcircuit
*ckt;
20
{
21
INDmodel
*
model
= (
INDmodel
*)inModel;
22
INDinstance
*here;
23
double
val;
24
25
#ifdef MUTUAL
26
MUTmodel
*mutmodel;
27
MUTinstance
*muthere;
28
29
mutmodel = (
MUTmodel
*)model->
INDmutModels
;
30
for ( ; mutmodel !=
NULL
; mutmodel = mutmodel->
MUTnextModel
) {
31
for
(muthere = mutmodel->
MUTinstances
; muthere !=
NULL
;
32
muthere = muthere->
MUTnextInstance
) {
33
34
val = ckt->
CKTomega
* muthere->
MUTfactor
;
35
*(muthere->
MUTbr1br2
+1) -= val;
36
*(muthere->
MUTbr2br1
+1) -= val;
37
}
38
}
39
#endif
/* MUTUAL */
40
41
for
( ; model !=
NULL
; model = model->
INDnextModel
) {
42
for
(here = model->
INDinstances
; here !=
NULL
;
43
here = here->
INDnextInstance
) {
44
45
val = ckt->
CKTomega
* here->
INDinduct
;
46
*(here->
INDposIbrptr
) += 1;
47
*(here->
INDnegIbrptr
) -= 1;
48
*(here->
INDibrPosptr
) += 1;
49
*(here->
INDibrNegptr
) -= 1;
50
*(here->
INDibrIbrptr
+1) -= val;
51
}
52
}
53
return
(
OK
);
54
}
sMUTmodel
Definition:
inddefs.h:194
sINDmodel::INDnextModel
struct sINDmodel * INDnextModel
Definition:
inddefs.h:96
INDacLoad
int INDacLoad(GENmodel *inModel, CKTcircuit *ckt)
Definition:
indacld.c:16
sINDinstance::INDnextInstance
struct sINDinstance * INDnextInstance
Definition:
inddefs.h:27
sINDinstance::INDibrNegptr
double * INDibrNegptr
Definition:
inddefs.h:72
CKTcircuit
Definition:
cktdefs.h:62
sINDinstance::INDibrPosptr
double * INDibrPosptr
Definition:
inddefs.h:75
sINDmodel::INDmutModels
GENmodel * INDmutModels
Definition:
inddefs.h:106
sINDinstance::INDnegIbrptr
double * INDnegIbrptr
Definition:
inddefs.h:69
sMUTinstance
Definition:
inddefs.h:153
inddefs.h
sMUTmodel::MUTnextModel
struct sMUTmodel * MUTnextModel
Definition:
inddefs.h:200
sMUTinstance::MUTnextInstance
struct sMUTinstance * MUTnextInstance
Definition:
inddefs.h:159
OK
#define OK
Definition:
iferrmsg.h:17
sINDinstance::INDposIbrptr
double * INDposIbrptr
Definition:
inddefs.h:66
sMUTinstance::MUTbr1br2
double * MUTbr1br2
Definition:
inddefs.h:182
sMUTmodel::MUTinstances
MUTinstance * MUTinstances
Definition:
inddefs.h:203
sperror.h
sINDinstance
Definition:
inddefs.h:21
NULL
#define NULL
Definition:
spdefs.h:121
CKTcircuit::CKTomega
double CKTomega
Definition:
cktdefs.h:198
sINDmodel::INDinstances
INDinstance * INDinstances
Definition:
inddefs.h:99
sINDinstance::INDibrIbrptr
double * INDibrIbrptr
Definition:
inddefs.h:78
sMUTinstance::MUTfactor
double MUTfactor
Definition:
inddefs.h:168
spice.h
sGENmodel
Definition:
gendefs.h:39
model
static char model[32]
Definition:
subckt.c:76
cktext.h
sINDmodel
Definition:
inddefs.h:90
sMUTinstance::MUTbr2br1
double * MUTbr2br1
Definition:
inddefs.h:183
sINDinstance::INDinduct
double INDinduct
Definition:
inddefs.h:51
src
lib
dev
ind
indacld.c
Generated by
1.8.11