Jspice3
tratemp.c
Go to the documentation of this file.
1 /**********
2 Copyright 1990 Regents of the University of California. All rights reserved.
3 Author: 1985 Thomas L. Quarles
4 **********/
5 
6 #include "spice.h"
7 #include <stdio.h>
8 #include "tradefs.h"
9 #include "sperror.h"
10 #include "util.h"
11 
12 
13 /* ARGSUSED */
14 int
15 TRAtemp(inModel,ckt)
16 
17 GENmodel *inModel;
18 CKTcircuit *ckt;
19  /*
20  * pre-process parameters for later use
21  */
22 {
23  TRAmodel *model = (TRAmodel *)inModel;
24  TRAinstance *here;
25 
26  /* loop through all the transmission line models */
27  for( ; model != NULL; model = model->TRAnextModel ) {
28 
29  /* loop through all the instances of the model */
30  for (here = model->TRAinstances; here != NULL ;
31  here=here->TRAnextInstance) {
32 
33  if(!here->TRAtdGiven) {
34  here->TRAtd = here->TRAnl/here->TRAf;
35  }
36  here->TRAconduct = 1/here->TRAimped;
37  }
38  }
39  return(OK);
40 }
struct sTRAinstance * TRAnextInstance
Definition: tradefs.h:20
TRAinstance * TRAinstances
Definition: tradefs.h:89
unsigned TRAtdGiven
Definition: tradefs.h:71
struct sTRAmodel * TRAnextModel
Definition: tradefs.h:87
double TRAimped
Definition: tradefs.h:30
int TRAtemp(GENmodel *inModel, CKTcircuit *ckt)
Definition: tratemp.c:15
double TRAtd
Definition: tradefs.h:32
double TRAnl
Definition: tradefs.h:33
double TRAf
Definition: tradefs.h:34
#define OK
Definition: iferrmsg.h:17
#define NULL
Definition: spdefs.h:121
static char model[32]
Definition: subckt.c:76
double TRAconduct
Definition: tradefs.h:31