Xyce  6.1
N_DEV_ADMSbjt504tva.h
Go to the documentation of this file.
1 
2 // -*-c++-*-
3 //-----------------------------------------------------------------------------
4 // Copyright Notice
5 //
6 // Copyright 2002 Sandia Corporation. Under the terms
7 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
8 // Government retains certain rights in this software.
9 //
10 // Xyce(TM) Parallel Electrical Simulator
11 // Copyright (C) 2002-2015 Sandia Corporation
12 //
13 // This program is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // This program is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program. If not, see <http://www.gnu.org/licenses/>.
25 //-----------------------------------------------------------------------------
26 
27 //-----------------------------------------------------------------------------
28 // Filename : $RCSfile: N_DEV_ADMSbjt504tva.h,v $
29 //
30 // Purpose :
31 //
32 // Special Notes : Generated from verilog file bjt504t.va with ADMS
33 // interface for Xyce 6.4.0
34 // DO NOT EDIT THIS FILE DIRECTLY! It may be overwritten!
35 //
36 // Creator : admsXml-2.3.4
37 //
38 // Creation Date : Wed, 04 Nov 2015 14:11:21
39 //
40 // Revision Information:
41 // ---------------------
42 //
43 // Revision Number: $Revision: 1.3 $
44 //
45 // Revision Date : $Date: 2015/11/04 21:33:46 $
46 //
47 // Current Owner : $Author: tvrusso $
48 //-----------------------------------------------------------------------------
49 #ifndef Xyce_N_DEV_ADMSbjt504tva_h
50 #define Xyce_N_DEV_ADMSbjt504tva_h
51 
52 
53 #include <Sacado.hpp>
54 
55 #include <N_DEV_Configuration.h>
56 #include <N_DEV_Const.h>
57 #include <N_DEV_DeviceBlock.h>
58 #include <N_DEV_DeviceInstance.h>
59 #include <N_DEV_DeviceModel.h>
60 #include <N_DEV_BJT.h>
61 
62 
63 namespace Xyce {
64 namespace Device {
65 namespace ADMSbjt504tva {
66 
67 // This typedef is for our automatic differentiation:
68 typedef Sacado::Fad::SFad<double,16> AdmsFadType;
69 typedef Sacado::Fad::SFad<double,1> AdmsSensFadType;
70 
71 class Model;
72 class Instance;
73 class InstanceSensitivity;
74 
75 #ifdef Xyce_ADMS_SENSITIVITIES
76 //-----------------------------------------------------------------------------
77 // Class : InstanceSensitivity
78 //
79 // Purpose : This class is a functor for sensitivity
80 //
81 // Special Notes :
82 // Creator :
83 // Creation Date :
84 //-----------------------------------------------------------------------------
85 class InstanceSensitivity : public baseSensitivity
86 {
87 public:
88  InstanceSensitivity() :
89  baseSensitivity() {};
90 
91  virtual ~InstanceSensitivity() {};
92 
93  virtual void operator()(
94  const ParameterBase &entity,
95  const std::string &param,
96  std::vector<double> & dfdp,
97  std::vector<double> & dqdp,
98  std::vector<double> & dbdp,
99  std::vector<int> & Findices,
100  std::vector<int> & Qindices,
101  std::vector<int> & Bindices
102  ) const ;
103 };
104 
105 static InstanceSensitivity instSens;
106 
107 
108 //-----------------------------------------------------------------------------
109 // Class : ModelSensitivity
110 //
111 // Purpose : This class is a functor for sensitivity
112 //
113 // Special Notes :
114 // Creator :
115 // Creation Date :
116 //-----------------------------------------------------------------------------
117 class ModelSensitivity : public baseSensitivity
118 {
119 public:
120  ModelSensitivity() :
121  baseSensitivity() {};
122 
123  virtual ~ModelSensitivity() {};
124 
125  virtual void operator()(
126  const ParameterBase &entity,
127  const std::string &param,
128  std::vector<double> & dfdp,
129  std::vector<double> & dqdp,
130  std::vector<double> & dbdp,
131  std::vector<int> & Findices,
132  std::vector<int> & Qindices,
133  std::vector<int> & Bindices
134  ) const ;
135 };
136 
137 static ModelSensitivity modSens;
138 #endif // Xyce_ADMS_SENSITIVITIES
139 
140 // general purpose free functions
141 // thermal voltage at kelvin temperature temp)
142 template <typename T> static inline T adms_vt(const T temp) {return(CONSTKoverQ*temp);};
143 
144 // Figure out how to template this shiznit!
145 //-----------------------------------------------------------------------------
146 
147 
148 template<typename Tin>
149 static Tin adms_ternary_op(const bool cond, const Tin &ifTrue, const Tin &ifFalse)
150 {
151  if (cond)
152  return ifTrue;
153  else
154  return ifFalse;
155 }
156 
157 template<typename Tin>
158 static Tin adms_ternary_op(const bool cond, const Tin &ifTrue, const double &ifFalse)
159 {
160  if (cond)
161  return ifTrue;
162  else
163  return Tin(ifFalse);
164 }
165 
166 template<typename Tin>
167 static Tin adms_ternary_op(const bool cond, const double &ifTrue, const Tin &ifFalse)
168 {
169  if (cond)
170  return Tin(ifTrue);
171  else
172  return ifFalse;
173 }
174 
175 
176 
177 
178 #ifdef Xyce_ADMS_SENSITIVITIES
179 //-----------------------------------------------------------------------------
180 // Free functions used by sensitivity
181 //
182 //-----------------------------------------------------------------------------
183 void evaluateModelEquations(
184  std::vector <double> & probeVars,
185  // probe constants
186  const int admsProbeID_V_noi_e1,
187  const int admsProbeID_V_c3_c1,
188  const int admsProbeID_V_c3_c4,
189  const int admsProbeID_V_c4_c1,
190  const int admsProbeID_V_b_c,
191  const int admsProbeID_V_b_e,
192  const int admsProbeID_V_b_b1,
193  const int admsProbeID_V_e_e1,
194  const int admsProbeID_V_c1_c2,
195  const int admsProbeID_V_s_c1,
196  const int admsProbeID_V_b1_b2,
197  const int admsProbeID_V_b1_e1,
198  const int admsProbeID_V_b2_e1,
199  const int admsProbeID_V_b2_c2,
200  const int admsProbeID_V_b2_c1,
201  const int admsProbeID_V_dt_GND,
202  // node constants
203  const int admsNodeID_c,
204  const int admsNodeID_b,
205  const int admsNodeID_e,
206  const int admsNodeID_s,
207  const int admsNodeID_dt,
208  const int admsNodeID_e1,
209  const int admsNodeID_b1,
210  const int admsNodeID_b2,
211  const int admsNodeID_c3,
212  const int admsNodeID_c4,
213  const int admsNodeID_c2,
214  const int admsNodeID_c1,
215  const int admsNodeID_noi,
216  // instance parameters
217  // reals
218  AdmsSensFadType & instancePar_MULT,
219  bool instancePar_given_MULT,
220  // instance variables
221  // reals
222  AdmsSensFadType & instanceVar_Tk,
223  AdmsSensFadType & instanceVar_Izteb,
224  AdmsSensFadType & instanceVar_RE_TM,
225  AdmsSensFadType & instanceVar_RBC_TM,
226  AdmsSensFadType & instanceVar_GCCxx_TM,
227  AdmsSensFadType & instanceVar_GCCex_TM,
228  AdmsSensFadType & instanceVar_GCCin_TM,
229  AdmsSensFadType & instanceVar_KF_M,
230  AdmsSensFadType & instanceVar_KFN_M,
231  AdmsSensFadType & instanceVar_qBI,
232  AdmsSensFadType & instanceVar_Ir,
233  AdmsSensFadType & instanceVar_If,
234  AdmsSensFadType & instanceVar_Ib1,
235  AdmsSensFadType & instanceVar_Ib1_s,
236  AdmsSensFadType & instanceVar_Ib2,
237  AdmsSensFadType & instanceVar_Ib3,
238  AdmsSensFadType & instanceVar_Iex,
239  AdmsSensFadType & instanceVar_XIex,
240  AdmsSensFadType & instanceVar_Isub,
241  AdmsSensFadType & instanceVar_XIsub,
242  AdmsSensFadType & instanceVar_Rb2,
243  AdmsSensFadType & instanceVar_Gem,
244  AdmsSensFadType & instanceVar_eVb1b2,
245  // model parameters
246  // reals
247  AdmsSensFadType & modelPar_TREF,
248  bool modelPar_given_TREF,
249  AdmsSensFadType & modelPar_DTA,
250  bool modelPar_given_DTA,
251  AdmsSensFadType & modelPar_IS,
252  bool modelPar_given_IS,
253  AdmsSensFadType & modelPar_IK,
254  bool modelPar_given_IK,
255  AdmsSensFadType & modelPar_VER,
256  bool modelPar_given_VER,
257  AdmsSensFadType & modelPar_VEF,
258  bool modelPar_given_VEF,
259  AdmsSensFadType & modelPar_BF,
260  bool modelPar_given_BF,
261  AdmsSensFadType & modelPar_IBF,
262  bool modelPar_given_IBF,
263  AdmsSensFadType & modelPar_MLF,
264  bool modelPar_given_MLF,
265  AdmsSensFadType & modelPar_XIBI,
266  bool modelPar_given_XIBI,
267  AdmsSensFadType & modelPar_IZEB,
268  bool modelPar_given_IZEB,
269  AdmsSensFadType & modelPar_NZEB,
270  bool modelPar_given_NZEB,
271  AdmsSensFadType & modelPar_BRI,
272  bool modelPar_given_BRI,
273  AdmsSensFadType & modelPar_IBR,
274  bool modelPar_given_IBR,
275  AdmsSensFadType & modelPar_VLR,
276  bool modelPar_given_VLR,
277  AdmsSensFadType & modelPar_XEXT,
278  bool modelPar_given_XEXT,
279  AdmsSensFadType & modelPar_WAVL,
280  bool modelPar_given_WAVL,
281  AdmsSensFadType & modelPar_VAVL,
282  bool modelPar_given_VAVL,
283  AdmsSensFadType & modelPar_SFH,
284  bool modelPar_given_SFH,
285  AdmsSensFadType & modelPar_RE,
286  bool modelPar_given_RE,
287  AdmsSensFadType & modelPar_RBC,
288  bool modelPar_given_RBC,
289  AdmsSensFadType & modelPar_RBV,
290  bool modelPar_given_RBV,
291  AdmsSensFadType & modelPar_RCC,
292  bool modelPar_given_RCC,
293  AdmsSensFadType & modelPar_RCV,
294  bool modelPar_given_RCV,
295  AdmsSensFadType & modelPar_SCRCV,
296  bool modelPar_given_SCRCV,
297  AdmsSensFadType & modelPar_IHC,
298  bool modelPar_given_IHC,
299  AdmsSensFadType & modelPar_AXI,
300  bool modelPar_given_AXI,
301  AdmsSensFadType & modelPar_CJE,
302  bool modelPar_given_CJE,
303  AdmsSensFadType & modelPar_VDE,
304  bool modelPar_given_VDE,
305  AdmsSensFadType & modelPar_PE,
306  bool modelPar_given_PE,
307  AdmsSensFadType & modelPar_XCJE,
308  bool modelPar_given_XCJE,
309  AdmsSensFadType & modelPar_CBEO,
310  bool modelPar_given_CBEO,
311  AdmsSensFadType & modelPar_CJC,
312  bool modelPar_given_CJC,
313  AdmsSensFadType & modelPar_VDC,
314  bool modelPar_given_VDC,
315  AdmsSensFadType & modelPar_PC,
316  bool modelPar_given_PC,
317  AdmsSensFadType & modelPar_XP,
318  bool modelPar_given_XP,
319  AdmsSensFadType & modelPar_MC,
320  bool modelPar_given_MC,
321  AdmsSensFadType & modelPar_XCJC,
322  bool modelPar_given_XCJC,
323  AdmsSensFadType & modelPar_RCBLX,
324  bool modelPar_given_RCBLX,
325  AdmsSensFadType & modelPar_RCBLI,
326  bool modelPar_given_RCBLI,
327  AdmsSensFadType & modelPar_CBCO,
328  bool modelPar_given_CBCO,
329  AdmsSensFadType & modelPar_MTAU,
330  bool modelPar_given_MTAU,
331  AdmsSensFadType & modelPar_TAUE,
332  bool modelPar_given_TAUE,
333  AdmsSensFadType & modelPar_TAUB,
334  bool modelPar_given_TAUB,
335  AdmsSensFadType & modelPar_TEPI,
336  bool modelPar_given_TEPI,
337  AdmsSensFadType & modelPar_TAUR,
338  bool modelPar_given_TAUR,
339  AdmsSensFadType & modelPar_DEG,
340  bool modelPar_given_DEG,
341  AdmsSensFadType & modelPar_XREC,
342  bool modelPar_given_XREC,
343  AdmsSensFadType & modelPar_AQBO,
344  bool modelPar_given_AQBO,
345  AdmsSensFadType & modelPar_AE,
346  bool modelPar_given_AE,
347  AdmsSensFadType & modelPar_AB,
348  bool modelPar_given_AB,
349  AdmsSensFadType & modelPar_AEPI,
350  bool modelPar_given_AEPI,
351  AdmsSensFadType & modelPar_AEX,
352  bool modelPar_given_AEX,
353  AdmsSensFadType & modelPar_AC,
354  bool modelPar_given_AC,
355  AdmsSensFadType & modelPar_ACBL,
356  bool modelPar_given_ACBL,
357  AdmsSensFadType & modelPar_DVGBF,
358  bool modelPar_given_DVGBF,
359  AdmsSensFadType & modelPar_DVGBR,
360  bool modelPar_given_DVGBR,
361  AdmsSensFadType & modelPar_VGB,
362  bool modelPar_given_VGB,
363  AdmsSensFadType & modelPar_VGC,
364  bool modelPar_given_VGC,
365  AdmsSensFadType & modelPar_VGJ,
366  bool modelPar_given_VGJ,
367  AdmsSensFadType & modelPar_VGZEB,
368  bool modelPar_given_VGZEB,
369  AdmsSensFadType & modelPar_AVGEB,
370  bool modelPar_given_AVGEB,
371  AdmsSensFadType & modelPar_TVGEB,
372  bool modelPar_given_TVGEB,
373  AdmsSensFadType & modelPar_DVGTE,
374  bool modelPar_given_DVGTE,
375  AdmsSensFadType & modelPar_DAIS,
376  bool modelPar_given_DAIS,
377  AdmsSensFadType & modelPar_AF,
378  bool modelPar_given_AF,
379  AdmsSensFadType & modelPar_KF,
380  bool modelPar_given_KF,
381  AdmsSensFadType & modelPar_KFN,
382  bool modelPar_given_KFN,
383  AdmsSensFadType & modelPar_ISS,
384  bool modelPar_given_ISS,
385  AdmsSensFadType & modelPar_ICSS,
386  bool modelPar_given_ICSS,
387  AdmsSensFadType & modelPar_IKS,
388  bool modelPar_given_IKS,
389  AdmsSensFadType & modelPar_CJS,
390  bool modelPar_given_CJS,
391  AdmsSensFadType & modelPar_VDS,
392  bool modelPar_given_VDS,
393  AdmsSensFadType & modelPar_PS,
394  bool modelPar_given_PS,
395  AdmsSensFadType & modelPar_VGS,
396  bool modelPar_given_VGS,
397  AdmsSensFadType & modelPar_AS,
398  bool modelPar_given_AS,
399  AdmsSensFadType & modelPar_ASUB,
400  bool modelPar_given_ASUB,
401  AdmsSensFadType & modelPar_RTH,
402  bool modelPar_given_RTH,
403  AdmsSensFadType & modelPar_CTH,
404  bool modelPar_given_CTH,
405  AdmsSensFadType & modelPar_ATH,
406  bool modelPar_given_ATH,
407  AdmsSensFadType & modelPar_MULT,
408  bool modelPar_given_MULT,
409  AdmsSensFadType & modelPar_GMIN,
410  bool modelPar_given_GMIN,
411  // non-reals (including hidden)
412  int modelPar_LEVEL,
413  bool modelPar_given_LEVEL,
414  int modelPar_EXMOD,
415  bool modelPar_given_EXMOD,
416  int modelPar_EXPHI,
417  bool modelPar_given_EXPHI,
418  int modelPar_EXAVL,
419  bool modelPar_given_EXAVL,
420  int modelPar_EXSUB,
421  bool modelPar_given_EXSUB,
422  int modelPar_KAVL,
423  bool modelPar_given_KAVL,
424  int modelPar_TYPE,
425  bool modelPar_given_TYPE,
426  // basic variables
427  double admsTemperature, double adms_vt_nom, double gmin, std::vector <AdmsSensFadType> & staticContributions, std::vector <AdmsSensFadType> & dynamicContributions, const Instance & theInstance);
428 
429 void evaluateInitialInstance(
430  // instance parameters
431  // reals
432  AdmsSensFadType & instancePar_MULT,
433  bool instancePar_given_MULT,
434  // instance variables
435  // reals
436  AdmsSensFadType & instanceVar_Tk,
437  AdmsSensFadType & instanceVar_Izteb,
438  AdmsSensFadType & instanceVar_RE_TM,
439  AdmsSensFadType & instanceVar_RBC_TM,
440  AdmsSensFadType & instanceVar_GCCxx_TM,
441  AdmsSensFadType & instanceVar_GCCex_TM,
442  AdmsSensFadType & instanceVar_GCCin_TM,
443  AdmsSensFadType & instanceVar_KF_M,
444  AdmsSensFadType & instanceVar_KFN_M,
445  AdmsSensFadType & instanceVar_qBI,
446  AdmsSensFadType & instanceVar_Ir,
447  AdmsSensFadType & instanceVar_If,
448  AdmsSensFadType & instanceVar_Ib1,
449  AdmsSensFadType & instanceVar_Ib1_s,
450  AdmsSensFadType & instanceVar_Ib2,
451  AdmsSensFadType & instanceVar_Ib3,
452  AdmsSensFadType & instanceVar_Iex,
453  AdmsSensFadType & instanceVar_XIex,
454  AdmsSensFadType & instanceVar_Isub,
455  AdmsSensFadType & instanceVar_XIsub,
456  AdmsSensFadType & instanceVar_Rb2,
457  AdmsSensFadType & instanceVar_Gem,
458  AdmsSensFadType & instanceVar_eVb1b2,
459  // model parameters
460  // reals
461  AdmsSensFadType & modelPar_TREF,
462  bool modelPar_given_TREF,
463  AdmsSensFadType & modelPar_DTA,
464  bool modelPar_given_DTA,
465  AdmsSensFadType & modelPar_IS,
466  bool modelPar_given_IS,
467  AdmsSensFadType & modelPar_IK,
468  bool modelPar_given_IK,
469  AdmsSensFadType & modelPar_VER,
470  bool modelPar_given_VER,
471  AdmsSensFadType & modelPar_VEF,
472  bool modelPar_given_VEF,
473  AdmsSensFadType & modelPar_BF,
474  bool modelPar_given_BF,
475  AdmsSensFadType & modelPar_IBF,
476  bool modelPar_given_IBF,
477  AdmsSensFadType & modelPar_MLF,
478  bool modelPar_given_MLF,
479  AdmsSensFadType & modelPar_XIBI,
480  bool modelPar_given_XIBI,
481  AdmsSensFadType & modelPar_IZEB,
482  bool modelPar_given_IZEB,
483  AdmsSensFadType & modelPar_NZEB,
484  bool modelPar_given_NZEB,
485  AdmsSensFadType & modelPar_BRI,
486  bool modelPar_given_BRI,
487  AdmsSensFadType & modelPar_IBR,
488  bool modelPar_given_IBR,
489  AdmsSensFadType & modelPar_VLR,
490  bool modelPar_given_VLR,
491  AdmsSensFadType & modelPar_XEXT,
492  bool modelPar_given_XEXT,
493  AdmsSensFadType & modelPar_WAVL,
494  bool modelPar_given_WAVL,
495  AdmsSensFadType & modelPar_VAVL,
496  bool modelPar_given_VAVL,
497  AdmsSensFadType & modelPar_SFH,
498  bool modelPar_given_SFH,
499  AdmsSensFadType & modelPar_RE,
500  bool modelPar_given_RE,
501  AdmsSensFadType & modelPar_RBC,
502  bool modelPar_given_RBC,
503  AdmsSensFadType & modelPar_RBV,
504  bool modelPar_given_RBV,
505  AdmsSensFadType & modelPar_RCC,
506  bool modelPar_given_RCC,
507  AdmsSensFadType & modelPar_RCV,
508  bool modelPar_given_RCV,
509  AdmsSensFadType & modelPar_SCRCV,
510  bool modelPar_given_SCRCV,
511  AdmsSensFadType & modelPar_IHC,
512  bool modelPar_given_IHC,
513  AdmsSensFadType & modelPar_AXI,
514  bool modelPar_given_AXI,
515  AdmsSensFadType & modelPar_CJE,
516  bool modelPar_given_CJE,
517  AdmsSensFadType & modelPar_VDE,
518  bool modelPar_given_VDE,
519  AdmsSensFadType & modelPar_PE,
520  bool modelPar_given_PE,
521  AdmsSensFadType & modelPar_XCJE,
522  bool modelPar_given_XCJE,
523  AdmsSensFadType & modelPar_CBEO,
524  bool modelPar_given_CBEO,
525  AdmsSensFadType & modelPar_CJC,
526  bool modelPar_given_CJC,
527  AdmsSensFadType & modelPar_VDC,
528  bool modelPar_given_VDC,
529  AdmsSensFadType & modelPar_PC,
530  bool modelPar_given_PC,
531  AdmsSensFadType & modelPar_XP,
532  bool modelPar_given_XP,
533  AdmsSensFadType & modelPar_MC,
534  bool modelPar_given_MC,
535  AdmsSensFadType & modelPar_XCJC,
536  bool modelPar_given_XCJC,
537  AdmsSensFadType & modelPar_RCBLX,
538  bool modelPar_given_RCBLX,
539  AdmsSensFadType & modelPar_RCBLI,
540  bool modelPar_given_RCBLI,
541  AdmsSensFadType & modelPar_CBCO,
542  bool modelPar_given_CBCO,
543  AdmsSensFadType & modelPar_MTAU,
544  bool modelPar_given_MTAU,
545  AdmsSensFadType & modelPar_TAUE,
546  bool modelPar_given_TAUE,
547  AdmsSensFadType & modelPar_TAUB,
548  bool modelPar_given_TAUB,
549  AdmsSensFadType & modelPar_TEPI,
550  bool modelPar_given_TEPI,
551  AdmsSensFadType & modelPar_TAUR,
552  bool modelPar_given_TAUR,
553  AdmsSensFadType & modelPar_DEG,
554  bool modelPar_given_DEG,
555  AdmsSensFadType & modelPar_XREC,
556  bool modelPar_given_XREC,
557  AdmsSensFadType & modelPar_AQBO,
558  bool modelPar_given_AQBO,
559  AdmsSensFadType & modelPar_AE,
560  bool modelPar_given_AE,
561  AdmsSensFadType & modelPar_AB,
562  bool modelPar_given_AB,
563  AdmsSensFadType & modelPar_AEPI,
564  bool modelPar_given_AEPI,
565  AdmsSensFadType & modelPar_AEX,
566  bool modelPar_given_AEX,
567  AdmsSensFadType & modelPar_AC,
568  bool modelPar_given_AC,
569  AdmsSensFadType & modelPar_ACBL,
570  bool modelPar_given_ACBL,
571  AdmsSensFadType & modelPar_DVGBF,
572  bool modelPar_given_DVGBF,
573  AdmsSensFadType & modelPar_DVGBR,
574  bool modelPar_given_DVGBR,
575  AdmsSensFadType & modelPar_VGB,
576  bool modelPar_given_VGB,
577  AdmsSensFadType & modelPar_VGC,
578  bool modelPar_given_VGC,
579  AdmsSensFadType & modelPar_VGJ,
580  bool modelPar_given_VGJ,
581  AdmsSensFadType & modelPar_VGZEB,
582  bool modelPar_given_VGZEB,
583  AdmsSensFadType & modelPar_AVGEB,
584  bool modelPar_given_AVGEB,
585  AdmsSensFadType & modelPar_TVGEB,
586  bool modelPar_given_TVGEB,
587  AdmsSensFadType & modelPar_DVGTE,
588  bool modelPar_given_DVGTE,
589  AdmsSensFadType & modelPar_DAIS,
590  bool modelPar_given_DAIS,
591  AdmsSensFadType & modelPar_AF,
592  bool modelPar_given_AF,
593  AdmsSensFadType & modelPar_KF,
594  bool modelPar_given_KF,
595  AdmsSensFadType & modelPar_KFN,
596  bool modelPar_given_KFN,
597  AdmsSensFadType & modelPar_ISS,
598  bool modelPar_given_ISS,
599  AdmsSensFadType & modelPar_ICSS,
600  bool modelPar_given_ICSS,
601  AdmsSensFadType & modelPar_IKS,
602  bool modelPar_given_IKS,
603  AdmsSensFadType & modelPar_CJS,
604  bool modelPar_given_CJS,
605  AdmsSensFadType & modelPar_VDS,
606  bool modelPar_given_VDS,
607  AdmsSensFadType & modelPar_PS,
608  bool modelPar_given_PS,
609  AdmsSensFadType & modelPar_VGS,
610  bool modelPar_given_VGS,
611  AdmsSensFadType & modelPar_AS,
612  bool modelPar_given_AS,
613  AdmsSensFadType & modelPar_ASUB,
614  bool modelPar_given_ASUB,
615  AdmsSensFadType & modelPar_RTH,
616  bool modelPar_given_RTH,
617  AdmsSensFadType & modelPar_CTH,
618  bool modelPar_given_CTH,
619  AdmsSensFadType & modelPar_ATH,
620  bool modelPar_given_ATH,
621  AdmsSensFadType & modelPar_MULT,
622  bool modelPar_given_MULT,
623  AdmsSensFadType & modelPar_GMIN,
624  bool modelPar_given_GMIN,
625  // non-reals (including hidden)
626  int modelPar_LEVEL,
627  bool modelPar_given_LEVEL,
628  int modelPar_EXMOD,
629  bool modelPar_given_EXMOD,
630  int modelPar_EXPHI,
631  bool modelPar_given_EXPHI,
632  int modelPar_EXAVL,
633  bool modelPar_given_EXAVL,
634  int modelPar_EXSUB,
635  bool modelPar_given_EXSUB,
636  int modelPar_KAVL,
637  bool modelPar_given_KAVL,
638  int modelPar_TYPE,
639  bool modelPar_given_TYPE,
640  double admsTemperature);
641 
642 void evaluateInitialModel(
643  // model parameters
644  // reals
645  AdmsSensFadType & modelPar_TREF,
646  bool modelPar_given_TREF,
647  AdmsSensFadType & modelPar_DTA,
648  bool modelPar_given_DTA,
649  AdmsSensFadType & modelPar_IS,
650  bool modelPar_given_IS,
651  AdmsSensFadType & modelPar_IK,
652  bool modelPar_given_IK,
653  AdmsSensFadType & modelPar_VER,
654  bool modelPar_given_VER,
655  AdmsSensFadType & modelPar_VEF,
656  bool modelPar_given_VEF,
657  AdmsSensFadType & modelPar_BF,
658  bool modelPar_given_BF,
659  AdmsSensFadType & modelPar_IBF,
660  bool modelPar_given_IBF,
661  AdmsSensFadType & modelPar_MLF,
662  bool modelPar_given_MLF,
663  AdmsSensFadType & modelPar_XIBI,
664  bool modelPar_given_XIBI,
665  AdmsSensFadType & modelPar_IZEB,
666  bool modelPar_given_IZEB,
667  AdmsSensFadType & modelPar_NZEB,
668  bool modelPar_given_NZEB,
669  AdmsSensFadType & modelPar_BRI,
670  bool modelPar_given_BRI,
671  AdmsSensFadType & modelPar_IBR,
672  bool modelPar_given_IBR,
673  AdmsSensFadType & modelPar_VLR,
674  bool modelPar_given_VLR,
675  AdmsSensFadType & modelPar_XEXT,
676  bool modelPar_given_XEXT,
677  AdmsSensFadType & modelPar_WAVL,
678  bool modelPar_given_WAVL,
679  AdmsSensFadType & modelPar_VAVL,
680  bool modelPar_given_VAVL,
681  AdmsSensFadType & modelPar_SFH,
682  bool modelPar_given_SFH,
683  AdmsSensFadType & modelPar_RE,
684  bool modelPar_given_RE,
685  AdmsSensFadType & modelPar_RBC,
686  bool modelPar_given_RBC,
687  AdmsSensFadType & modelPar_RBV,
688  bool modelPar_given_RBV,
689  AdmsSensFadType & modelPar_RCC,
690  bool modelPar_given_RCC,
691  AdmsSensFadType & modelPar_RCV,
692  bool modelPar_given_RCV,
693  AdmsSensFadType & modelPar_SCRCV,
694  bool modelPar_given_SCRCV,
695  AdmsSensFadType & modelPar_IHC,
696  bool modelPar_given_IHC,
697  AdmsSensFadType & modelPar_AXI,
698  bool modelPar_given_AXI,
699  AdmsSensFadType & modelPar_CJE,
700  bool modelPar_given_CJE,
701  AdmsSensFadType & modelPar_VDE,
702  bool modelPar_given_VDE,
703  AdmsSensFadType & modelPar_PE,
704  bool modelPar_given_PE,
705  AdmsSensFadType & modelPar_XCJE,
706  bool modelPar_given_XCJE,
707  AdmsSensFadType & modelPar_CBEO,
708  bool modelPar_given_CBEO,
709  AdmsSensFadType & modelPar_CJC,
710  bool modelPar_given_CJC,
711  AdmsSensFadType & modelPar_VDC,
712  bool modelPar_given_VDC,
713  AdmsSensFadType & modelPar_PC,
714  bool modelPar_given_PC,
715  AdmsSensFadType & modelPar_XP,
716  bool modelPar_given_XP,
717  AdmsSensFadType & modelPar_MC,
718  bool modelPar_given_MC,
719  AdmsSensFadType & modelPar_XCJC,
720  bool modelPar_given_XCJC,
721  AdmsSensFadType & modelPar_RCBLX,
722  bool modelPar_given_RCBLX,
723  AdmsSensFadType & modelPar_RCBLI,
724  bool modelPar_given_RCBLI,
725  AdmsSensFadType & modelPar_CBCO,
726  bool modelPar_given_CBCO,
727  AdmsSensFadType & modelPar_MTAU,
728  bool modelPar_given_MTAU,
729  AdmsSensFadType & modelPar_TAUE,
730  bool modelPar_given_TAUE,
731  AdmsSensFadType & modelPar_TAUB,
732  bool modelPar_given_TAUB,
733  AdmsSensFadType & modelPar_TEPI,
734  bool modelPar_given_TEPI,
735  AdmsSensFadType & modelPar_TAUR,
736  bool modelPar_given_TAUR,
737  AdmsSensFadType & modelPar_DEG,
738  bool modelPar_given_DEG,
739  AdmsSensFadType & modelPar_XREC,
740  bool modelPar_given_XREC,
741  AdmsSensFadType & modelPar_AQBO,
742  bool modelPar_given_AQBO,
743  AdmsSensFadType & modelPar_AE,
744  bool modelPar_given_AE,
745  AdmsSensFadType & modelPar_AB,
746  bool modelPar_given_AB,
747  AdmsSensFadType & modelPar_AEPI,
748  bool modelPar_given_AEPI,
749  AdmsSensFadType & modelPar_AEX,
750  bool modelPar_given_AEX,
751  AdmsSensFadType & modelPar_AC,
752  bool modelPar_given_AC,
753  AdmsSensFadType & modelPar_ACBL,
754  bool modelPar_given_ACBL,
755  AdmsSensFadType & modelPar_DVGBF,
756  bool modelPar_given_DVGBF,
757  AdmsSensFadType & modelPar_DVGBR,
758  bool modelPar_given_DVGBR,
759  AdmsSensFadType & modelPar_VGB,
760  bool modelPar_given_VGB,
761  AdmsSensFadType & modelPar_VGC,
762  bool modelPar_given_VGC,
763  AdmsSensFadType & modelPar_VGJ,
764  bool modelPar_given_VGJ,
765  AdmsSensFadType & modelPar_VGZEB,
766  bool modelPar_given_VGZEB,
767  AdmsSensFadType & modelPar_AVGEB,
768  bool modelPar_given_AVGEB,
769  AdmsSensFadType & modelPar_TVGEB,
770  bool modelPar_given_TVGEB,
771  AdmsSensFadType & modelPar_DVGTE,
772  bool modelPar_given_DVGTE,
773  AdmsSensFadType & modelPar_DAIS,
774  bool modelPar_given_DAIS,
775  AdmsSensFadType & modelPar_AF,
776  bool modelPar_given_AF,
777  AdmsSensFadType & modelPar_KF,
778  bool modelPar_given_KF,
779  AdmsSensFadType & modelPar_KFN,
780  bool modelPar_given_KFN,
781  AdmsSensFadType & modelPar_ISS,
782  bool modelPar_given_ISS,
783  AdmsSensFadType & modelPar_ICSS,
784  bool modelPar_given_ICSS,
785  AdmsSensFadType & modelPar_IKS,
786  bool modelPar_given_IKS,
787  AdmsSensFadType & modelPar_CJS,
788  bool modelPar_given_CJS,
789  AdmsSensFadType & modelPar_VDS,
790  bool modelPar_given_VDS,
791  AdmsSensFadType & modelPar_PS,
792  bool modelPar_given_PS,
793  AdmsSensFadType & modelPar_VGS,
794  bool modelPar_given_VGS,
795  AdmsSensFadType & modelPar_AS,
796  bool modelPar_given_AS,
797  AdmsSensFadType & modelPar_ASUB,
798  bool modelPar_given_ASUB,
799  AdmsSensFadType & modelPar_RTH,
800  bool modelPar_given_RTH,
801  AdmsSensFadType & modelPar_CTH,
802  bool modelPar_given_CTH,
803  AdmsSensFadType & modelPar_ATH,
804  bool modelPar_given_ATH,
805  AdmsSensFadType & modelPar_MULT,
806  bool modelPar_given_MULT,
807  AdmsSensFadType & modelPar_GMIN,
808  bool modelPar_given_GMIN,
809  // non-reals (including hidden)
810  int modelPar_LEVEL,
811  bool modelPar_given_LEVEL,
812  int modelPar_EXMOD,
813  bool modelPar_given_EXMOD,
814  int modelPar_EXPHI,
815  bool modelPar_given_EXPHI,
816  int modelPar_EXAVL,
817  bool modelPar_given_EXAVL,
818  int modelPar_EXSUB,
819  bool modelPar_given_EXSUB,
820  int modelPar_KAVL,
821  bool modelPar_given_KAVL,
822  int modelPar_TYPE,
823  bool modelPar_given_TYPE,
824  double admsTemperature);
825 
826 #endif // Xyce_ADMS_SENSITIVITIES
827 
828 
829 // Limited exponential --- NOT what verilog LRM says, but what qucs,
830 // ng-spice, and zspice do.
831 
832 template <typename T>
833 T limexp(const T &x)
834 {
835  if ((x) < 80.0)
836  return (exp(x));
837  else
838  return (exp(80.0)*(x-79.0));
839 }
840 
841 // Maybe this will do as a substitute for a sacado-provided "floor" and "ceil"?
842 // It is wrong to try to propagate the Sacado derivatives to the return
843 // value, as the floor and ceil functions have zero derivative w.r.t. any
844 // of the variables in the argument, except when X is an integer at which
845 // point the derivative is undefined.
846 template <typename T>
847 double ADMSfloor(const T & x)
848 {
849  return (floor(x.val()));
850 }
851 
852 template <typename T>
853 double ADMSceil(const T & x)
854 {
855  return (ceil(x.val()));
856 }
857 
858 
859 struct Traits: public DeviceTraits<Model, Instance, BJT::Traits>
860 {
861  static const char *name() {return "MEXTRAM 504.11.0 with self heating";}
862  static const char *deviceTypeName() {return "q level 505";}
863 
864  static int numNodes() {return 5;}
865  static bool modelRequired() {return true;}
866  static bool isLinearDevice() {return false;}
867 
868  static Device *factory(const Configuration &configuration, const FactoryBlock &factory_block);
869  static void loadModelParameters(ParametricData<Model> &model_parameters);
870  static void loadInstanceParameters(ParametricData<Instance> &instance_parameters);
871 };
872 
873 //-----------------------------------------------------------------------------
874 // Class : Instance
875 
876 //
877 // Purpose : This class represents a single instance of the
878 // device. It mainly contains indices and pointers into
879 // the matrix equation (see the resistor instance class for
880 // more details).
881 //
882 // Special Notes :
883 // Creator :
884 // Creation Date :
885 //-----------------------------------------------------------------------------
886 class Instance : public DeviceInstance
887 {
888  friend class ParametricData<Instance>;
889  friend class Model;
890 #ifdef Xyce_ADMS_SENSITIVITIES
891  friend class InstanceSensitivity;
892  friend class ModelSensitivity;
893 #endif // Xyce_ADMS_SENSITIVITIES
894  friend class Traits;
895 
896 public:
897  Instance(
898  const Configuration & configuration,
899  const InstanceBlock & instance_block,
900  Model & model,
901  const FactoryBlock & factory_block);
902 
903  ~Instance();
904 
905 private:
906  Instance(const Instance &);
907  Instance &operator=(const Instance &);
908 
909 public:
910  void registerLIDs( const LocalIdVector & intLIDVecRef,
911  const LocalIdVector & extLIDVecRef );
912  void registerStateLIDs( const LocalIdVector & staLIDVecRef );
913  void setupPointers();
914 
915  void loadNodeSymbols(Util::SymbolTable &symbol_table) const;
916 
917  const JacobianStamp & jacobianStamp() const;
918  void registerJacLIDs( const JacobianStamp & jacLIDVec );
919 
920  bool processParams();
921  bool updateTemperature ( const double & temp = -999.0 );
922  bool updateIntermediateVars ();
923  bool updatePrimaryState ();
924  bool updateSecondaryState ();
925 
926  // load functions, residual:
927  bool loadDAEQVector ();
928  bool loadDAEFVector ();
929 
930  // load functions, Jacobian:
931  bool loadDAEdQdx ();
932  bool loadDAEdFdx ();
933 
934  void collapseNodes();
935 
936 private:
937 
938 public:
939  // iterator reference to the bjt504tva model which owns this instance.
940  // Getters and setters
942  {
943  return model_;
944  }
945 
946 private:
947 
948  Model & model_; //< Owning Model
949  // Begin verilog Instance Variables
950  // Instance Parameters
951  double MULT;
952  // Variables of global_instance scope
953  AdmsFadType Tk;
954  AdmsFadType Izteb;
955  AdmsFadType RE_TM;
956  AdmsFadType RBC_TM;
957  AdmsFadType GCCxx_TM;
958  AdmsFadType GCCex_TM;
959  AdmsFadType GCCin_TM;
960  double KF_M;
961  double KFN_M;
962  AdmsFadType qBI;
963  AdmsFadType Ir;
964  AdmsFadType If;
965  AdmsFadType Ib1;
966  AdmsFadType Ib1_s;
967  AdmsFadType Ib2;
968  AdmsFadType Ib3;
969  AdmsFadType Iex;
970  AdmsFadType XIex;
971  AdmsFadType Isub;
972  AdmsFadType XIsub;
973  AdmsFadType Rb2;
974  AdmsFadType Gem;
975  AdmsFadType eVb1b2;
976  // end verilog Instance Variables=====
977  // Nodal LID Variables
978  int li_c;
979  int li_b;
980  int li_e;
981  int li_s;
982  int li_dt;
983  int li_e1;
984  int li_b1;
985  int li_b2;
986  int li_c3;
987  int li_c4;
988  int li_c2;
989  int li_c1;
990  int li_noi;
991  // end Nodal LID Variables
992  // Branch LID Variables
993  // end Branch LID Variables
994  // Jacobian pointers
1259  // end of Jacobian and pointers
1260  // node numbers
1261  static const int admsNodeID_c = 0;
1262  static const int admsNodeID_b = 1;
1263  static const int admsNodeID_e = 2;
1264  static const int admsNodeID_s = 3;
1265  static const int admsNodeID_dt = 4;
1266  static const int admsNodeID_e1 = 5;
1267  static const int admsNodeID_b1 = 6;
1268  static const int admsNodeID_b2 = 7;
1269  static const int admsNodeID_c3 = 8;
1270  static const int admsNodeID_c4 = 9;
1271  static const int admsNodeID_c2 = 10;
1272  static const int admsNodeID_c1 = 11;
1273  static const int admsNodeID_noi = 12;
1274  // end node numbers
1275  // Additional IDs for branch equations
1276  // end branch numbers
1277  // Probe numbers
1278  static const int admsProbeID_V_noi_e1 = 0;
1279  static const int admsProbeID_V_c3_c1 = 1;
1280  static const int admsProbeID_V_c3_c4 = 2;
1281  static const int admsProbeID_V_c4_c1 = 3;
1282  static const int admsProbeID_V_b_c = 4;
1283  static const int admsProbeID_V_b_e = 5;
1284  static const int admsProbeID_V_b_b1 = 6;
1285  static const int admsProbeID_V_e_e1 = 7;
1286  static const int admsProbeID_V_c1_c2 = 8;
1287  static const int admsProbeID_V_s_c1 = 9;
1288  static const int admsProbeID_V_b1_b2 = 10;
1289  static const int admsProbeID_V_b1_e1 = 11;
1290  static const int admsProbeID_V_b2_e1 = 12;
1291  static const int admsProbeID_V_b2_c2 = 13;
1292  static const int admsProbeID_V_b2_c1 = 14;
1293  static const int admsProbeID_V_dt_GND = 15;
1294  // end probe numbers
1295  // State LIDs
1300  // end state LIDs
1301  // bools for collapsing nodes
1304  // Arrays to hold probes
1305  std::vector < AdmsFadType > probeVars;
1306  // Arrays to hold contributions
1307  // dynamic contributions are differentiated w.r.t time
1308  std::vector < AdmsFadType > staticContributions;
1309  std::vector < AdmsFadType > dynamicContributions;
1310 
1311  // This array stores the differences between original and limited variables.
1312  std::vector<double> probeDiffs;
1313  // These store the Jdxp's for F and Q, respectively
1314  std::vector<double> Jdxp_static;
1315  std::vector<double> Jdxp_dynamic;
1316 
1317  // this is what we'll use when any model uses $temperature. We'll
1318  // set it in updateTemperature, and initialize it to whatever
1319  // is in devOptions when the instance is constructed.
1321 
1322  // vt at $temperature;
1323  double adms_vt_nom;
1324 
1325 
1326  // This one is for the annoying bogus "XyceADMSInstTemp" parameter
1327  // that we need so we can set it from the device manager when there's no
1328  // "TEMP" parameter to use
1330 
1331 
1332  std::vector< std::vector<int> > jacStamp;
1333  std::vector<int> jacMap;
1334  std::vector< std::vector<int> > jacMap2;
1335 };
1336 
1337 
1338 
1339 namespace AnalogFunctions
1340 {
1341 
1342 // Analog Function trunc_ev
1343 template<typename ScalarT> ScalarT trunc_ev(ScalarT Val, ScalarT Vprev, ScalarT Vmin, ScalarT Vmax)
1344 {
1345 
1346 
1347  ScalarT trunc_ev;
1348  ScalarT result;
1349  {
1350  result = Val;
1351  if ((Val>Vmax))
1352  {
1353  if ((Vprev>(Vmax-0.05)))
1354  {
1355  if (((Val-Vprev)>0.05))
1356  {
1357  result = (Vprev+0.05);
1358  }
1359  }
1360  else
1361  {
1362  result = Vmax;
1363  }
1364  }
1365  else
1366  {
1367  if ((Val<Vmin))
1368  {
1369  if ((Vprev<(0.9*Vmin)))
1370  {
1371  if ((Val<((1.5*Vprev)+(0.10*Vmin))))
1372  {
1373  result = ((1.5*Vprev)+(0.10*Vmin));
1374  }
1375  }
1376  else
1377  {
1378  result = Vmin;
1379  }
1380  }
1381  }
1382  trunc_ev = result;
1383  }
1384  return(trunc_ev);
1385 }
1386 
1387 }
1388 
1389 
1390 //-----------------------------------------------------------------------------
1391 // Class : Model
1392 
1393 // Purpose :
1394 // Special Notes :
1395 // Creator :
1396 // Creation Date :
1397 //-----------------------------------------------------------------------------
1398 class Model : public DeviceModel
1399 {
1400  typedef std::vector<Instance *> InstanceVector;
1401 
1402  friend class ParametricData<Model>;
1403  friend class Instance;
1404 #ifdef Xyce_ADMS_SENSITIVITIES
1405  friend class InstanceSensitivity;
1406  friend class ModelSensitivity;
1407 #endif // Xyce_ADMS_SENSITIVITIES
1408  friend class Traits;
1409 
1410 public:
1411  Model(
1412  const Configuration & configuration,
1413  const ModelBlock & model_block,
1414  const FactoryBlock & factory_block);
1415 
1416  ~Model();
1417 
1418 private:
1419  Model(const Model &);
1420  Model &operator=(const Model &);
1421 
1422 public:
1423  virtual void forEachInstance(DeviceInstanceOp &op) const /* override */;
1424  virtual std::ostream &printOutInstances(std::ostream &os) const;
1425  bool processParams();
1426  bool processInstanceParams();
1427 
1428 private:
1429 
1430 public:
1431  void addInstance(Instance *instance)
1432  {
1433  instanceContainer.push_back(instance);
1434  }
1435 
1436 private:
1437  std::vector<Instance*> instanceContainer;
1438 
1439 private:
1440 
1441  // This one is for the annoying bogus "XyceADMSInstTemp" parameter
1442  // that we need so we can set it from the device manager when there's no
1443  // "TEMP" model parameter to use
1444  double admsModTemp;
1445  // Begin verilog Model Variables
1446  // Model Parameters
1447  int LEVEL;
1448  double TREF;
1449  double DTA;
1450  int EXMOD;
1451  int EXPHI;
1452  int EXAVL;
1453  int EXSUB;
1454  double IS;
1455  double IK;
1456  double VER;
1457  double VEF;
1458  double BF;
1459  double IBF;
1460  double MLF;
1461  double XIBI;
1462  double IZEB;
1463  double NZEB;
1464  double BRI;
1465  double IBR;
1466  double VLR;
1467  double XEXT;
1468  double WAVL;
1469  double VAVL;
1470  double SFH;
1471  double RE;
1472  double RBC;
1473  double RBV;
1474  double RCC;
1475  double RCV;
1476  double SCRCV;
1477  double IHC;
1478  double AXI;
1479  double CJE;
1480  double VDE;
1481  double PE;
1482  double XCJE;
1483  double CBEO;
1484  double CJC;
1485  double VDC;
1486  double PC;
1487  double XP;
1488  double MC;
1489  double XCJC;
1490  double RCBLX;
1491  double RCBLI;
1492  double CBCO;
1493  double MTAU;
1494  double TAUE;
1495  double TAUB;
1496  double TEPI;
1497  double TAUR;
1498  double DEG;
1499  double XREC;
1500  double AQBO;
1501  double AE;
1502  double AB;
1503  double AEPI;
1504  double AEX;
1505  double AC;
1506  double ACBL;
1507  double DVGBF;
1508  double DVGBR;
1509  double VGB;
1510  double VGC;
1511  double VGJ;
1512  double VGZEB;
1513  double AVGEB;
1514  double TVGEB;
1515  double DVGTE;
1516  double DAIS;
1517  double AF;
1518  double KF;
1519  double KFN;
1520  int KAVL;
1521  double ISS;
1522  double ICSS;
1523  double IKS;
1524  double CJS;
1525  double VDS;
1526  double PS;
1527  double VGS;
1528  double AS;
1529  double ASUB;
1530  double RTH;
1531  double CTH;
1532  double ATH;
1533  double MULT;
1534  int TYPE;
1535  double GMIN;
1536  // Variables of global_model scope
1537  // end verilog model variables=====
1538 };
1539 
1540 void registerDevice();
1541 
1542 } // namespace ADMSbjt504tva
1543 } // namespace Device
1544 } // namespace Xyce
1545 #endif //Xyce_N_DEV_ADMSbjt504tva_h
Instance(const Configuration &configuration, const InstanceBlock &instance_block, Model &model, const FactoryBlock &factory_block)
static void loadInstanceParameters(ParametricData< Instance > &instance_parameters)
virtual void forEachInstance(DeviceInstanceOp &op) const
Apply a device instance "op" to all instances associated with this model.
std::vector< Instance * > InstanceVector
Pure virtual class to augment a linear system.
bool processInstanceParams()
processInstanceParams
void registerStateLIDs(const LocalIdVector &staLIDVecRef)
std::vector< std::vector< int > > jacStamp
const JacobianStamp & jacobianStamp() const
bool updateTemperature(const double &temp=-999.0)
static Device * factory(const Configuration &configuration, const FactoryBlock &factory_block)
void loadNodeSymbols(Util::SymbolTable &symbol_table) const
Populates and returns the store name map.
static void loadModelParameters(ParametricData< Model > &model_parameters)
std::vector< AdmsFadType > staticContributions
void registerLIDs(const LocalIdVector &intLIDVecRef, const LocalIdVector &extLIDVecRef)
The FactoryBlock contains parameters needed by the device, instance and model creation functions...
static Tin adms_ternary_op(const bool cond, const Tin &ifTrue, const Tin &ifFalse)
static T adms_vt(const T temp)
std::vector< Instance * > instanceContainer
std::vector< std::vector< int > > JacobianStamp
Definition: N_DEV_fwd.h:196
std::vector< AdmsFadType > dynamicContributions
ScalarT trunc_ev(ScalarT Val, ScalarT Vprev, ScalarT Vmin, ScalarT Vmax)
Model & operator=(const Model &)
The Device class is an interface for device implementations.
Definition: N_DEV_Device.h:101
IdVector LocalIdVector
Definition: N_DEV_fwd.h:198
Sacado::Fad::SFad< double, 1 > AdmsSensFadType
Class Configuration contains device configuration data.
Model(const Configuration &configuration, const ModelBlock &model_block, const FactoryBlock &factory_block)
void registerJacLIDs(const JacobianStamp &jacLIDVec)
Instance & operator=(const Instance &)
Sacado::Fad::SFad< double, 16 > AdmsFadType
#define CONSTKoverQ
Definition: N_DEV_Const.h:58
Base sensitivity functor.
Definition: N_DEV_Pars.h:148
ModelBlock represents a .MODEL line from the netlist.
The DeviceTraits template describes the configuration of a device.
Manages parameter binding for class C.
Definition: N_DEV_Pars.h:214
InstanceBlock represent a device instance line from the netlist.
std::vector< std::vector< int > > jacMap2
virtual std::ostream & printOutInstances(std::ostream &os) const