1 /**********
2 Copyright 1990 Regents of the University of California.  All rights reserved.
3 Author: 1985 Thomas L. Quarles
4 **********/
5 
6     /* CKTtemp(ckt)
7      * this is a driver program to iterate through all the various
8      * temperature dependency functions provided for the circuit
9      * elements in the given circuit
10      */
11 
12 #include "ngspice/ngspice.h"
13 #include "ngspice/smpdefs.h"
14 #include "ngspice/cktdefs.h"
15 #include "ngspice/const.h"
16 #include "ngspice/devdefs.h"
17 #include "ngspice/sperror.h"
18 
19 
20 int
CKTtemp(CKTcircuit * ckt)21 CKTtemp(CKTcircuit *ckt)
22 {
23     int error;
24     int i;
25 
26     ckt->CKTvt = CONSTKoverQ * ckt->CKTtemp;
27 
28     for (i=0;i<DEVmaxnum;i++) {
29         if ( DEVices[i] && DEVices[i]->DEVtemperature && ckt->CKThead[i] ) {
30             error = DEVices[i]->DEVtemperature (ckt->CKThead[i], ckt);
31             if(error) return(error);
32         }
33     }
34     return(OK);
35 }
36