Jspice3
Main Page
Data Structures
Files
File List
Globals
diogetic.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 "
diodefs.h
"
11
#include "
sperror.h
"
12
13
14
int
15
DIOgetic
(inModel,ckt)
16
17
GENmodel
*inModel;
18
CKTcircuit
*ckt;
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
}
diodefs.h
CKTcircuit
Definition:
cktdefs.h:62
sDIOinstance
Definition:
diodefs.h:18
sDIOinstance::DIOnextInstance
struct sDIOinstance * DIOnextInstance
Definition:
diodefs.h:20
OK
#define OK
Definition:
iferrmsg.h:17
sDIOmodel::DIOinstances
DIOinstance * DIOinstances
Definition:
diodefs.h:121
sperror.h
sDIOinstance::DIOinitCondGiven
unsigned DIOinitCondGiven
Definition:
diodefs.h:44
sDIOmodel
Definition:
diodefs.h:117
DIOgetic
int DIOgetic(GENmodel *inModel, CKTcircuit *ckt)
Definition:
diogetic.c:15
sDIOmodel::DIOnextModel
struct sDIOmodel * DIOnextModel
Definition:
diodefs.h:119
spice.h
sGENmodel
Definition:
gendefs.h:39
model
static char model[32]
Definition:
subckt.c:76
sDIOinstance::DIOnegNode
int DIOnegNode
Definition:
diodefs.h:25
sDIOinstance::DIOposNode
int DIOposNode
Definition:
diodefs.h:24
CKTcircuit::CKTrhs
double * CKTrhs
Definition:
cktdefs.h:97
sDIOinstance::DIOinitCond
double DIOinitCond
Definition:
diodefs.h:49
src
lib
dev
dio
diogetic.c
Generated by
1.8.11