1 /********** 2 Copyright 1992 Regents of the University of California. All rights reserved. 3 Authors: 1992 David Gates 4 **********/ 5 6 /* Member of CIDER device simulator 7 * Version: 1b1 8 */ 9 10 #ifndef ngspice_GENDEV_H 11 #define ngspice_GENDEV_H 12 13 #include "ngspice/numenum.h" 14 15 typedef struct sStatInfo 16 { 17 double setupTime[NUM_STATTYPES]; 18 double loadTime[NUM_STATTYPES]; 19 double orderTime[NUM_STATTYPES]; 20 double factorTime[NUM_STATTYPES]; 21 double solveTime[NUM_STATTYPES]; 22 double updateTime[NUM_STATTYPES]; 23 double checkTime[NUM_STATTYPES]; 24 double miscTime[NUM_STATTYPES]; 25 double totalTime[NUM_STATTYPES]; 26 double lteTime; 27 int numIters[NUM_STATTYPES]; 28 } StatInfo; 29 typedef struct sStatInfo ONEstats; 30 typedef struct sStatInfo TWOstats; 31 typedef struct sStatInfo STATstats; 32 33 /* Transient analysis information transferred via this structure. */ 34 typedef struct sTranInfo { 35 int method; /* integration method */ 36 int order; /* integration order */ 37 int maxOrder; /* maximum order to be used */ 38 double lteCoeff; /* coefficient for calculating LTE */ 39 double intCoeff[7]; /* array of integration coefficients */ 40 double predCoeff[7]; /* array of predicted coefficients */ 41 double *delta; /* array of the time deltas */ 42 } TranInfo; 43 typedef struct sTranInfo ONEtranInfo; 44 typedef struct sTranInfo TWOtranInfo; 45 46 /* Mesh coordinates transferred via this structure */ 47 typedef struct sCoordInfo { 48 struct sCoordInfo *next; /* pointer to next mesh info */ 49 int number; /* number/position in list of coordinates */ 50 double location; /* location of node */ 51 } CoordInfo; 52 typedef struct sCoordInfo ONEcoord; 53 typedef struct sCoordInfo TWOcoord; 54 typedef struct sCoordInfo MESHcoord; 55 56 /* Generic vertex structure */ 57 typedef struct sVertexInfo { 58 struct sVertexInfo *next; /* pointer to next vertex */ 59 int ix; /* the x coordinate */ 60 int iy; /* the y coordinate */ 61 } VertexInfo; 62 typedef struct sVertexInfo ONEvertex; 63 typedef struct sVertexInfo TWOvertex; 64 65 /* Generic box structure that other box-shaped things are derived from */ 66 typedef struct sBoxInfo { 67 struct sBoxInfo *next; /* pointer to next box */ 68 int ixLo; /* the low x coordinate */ 69 int iyLo; /* the low y coordinate */ 70 int ixHi; /* the high x coordinate */ 71 int iyHi; /* the high y coordinate */ 72 } BoxInfo; 73 typedef struct sBoxInfo ONEbox; 74 typedef struct sBoxInfo TWObox; 75 76 /* Structure for domains */ 77 typedef struct sDomainInfo { 78 struct sDomainInfo *next; /* pointer to next domain */ 79 int ixLo; /* the low x coordinate */ 80 int iyLo; /* the low y coordinate */ 81 int ixHi; /* the high x coordinate */ 82 int iyHi; /* the high y coordinate */ 83 int id; /* ID number of domain */ 84 int material; /* ID of material used by domain */ 85 } DomainInfo; 86 typedef struct sDomainInfo ONEdomain; 87 typedef struct sDomainInfo TWOdomain; 88 typedef struct sDomainInfo DOMNdomain; 89 90 /* Structure used for electrodes */ 91 typedef struct sElectrodeInfo { 92 struct sElectrodeInfo *next; /* pointer to next electrode */ 93 int ixLo; /* the low x coordinate */ 94 int iyLo; /* the low y coordinate */ 95 int ixHi; /* the high x coordinate */ 96 int iyHi; /* the high y coordinate */ 97 int id; /* ID number */ 98 double workf; /* electrode work function */ 99 } ElectrodeInfo; 100 typedef struct sElectrodeInfo ONEelectrode; 101 typedef struct sElectrodeInfo TWOelectrode; 102 typedef struct sElectrodeInfo ELCTelectrode; 103 104 /* Structure used for boundaries and interfaces */ 105 typedef struct sBoundaryInfo { 106 struct sBoundaryInfo *next; /* pointer to next boundary */ 107 int ixLo; /* the low x coordinate */ 108 int iyLo; /* the low y coordinate */ 109 int ixHi; /* the high x coordinate */ 110 int iyHi; /* the high y coordinate */ 111 int domain; /* ID of primary domain */ 112 int neighbor; /* ID of neighbor domain */ 113 double qf; /* fixed charge density */ 114 double sn; /* elec surface recomb velocity */ 115 double sp; /* hole surface recomb velocity */ 116 double layer; /* surface layer width */ 117 } BoundaryInfo; 118 typedef struct sBoundaryInfo ONEboundary; 119 typedef struct sBoundaryInfo TWOboundary; 120 typedef struct sBoundaryInfo BDRYboundary; 121 122 #endif 123