My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pad4bit.core.cpp
Go to the documentation of this file.
1 /*
2  * pad4bit.core.cpp - device implementations for pad4bit module
3  *
4  * This is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2, or (at your option)
7  * any later version.
8  *
9  */
10 
11 #if HAVE_CONFIG_H
12 #include <config.h>
13 #endif
14 
15 #include "pad4bit.analogfunction.h"
16 #include "component.h"
17 #include "device.h"
18 #include "pad4bit.core.h"
19 
20 #ifndef CIR_pad4bit
21 #define CIR_pad4bit -1
22 #endif
23 
24 // external nodes
25 #define D 0
26 #define C 1
27 #define B 2
28 #define A 3
29 // internal nodes
30 
31 // useful macro definitions
32 #define NP(node) real (getV (node))
33 #define BP(pnode,nnode) (NP(pnode) - NP(nnode))
34 #define _load_static_residual2(pnode,nnode,current)\
35  _rhs[pnode] -= current;\
36  _rhs[nnode] += current;
37 #define _load_static_augmented_residual2(pnode,nnode,current)\
38  _rhs[pnode] -= current;\
39  _rhs[nnode] += current;
40 #define _load_static_residual1(node,current)\
41  _rhs[node] -= current;
42 #define _load_static_augmented_residual1(node,current)\
43  _rhs[node] -= current;
44 #define _load_static_jacobian4(pnode,nnode,vpnode,vnnode,conductance)\
45  _jstat[pnode][vpnode] += conductance;\
46  _jstat[nnode][vnnode] += conductance;\
47  _jstat[pnode][vnnode] -= conductance;\
48  _jstat[nnode][vpnode] -= conductance;\
49  if (doHB) {\
50  _ghs[pnode] += conductance * BP(vpnode,vnnode);\
51  _ghs[nnode] -= conductance * BP(vpnode,vnnode);\
52  } else {\
53  _rhs[pnode] += conductance * BP(vpnode,vnnode);\
54  _rhs[nnode] -= conductance * BP(vpnode,vnnode);\
55  }
56 #define _load_static_jacobian2p(node,vpnode,vnnode,conductance)\
57  _jstat[node][vpnode] += conductance;\
58  _jstat[node][vnnode] -= conductance;\
59  if (doHB) {\
60  _ghs[node] += conductance * BP(vpnode,vnnode);\
61  } else {\
62  _rhs[node] += conductance * BP(vpnode,vnnode);\
63  }
64 #define _load_static_jacobian2s(pnode,nnode,node,conductance)\
65  _jstat[pnode][node] += conductance;\
66  _jstat[nnode][node] -= conductance;\
67  if (doHB) {\
68  _ghs[pnode] += conductance * NP(node);\
69  _ghs[nnode] -= conductance * NP(node);\
70  } else {\
71  _rhs[pnode] += conductance * NP(node);\
72  _rhs[nnode] -= conductance * NP(node);\
73  }
74 #define _load_static_jacobian1(node,vnode,conductance)\
75  _jstat[node][vnode] += conductance;\
76  if (doHB) {\
77  _ghs[node] += conductance * NP(vnode);\
78  } else {\
79  _rhs[node] += conductance * NP(vnode);\
80  }
81 #define _load_dynamic_residual2(pnode,nnode,charge)\
82  if (doTR) _charges[pnode][nnode] += charge;\
83  if (doHB) {\
84  _qhs[pnode] -= charge;\
85  _qhs[nnode] += charge;\
86  }
87 #define _load_dynamic_residual1(node,charge)\
88  if (doTR) _charges[node][node] += charge;\
89  if (doHB) {\
90  _qhs[node] -= charge;\
91  }
92 #define _load_dynamic_jacobian4(pnode,nnode,vpnode,vnnode,capacitance)\
93  if (doAC) {\
94  _jdyna[pnode][vpnode] += capacitance;\
95  _jdyna[nnode][vnnode] += capacitance;\
96  _jdyna[pnode][vnnode] -= capacitance;\
97  _jdyna[nnode][vpnode] -= capacitance;\
98  }\
99  if (doTR) {\
100  _caps[pnode][nnode][vpnode][vnnode] += capacitance;\
101  }\
102  if (doHB) {\
103  _chs[pnode] += capacitance * BP(vpnode,vnnode);\
104  _chs[nnode] -= capacitance * BP(vpnode,vnnode);\
105  }
106 #define _load_dynamic_jacobian2s(pnode,nnode,vnode,capacitance)\
107  if (doAC) {\
108  _jdyna[pnode][vnode] += capacitance;\
109  _jdyna[nnode][vnode] -= capacitance;\
110  }\
111  if (doTR) {\
112  _caps[pnode][nnode][vnode][vnode] += capacitance;\
113  }\
114  if (doHB) {\
115  _chs[pnode] += capacitance * NP(vnode);\
116  _chs[nnode] -= capacitance * NP(vnode);\
117  }
118 #define _load_dynamic_jacobian2p(node,vpnode,vnnode,capacitance)\
119  if (doAC) {\
120  _jdyna[node][vpnode] += capacitance;\
121  _jdyna[node][vnnode] -= capacitance;\
122  }\
123  if (doTR) {\
124  _caps[node][node][vpnode][vnnode] += capacitance;\
125  }\
126  if (doHB) {\
127  _chs[node] += capacitance * BP(vpnode,vnnode);\
128  }
129 #define _load_dynamic_jacobian1(node,vnode,capacitance)\
130  if (doAC) {\
131  _jdyna[node][vnode] += capacitance;\
132  }\
133  if (doTR) {\
134  _caps[node][node][vnode][vnode] += capacitance;\
135  }\
136  if (doHB) {\
137  _chs[node] += capacitance * NP(vnode);\
138  }
139 
140 #define _save_whitenoise1(n1,pwr,type)\
141  _white_pwr[n1][n1] += pwr;
142 #define _save_whitenoise2(n1,n2,pwr,type)\
143  _white_pwr[n1][n2] += pwr;
144 #define _save_flickernoise1(n1,pwr,exp,type)\
145  _flicker_pwr[n1][n1] += pwr;\
146  _flicker_exp[n1][n1] += exp;
147 #define _save_flickernoise2(n1,n2,pwr,exp,type)\
148  _flicker_pwr[n1][n2] += pwr;\
149  _flicker_exp[n1][n2] += exp;
150 #define _load_whitenoise2(n1,n2,pwr)\
151  cy (n1,n2) -= pwr/kB/T0; cy (n2,n1) -= pwr/kB/T0;\
152  cy (n1,n1) += pwr/kB/T0; cy (n2,n2) += pwr/kB/T0;
153 #define _load_whitenoise1(n1,pwr)\
154  cy (n1,n1) += pwr/kB/T0;
155 #define _load_flickernoise2(n1,n2,pwr,exp)\
156  cy (n1,n2) -= pwr*pow(_freq,-exp)/kB/T0;\
157  cy (n2,n1) -= pwr*pow(_freq,-exp)/kB/T0;\
158  cy (n1,n1) += pwr*pow(_freq,-exp)/kB/T0;\
159  cy (n2,n2) += pwr*pow(_freq,-exp)/kB/T0;
160 #define _load_flickernoise1(n1,pwr,exp)\
161  cy (n1,n1) += pwr*pow(_freq,-exp)/kB/T0;
162 
163 // derivative helper macros
164 #define m00_hypot(v00,x,y) v00 = xhypot(x,y);
165 #define m10_hypot(v10,v00,x,y) v10 = (x)/(v00);
166 #define m11_hypot(v11,v00,x,y) v11 = (y)/(v00);
167 #define m00_max(v00,x,y) v00 = ((x)>(y))?(x):(y);
168 #define m10_max(v10,v00,x,y) v10 = ((x)>(y))?1.0:0.0;
169 #define m11_max(v11,v00,x,y) v11 = ((x)>(y))?0.0:1.0;
170 #define m00_min(v00,x,y) v00 = ((x)<(y))?(x):(y);
171 #define m10_min(v10,v00,x,y) v10 = ((x)<(y))?1.0:0.0;
172 #define m11_min(v11,v00,x,y) v11 = ((x)<(y))?0.0:1.0;
173 #define m00_pow(v00,x,y) v00 = pow(x,y);
174 #define m10_pow(v10,v00,x,y) v10 = (x==0.0)?0.0:(v00)*(y)/(x);
175 #define m11_pow(v11,v00,x,y) v11 = (x==0.0)?0.0:(log(x)*(v00));
176 
177 #define m00_div(v00,v10,x,y) double v10=1/(y); double v00=(x)*v10;
178 #define m10_div(v10,v00,vv,x,y)
179 #define m11_div(v11,v00,vv,x,y) double v11 = -v00*vv;
180 
181 #define m00_mult(v00,v10,v11,x,y) double v10=(x); double v11=(y); double v00=v10*v11;
182 #define m00_add(v00,x,y) double v00=(x)+(y);
183 
184 #define m00_cos(v00,x) v00 = cos(x);
185 #define m10_cos(v10,v00,x) v10 = (-sin(x));
186 #define m00_sin(v00,x) v00 = sin(x);
187 #define m10_sin(v10,v00,x) v10 = (cos(x));
188 #define m00_tan(v00,x) v00 = tan(x);
189 #define m10_tan(v10,v00,x) v10 = (1.0/cos(x)/cos(x));
190 #define m00_cosh(v00,x) v00 = cosh(x);
191 #define m10_cosh(v10,v00,x) v10 = (sinh(x));
192 #define m00_sinh(v00,x) v00 = sinh(x);
193 #define m10_sinh(v10,v00,x) v10 = (cosh(x));
194 #define m00_tanh(v00,x) v00 = tanh(x);
195 #define m10_tanh(v10,v00,x) v10 = (1.0/cosh(x)/cosh(x));
196 #define m00_acos(v00,x) v00 = acos(x);
197 #define m10_acos(v10,v00,x) v10 = (-1.0/sqrt(1-x*x));
198 #define m00_asin(v00,x) v00 = asin(x);
199 #define m10_asin(v10,v00,x) v10 = (+1.0/sqrt(1-x*x));
200 #define m00_atan(v00,x) v00 = atan(x);
201 #define m10_atan(v10,v00,x) v10 = (+1.0/(1+x*x));
202 #define m00_atanh(v00,x) v00 = atanh(x);
203 #define m10_atanh(v10,v00,x) v10 = (+1.0/(1-x*x));
204 #define m00_logE(v00,x) v00 = log(x);
205 #define m10_logE(v10,v00,x) v10 = (1.0/x);
206 #define m00_log10(v00,x) v00 = log10(x);
207 #define m10_log10(v10,v00,x) v10 = (1.0/x/M_LN10);
208 #define m00_sqrt(v00,x) v00 = sqrt(x);
209 #define m10_sqrt(v10,v00,x) v10 = (0.5/v00);
210 #define m00_fabs(v00,x) v00 = fabs(x);
211 #define m10_fabs(v10,v00,x) v10 = (((x)>=0)?(+1.0):(-1.0));
212 
213 #define m00_exp(v00,x) v00 = exp(x);
214 #define m10_exp(v10,v00,x) v10 = v00;
215 
216 #define m00_abs(v00) ((v00)<(0)?(-(v00)):(v00))
217 #define m00_floor(v00,x) v00 = floor(x);
218 #define m00_limexp(v00,x) v00 = ((x)<80.0?exp(x):exp(80.0)*(x-79.0));
219 #define m10_limexp(v10,v00,x) v10 = ((x)<80.0?(v00):exp(80.0));
220 
221 #define m20_logE(v00) (-1.0/v00/v00)
222 #define m20_exp(v00) exp(v00)
223 #define m20_limexp(v00) ((v00)<80.0?exp(v00):0.0)
224 #define m20_sqrt(v00) (-0.25/(v00)/sqrt(v00))
225 #define m20_fabs(v00) 0.0
226 #define m20_pow(x,y) ((y)*((y)-1.0)*pow(x,y)/(x)/(x))
227 #define m00_vt(x) (kBoverQ*(x))
228 #define m10_vt(x) (kBoverQ)
229 
230 // simulator specific definitions
231 #define _modelname "pad4bit"
232 #define _instancename getName()
233 #define _circuit_temp (getPropertyDouble("Temp")+273.15)
234 #define _param_given(p) (isPropertyGiven(p)?1:0)
235 
236 
237 // $vt and $vt() functions
238 #define _vt_nom (kBoverQ*_circuit_temp)
239 
240 using namespace device;
241 
242 /* Device constructor. */
244 {
245  type = CIR_pad4bit;
246 }
247 
248 /* Initialization of model. */
249 void pad4bit::initModel (void)
250 {
251  // create internal nodes
252 
253  // get device model parameters
254  loadVariables ();
255  // evaluate global model equations
256  initializeModel ();
257  // evaluate initial step equations
258  initialStep ();
259  // evaluate global instance equations
260  initializeInstance ();
261 }
262 
263 /* Initialization of DC analysis. */
264 void pad4bit::initDC (void)
265 {
266  allocMatrixMNA ();
267  initModel ();
268  pol = 1;
269  restartDC ();
270  doAC = 1;
271  doTR = 0;
272  doHB = 0;
273 }
274 
275 /* Run when DC is restarted (fallback algorithms). */
277 {
278 }
279 
280 /* Initialize Verilog-AMS code. */
281 void pad4bit::initVerilog (void)
282 {
283  // initialization of noise variables
284 
285  int i1, i2, i3, i4;
286 
287  // zero charges
288  for (i1 = 0; i1 < 4; i1++) {
289  for (i2 = 0; i2 < 4; i2++) {
290  _charges[i1][i2] = 0.0;
291  } }
292 
293  // zero capacitances
294  for (i1 = 0; i1 < 4; i1++) {
295  for (i2 = 0; i2 < 4; i2++) {
296  for (i3 = 0; i3 < 4; i3++) {
297  for (i4 = 0; i4 < 4; i4++) {
298  _caps[i1][i2][i3][i4] = 0.0;
299  } } } }
300 
301  // zero right hand side, static and dynamic jacobian
302  for (i1 = 0; i1 < 4; i1++) {
303  _rhs[i1] = 0.0;
304  _qhs[i1] = 0.0;
305  _chs[i1] = 0.0;
306  _ghs[i1] = 0.0;
307  for (i2 = 0; i2 < 4; i2++) {
308  _jstat[i1][i2] = 0.0;
309  _jdyna[i1][i2] = 0.0;
310  }
311  }
312 }
313 
314 /* Load device model input parameters. */
315 void pad4bit::loadVariables (void)
316 {
317  Number = getPropertyInteger ("Number");
318 }
319 
320 /* #define's for translated code */
321 #undef _DDT
322 #define _DDT(q) q
323 #define _DYNAMIC
324 #define _DERIVATE
325 #define _DDX
326 #define _DERIVATEFORDDX
327 
328 /* Evaluate Verilog-AMS equations in model initialization. */
329 void pad4bit::initializeModel (void)
330 {
331 }
332 
333 /* Evaluate Verilog-AMS equations in instance initialization. */
334 void pad4bit::initializeInstance (void)
335 {
336 }
337 
338 /* Evaluate Verilog-AMS equations in initial step. */
339 void pad4bit::initialStep (void)
340 {
341 }
342 
343 /* Evaluate Verilog-AMS equations in final step. */
344 void pad4bit::finalStep (void)
345 {
346 }
347 
348 /* Evaluate Verilog-AMS equations in analog block. */
349 void pad4bit::calcVerilog (void)
350 {
351 
352 /* ----------------- evaluate verilog analog equations -------------------- */
353 double ID;
354 double IC;
355 double IB;
356 double IA;
357 if
358 ((Number)==(0))
359 {
360 IA=0;
361 IB=0;
362 IC=0;
363 ID=0;
364 }
365 else
366 if
367 ((Number)==(1))
368 {
369 IA=1;
370 IB=0;
371 IC=0;
372 ID=0;
373 }
374 else
375 if
376 ((Number)==(2))
377 {
378 IA=0;
379 IB=1;
380 IC=0;
381 ID=0;
382 }
383 else
384 if
385 ((Number)==(3))
386 {
387 IA=1;
388 IB=1;
389 IC=0;
390 ID=0;
391 }
392 else
393 if
394 ((Number)==(4))
395 {
396 IA=0;
397 IB=0;
398 IC=1;
399 ID=0;
400 }
401 else
402 if
403 ((Number)==(5))
404 {
405 IA=1;
406 IB=0;
407 IC=1;
408 ID=0;
409 }
410 else
411 if
412 ((Number)==(6))
413 {
414 IA=0;
415 IB=1;
416 IC=1;
417 ID=0;
418 }
419 else
420 if
421 ((Number)==(7))
422 {
423 IA=1;
424 IB=1;
425 IC=1;
426 ID=0;
427 }
428 else
429 if
430 ((Number)==(8))
431 {
432 IA=0;
433 IB=0;
434 IC=0;
435 ID=1;
436 }
437 else
438 if
439 ((Number)==(9))
440 {
441 IA=1;
442 IB=0;
443 IC=0;
444 ID=1;
445 }
446 else
447 if
448 ((Number)==(10))
449 {
450 IA=0;
451 IB=1;
452 IC=0;
453 ID=1;
454 }
455 else
456 if
457 ((Number)==(11))
458 {
459 IA=1;
460 IB=1;
461 IC=0;
462 ID=1;
463 }
464 else
465 if
466 ((Number)==(12))
467 {
468 IA=0;
469 IB=0;
470 IC=1;
471 ID=1;
472 }
473 else
474 if
475 ((Number)==(13))
476 {
477 IA=1;
478 IB=0;
479 IC=1;
480 ID=1;
481 }
482 else
483 if
484 ((Number)==(14))
485 {
486 IA=0;
487 IB=1;
488 IC=1;
489 ID=1;
490 }
491 else
492 if
493 ((Number)==(15))
494 {
495 IA=1;
496 IB=1;
497 IC=1;
498 ID=1;
499 }
500 else
501 { /* no default */ }
503 #if defined(_DERIVATE)
504 #endif
506 #if defined(_DERIVATE)
508 #endif
510 #if defined(_DERIVATE)
511 #endif
513 #if defined(_DERIVATE)
515 #endif
517 #if defined(_DERIVATE)
518 #endif
520 #if defined(_DERIVATE)
522 #endif
524 #if defined(_DERIVATE)
525 #endif
527 #if defined(_DERIVATE)
529 #endif
530 
531 /* ------------------ end of verilog analog equations --------------------- */
532 
533 /* ------------------ evaluate verilog noise equations -------------------- */
534 
535 /* ------------------- end of verilog noise equations --------------------- */
536 }
537 
538 /* Perform DC iteration. */
539 void pad4bit::calcDC (void)
540 {
541  // evaluate Verilog code
542  initVerilog ();
543  calcVerilog ();
544 
545  // fill right hand side and static jacobian
546  for (int i1 = 0; i1 < 4; i1++) {
547  setI (i1, _rhs[i1]);
548  for (int i2 = 0; i2 < 4; i2++) {
549  setY (i1, i2, _jstat[i1][i2]);
550  }
551  }
552 }
553 
554 /* Save operating points. */
556 {
557  // save global instance operating points
558 }
559 
560 /* Load operating points. */
562 {
563 }
564 
565 /* Calculate operating points. */
567 {
568 }
569 
570 /* Initialization of AC analysis. */
571 void pad4bit::initAC (void)
572 {
573  allocMatrixMNA ();
574 }
575 
576 /* Perform AC calculations. */
577 void pad4bit::calcAC (nr_double_t frequency)
578 {
579  setMatrixY (calcMatrixY (frequency));
580 }
581 
582 /* Compute Y-matrix for AC analysis. */
583 matrix pad4bit::calcMatrixY (nr_double_t frequency)
584 {
585  _freq = frequency;
587  matrix y (4);
588 
589  for (int i1 = 0; i1 < 4; i1++) {
590  for (int i2 = 0; i2 < 4; i2++) {
591  y (i1,i2) = rect (_jstat[i1][i2], _jdyna[i1][i2] * 2 * M_PI * _freq);
592  }
593  }
594 
595  return y;
596 }
597 
598 /* Initialization of S-parameter analysis. */
599 void pad4bit::initSP (void)
600 {
601  allocMatrixS ();
602 }
603 
604 /* Perform S-parameter calculations. */
605 void pad4bit::calcSP (nr_double_t frequency)
606 {
607  setMatrixS (ytos (calcMatrixY (frequency)));
608 }
609 
610 /* Initialization of transient analysis. */
611 void pad4bit::initTR (void)
612 {
613  setStates (2 * 4 * 4);
614  initDC ();
615 }
616 
617 /* Perform transient analysis iteration step. */
618 void pad4bit::calcTR (nr_double_t)
619 {
620  doHB = 0;
621  doAC = 1;
622  doTR = 1;
623  calcDC ();
624 
625  int i1, i2, i3, i4, state;
626 
627  // 2-node charge integrations
628  for (i1 = 0; i1 < 4; i1++) {
629  for (i2 = 0; i2 < 4; i2++) {
630  state = 2 * (i2 + 4 * i1);
631  if (i1 != i2)
632  if (_charges[i1][i2] != 0.0)
633  transientCapacitanceQ (state, i1, i2, _charges[i1][i2]);
634  } }
635 
636  // 1-node charge integrations
637  for (i1 = 0; i1 < 4; i1++) {
638  state = 2 * (i1 + 4 * i1);
639  if (_charges[i1][i1] != 0.0)
640  transientCapacitanceQ (state, i1, _charges[i1][i1]);
641  }
642 
643  // charge: 2-node, voltage: 2-node
644  for (i1 = 0; i1 < 4; i1++) {
645  for (i2 = 0; i2 < 4; i2++) {
646  if (i1 != i2)
647  for (i3 = 0; i3 < 4; i3++) {
648  for (i4 = 0; i4 < 4; i4++) {
649  if (i3 != i4)
650  if (_caps[i1][i2][i3][i4] != 0.0)
651  transientCapacitanceC (i1, i2, i3, i4, _caps[i1][i2][i3][i4], BP(i3,i4));
652  } } } }
653 
654  // charge: 2-node, voltage: 1-node
655  for (i1 = 0; i1 < 4; i1++) {
656  for (i2 = 0; i2 < 4; i2++) {
657  if (i1 != i2)
658  for (i3 = 0; i3 < 4; i3++) {
659  if (_caps[i1][i2][i3][i3] != 0.0)
660  transientCapacitanceC2Q (i1, i2, i3, _caps[i1][i2][i3][i3], NP(i3));
661  } } }
662 
663  // charge: 1-node, voltage: 2-node
664  for (i1 = 0; i1 < 4; i1++) {
665  for (i3 = 0; i3 < 4; i3++) {
666  for (i4 = 0; i4 < 4; i4++) {
667  if (i3 != i4)
668  if (_caps[i1][i1][i3][i4] != 0.0)
669  transientCapacitanceC2V (i1, i3, i4, _caps[i1][i1][i3][i4], BP(i3,i4));
670  } } }
671 
672  // charge: 1-node, voltage: 1-node
673  for (i1 = 0; i1 < 4; i1++) {
674  for (i3 = 0; i3 < 4; i3++) {
675  if (_caps[i1][i1][i3][i3] != 0.0)
676  transientCapacitanceC (i1, i3, _caps[i1][i1][i3][i3], NP(i3));
677  } }
678 }
679 
680 /* Compute Cy-matrix for AC noise analysis. */
681 matrix pad4bit::calcMatrixCy (nr_double_t frequency)
682 {
683  _freq = frequency;
684  matrix cy (4);
685 
686 
687  return cy;
688 }
689 
690 /* Perform AC noise computations. */
691 void pad4bit::calcNoiseAC (nr_double_t frequency)
692 {
693  setMatrixN (calcMatrixCy (frequency));
694 }
695 
696 /* Perform S-parameter noise computations. */
697 void pad4bit::calcNoiseSP (nr_double_t frequency)
698 {
699  setMatrixN (cytocs (calcMatrixCy (frequency) * z0, getMatrixS ()));
700 }
701 
702 /* Initialization of HB analysis. */
703 void pad4bit::initHB (int)
704 {
705  initDC ();
706  allocMatrixHB ();
707 }
708 
709 /* Perform HB analysis. */
710 void pad4bit::calcHB (int)
711 {
712  doHB = 1;
713  doAC = 1;
714  doTR = 0;
715 
716  // jacobian dI/dV and currents get filled
717  calcDC ();
719 
720  // fill in HB matrices
721  for (int i1 = 0; i1 < 4; i1++) {
722  setQ (i1, _qhs[i1]); // charges
723  setCV (i1, _chs[i1]); // jacobian dQ/dV * V
724  setGV (i1, _ghs[i1]); // jacobian dI/dV * V
725  for (int i2 = 0; i2 < 4; i2++) {
726  setQV (i1, i2, _jdyna[i1][i2]); // jacobian dQ/dV
727  }
728  }
729 }
730 
731 #include "pad4bit.defs.h"