Jspice3
Main Page
Data Structures
Files
File List
Globals
capgetic.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 "
util.h
"
12
#include "
sperror.h
"
13
14
15
int
16
CAPgetic
(inModel,ckt)
17
18
GENmodel
*inModel;
19
CKTcircuit
*ckt;
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
}
41
sCAPinstance::CAPnegNode
int CAPnegNode
Definition:
capdefs.h:26
sCAPinstance::CAPnextInstance
struct sCAPinstance * CAPnextInstance
Definition:
capdefs.h:21
CKTcircuit
Definition:
cktdefs.h:62
capdefs.h
CAPgetic
int CAPgetic(GENmodel *inModel, CKTcircuit *ckt)
Definition:
capgetic.c:16
sCAPinstance
Definition:
capdefs.h:19
sCAPinstance::CAPicGiven
unsigned CAPicGiven
Definition:
capdefs.h:45
sCAPmodel
Definition:
capdefs.h:53
sCAPmodel::CAPinstances
CAPinstance * CAPinstances
Definition:
capdefs.h:57
OK
#define OK
Definition:
iferrmsg.h:17
sperror.h
sCAPinstance::CAPposNode
int CAPposNode
Definition:
capdefs.h:25
sCAPinstance::CAPinitCond
double CAPinitCond
Definition:
capdefs.h:28
util.h
spice.h
sGENmodel
Definition:
gendefs.h:39
model
static char model[32]
Definition:
subckt.c:76
sCAPmodel::CAPnextModel
struct sCAPmodel * CAPnextModel
Definition:
capdefs.h:55
CKTcircuit::CKTrhs
double * CKTrhs
Definition:
cktdefs.h:97
src
lib
dev
cap
capgetic.c
Generated by
1.8.11