LifeV
ZeroDimensionalCircuitData.hpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
7 
8  This file is part of LifeV.
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with LifeV. If not, see <http://www.gnu.org/licenses/>.
22 
23 *******************************************************************************
24 */
25 //@HEADER
26 
27 /*!
28  * @file
29  * @brief File containing a class for 0D model circuit data handling.
30  * @version alpha (experimental)
31  *
32  * @date 26-09-2011
33  * @author Mahmoud Jafargholi <mahmoud.jafargholi@epfl.ch>
34  *
35  * @contributors Cristiano Malossi <cristiano.malossi@epfl.ch>
36  * @mantainer Cristiano Malossi <cristiano.malossi@epfl.ch>
37  */
38 
39 #ifndef ZeroDimensionalCircuitData_H
40 #define ZeroDimensionalCircuitData_H 1
41 
42 // LIFEV
43 #include <lifev/core/array/MatrixEpetra.hpp>
44 
45 // MATHCARD
46 #include <lifev/zero_dimensional/fem/ZeroDimensionalBCHandler.hpp>
47 #include <lifev/zero_dimensional/solver/ZeroDimensionalDefinitions.hpp>
48 #include <lifev/zero_dimensional/fem/ZeroDimensionalBC.hpp>
49 
50 namespace LifeV
51 {
52 
53 // TODO Move forward declarations in ZeroDimensionalDefinitions
54 // TODO Move type definitions inside classes
55 
56 //! A container class for all node objects
58 
59 //! A container class for all element obkects
61 
67 typedef std::shared_ptr< bc_Type > bcPtr_Type;
68 typedef MatrixEpetra<Real> matrix_Type;
69 typedef VectorEpetra vector_Type;
72 typedef std::shared_ptr< vector_Type > vectorPtr_Type;
74 
75 //! ZeroDimensionalElement - The base element class.
76 /*!
77  * @authors Mahmoud Jafargholi
78  */
80 {
81 public:
82 
83  //! @name Constructors and Destructor
84  //@{
85 
86  //! Constructor
87  explicit ZeroDimensionalElement() {}
88 
89  //! Destructor
90  virtual ~ZeroDimensionalElement() {}
91 
92  //@}
93 
94 
95  //! @name Methods
96  //@{
97 
98  //! Display some information.
99  virtual void showMe ( const Int& flag = 0 );
100 
101  const std::string enum2string ( const ZeroDimensionalElementType& type );
102 
103  //! Connect elements to the nodes.
104  /*!
105  * After all emenets and nodes are created, each element will call this
106  * method to connect itself to the nodes.
107  */
108  virtual void connectElement ( zeroDimensionalNodeSPtr_Type& nodes ) = 0;
109 
110  //! Contribution of the element of matrix \bf{A} and \bf{B} and vector \bf{C}.
111  /*!
112  * After updating the BCs ( or Terminal nodes ) this each element will invoke
113  * this method to compute it's contribution on matrices.
114  */
115  virtual void buildABC ( matrix_Type& /*A*/, matrix_Type& /*B*/, vector_Type& /*C*/, const zeroDimensionalNodeSPtr_Type& /*Nodes*/ ) {}
116 
117  //! Compute outputs (currents and voltages) from the solution vector after each succesful iteration.
118  /*!
119  * After each time step, when Rythmos solver is succesfully finishes, this method will compute
120  * finial outputs ( for exmple currents) from the finial solution vector.
121  */
122  virtual void extractSolution ( const ZeroDimensionalNodeS& /*nodes*/ ) {}
123 
124  //! This method specifies the convention of current direction in an element.
125  /*!
126  * @param A node index connected to the element.
127  * @return +1 if the current convention is toward the iniput node and -1 otherwise.
128  */
129  virtual Real direction ( const Int& nodeId ) const = 0;
130 
131  //@}
132 
133 
134  //! @name Set Methods
135  //@{
136 
137  void setId (const Int& id )
138  {
139  M_id = id;
140  }
141 
142  void setCurrent (const Real& current )
143  {
144  M_current = current;
145  }
146 
147  //! Set derivative of current respect to time.
148  void setDeltaCurrent (const Real& deltaCurrent )
149  {
150  M_deltaCurrent = deltaCurrent;
151  }
152 
153  //@}
154 
155 
156  //! @name Get Methods
157  //@{
158 
159  const Int& id() const
160  {
161  return M_id;
162  }
163 
165  {
166  return M_type;
167  }
168 
169  const Real& current() const
170  {
171  return M_current;
172  }
173 
174  //! Get derivative of current respect to time.
175  const Real& deltaCurrent() const
176  {
177  return M_deltaCurrent;
178  }
179 
180  //@}
181 
182 protected:
183 
185  ZeroDimensionalElementType M_type; //= 'Resistor';%'Capacitor' ,'Inductor','Voltage Source','Current Source' 'Diode'
188 };
189 
190 
191 // TODO Move type definitions inside classes
196 
197 //! ZeroDimensionalElementPassive - A class for passive elements.
198 /*!
199  * @authors Mahmoud Jafargholi
200  */
202 {
203 public:
204 
205  //! @name Constructors and Destructor
206  //@{
207 
208  //! Constructor
210 
211  //! Destructor
213 
214  //@}
215 
216 
217  //! @name Methods
218  //@{
219 
220  //! Show some information.
221  void showMe ( const Int& flag = 0 );
222 
223  //! Impleaments the abstarct class for passive elements.
225 
226  //@}
227 
228 
229  //! @name Set Methods
230  //@{
231 
232  //! set parameter (1/R, 1/L, C, 1/R_{eff})
233  void setParameter ( const Real& parameter )
234  {
235  M_parameter = parameter;
236  }
237 
238  //! add the node to the list.
239  /*!
240  * @param node index.
241  */
242  void setNodeIndex ( const Int& index )
243  {
244  M_nodeIndex.push_back (index);
245  }
246 
247  //@}
248 
249 
250  //! @name Get Methods
251  //@{
252 
253  //! get the parameter (1/R, 1/L, C, 1/R_{eff})
254  const Real& parameter() const
255  {
256  return M_parameter;
257  }
258 
259  //! get the node index connected to the node.
260  /*!
261  * @param \it{i}th node connected to the elelemt.
262  * @return Index of \it{i}th node connected to the element.
263  */
264  const Int& nodeIndex ( const Int& position ) const
265  {
266  return M_nodeIndex.at (position);
267  }
268 
269  Real direction ( const Int& nodeId ) const;
270 
271  //@}
272 
273 protected:
274 
275  //parameter= 'Resistor';%'Capacitor' ,'Inductor','Diode'
276  //parameter= 1/R ;%C ,1/L , 1/R_{eff}
277 
279  vecInt_Type M_nodeIndex; //Index of connected nodes
280 };
281 
282 
283 
284 
285 //! ZeroDimensionalElementPassiveResistor - Resistor.
286 /*!
287  * @authors Mahmoud Jafargholi
288  */
290 {
291 public:
292 
293  //! @name Constructors and Destructor
294  //@{
295 
296  //! Contructor.
298 
299  //! Destructor
301 
302  //@}
303 
304 
305  //! @name Methods
306  //@{
307 
308  void showMe ( const Int& flag = 0 );
309 
310  void buildABC ( matrix_Type& A, matrix_Type& B, vector_Type& C, const zeroDimensionalNodeSPtr_Type& Nodes );
311 
312  void extractSolution ( const ZeroDimensionalNodeS& nodes );
313 
314  //@}
315 };
316 
317 
318 
319 //! ZerodimentionalElementPassiveDiode - Diode.
320 /*!
321  * @authors Mahmoud Jafargholi
322  */
324 {
325 public:
326 
327  //! @name Constructors and Destructor
328  //@{
329 
330  //! Constructor
332 
333  //! Destructor
335 
336  //@}
337 
338 
339  //! @name Methods
340  //@{
341 
342  void showMe ( const Int& flag = 0 );
343 
344  void extractSolution ( const ZeroDimensionalNodeS& nodes );
345 
346  void buildABC ( matrix_Type& A, matrix_Type& B, vector_Type& C, const zeroDimensionalNodeSPtr_Type& Nodes );
347 
348  //@}
349 
350 
351  //! @name Set Methods
352  //@{
353 
354  //!current = beta * exp(alpha * (voltage - forwardBias )) - (beta * exp(alpha * ( - forwardBias )))
355  void setalpha (const Real& alpha )
356  {
357  M_alpha = alpha;
358  }
359 
360  void setbeta (const Real& beta )
361  {
362  M_beta = beta;
363  }
364 
365  void setforwardBias (const Real& forwardBias )
366  {
367  M_forwardBias = forwardBias;
368  }
369 
370  //@}
371 
372 
373  //! @name Get Methods
374  //@{
375 
376  const Real& alpha() const
377  {
378  return M_alpha;
379  }
380 
381  const Real& beta() const
382  {
383  return M_beta;
384  }
385 
386  const Real& forwardBias() const
387  {
388  return M_forwardBias;
389  }
390 
391  //@}
392 
393 protected:
394 
395  //! calculate the effective resistance.
396  /*!
397  * @param voltage difference
398  * @return effective ressitance
399  */
400  void calculateEffectiveResistance (const Real& voltage);
401 
402  Real M_alpha; //current = beta * exp(alpha * (voltage - forwardBias )) - (beta * exp(alpha * ( - forwardBias )))
405 };
406 
407 
408 
409 //! ZerodimentionalElementPassiveCapacitor - Capacitor.
410 /*!
411  * @authors Mahmoud Jafargholi
412  */
414 {
415 public:
416 
417  //! @name Constructors and Destructor
418  //@{
419 
420  //! Constructor
422 
423  //! Destructor
425 
426  //@}
427 
428 
429  //! @name Methods
430  //@{
431 
432  void showMe ( const Int& flag = 0 );
433 
434  void extractSolution ( const ZeroDimensionalNodeS& nodes );
435 
436  void buildABC ( matrix_Type& A, matrix_Type& B, vector_Type& C, const zeroDimensionalNodeSPtr_Type& Nodes );
437 
438  //@}
439 };
440 
441 
442 //! ZeroDimensionalElementPassiveInductor - Inductor.
443 /*!
444  * @authors Mahmoud Jafargholi
445  */
447 {
448 public:
449 
450  //! @name Constructors and Destructor
451  //@{
452 
453  //! Constructor
455 
456  //! Destructor
458 
459  //@}
460 
461 
462  //! @name Methods
463  //@{
464 
465  //! Set the variable index and equation row index for Inductor.
466  /*!
467  *Current in Inductor is an unknown.
468  */
469  virtual void assignVariableIndex ( const Int& index );
470 
471  void showMe ( const Int& flag = 0 );
472 
473  void buildABC ( matrix_Type& A, matrix_Type& B, vector_Type& C, const zeroDimensionalNodeSPtr_Type& Nodes );
474 
475  //@}
476 
477 
478  //! @name Get Methods
479  //@{
480 
481  //! get equation row for in matrix A,B and C.
482  const Int& equationRow() const
483  {
484  return M_equationRow;
485  }
486 
487  //! get variable index in solution vector \f[x\f] and \f[\dot{x}\f]
488  const Int& variableIndex() const
489  {
490  return M_variableIndex;
491  }
492 
493  //@}
494 
495 protected:
498 };
499 
500 
501 
502 //! ZeroDimensionalElementSource - Base class for source elements.
503 /*!
504  * @authors Mahmoud Jafargholi
505  */
507 {
508 
509 public:
510 
511  //! @name Constructors and Destructor
512  //@{
513 
514  //!Constructor
515  explicit ZeroDimensionalElementSource();
516 
517  //! Destructor
519 
520  //@}
521 
522 
523  //! @name Methods
524  //@{
525 
526  void showMe ( const Int& flag = 0 );
527 
528  //@}
529 
530 
531  //! @name Set Methods
532  //@{
533 
534  void setNodeIndex (const Real& index )
535  {
536  M_nodeIndex = index;
537  }
538 
539  //! Set BC handler.
540  void setBC ( const bcPtr_Type& bc)
541  {
542  M_bc = bc;
543  }
544 
545  //@}
546 
547 
548  //! @name Get Methods
549  //@{
550 
551  Int nodeIndex() const
552  {
553  return M_nodeIndex;
554  }
555 
556  Real direction ( const Int& /*nodeId*/ ) const
557  {
558  return -1.0;
559  }
560 
561  //@}
562 
563 protected:
564 
565  Int M_nodeIndex; //Index of connected node
566  bcPtr_Type M_bc;
567 };
568 
569 
570 
571 //! ZeroDimensionalElementVoltageSource - Voltage Source.
572 /*!
573  * @authors Mahmoud Jafargholi
574  */
576 {
577 
578 public:
579 
580  //! @name Constructors and Destructor
581  //@{
582 
583  //! Constructor
585 
586  //! Destructor
588 
589  //@}
590 
591 
592  //! @name Get Methods
593  //@{
594 
596 
597  //! calculate current passing outward in voltage source.
598  /*!
599  * This method can be called after all elements invoked extractSolution method.
600  */
601  void calculateCurrent ( const ZeroDimensionalNodeS& Nodes, const ZeroDimensionalElementS& Elements );
602 
603  //@}
604 
605 
606  //! @name Set Methods
607  //@{
608 
609  //! Update voltage source by time.
610  void setVoltageByTime ( const Real& time )
611  {
612  M_voltage = M_bc->bc ( M_nodeIndex ).evaluate (time);
613  }
614 
615  //! Update \frac{\partial voltage}{\partial t} by time.
616  void setDeltaVoltageByTime ( const Real& time )
617  {
618  M_deltaVoltage = M_bc->bc ( M_nodeIndex + BC_CONSTANT ).evaluate (time);
619  }
620 
621  //@}
622 
623 
624  //! @name Get Methods
625  //@{
626 
627  const Real& voltage() const
628  {
629  return M_voltage;
630  }
631 
633  {
634  return M_deltaVoltage;
635  }
636 
637  Real voltageByTime (const Real& time) const
638  {
639  return M_bc->bc ( M_nodeIndex ).evaluate (time);
640  }
641 
642  Real deltaVoltageByTime (const Real& time) const
643  {
644  return M_bc->bc ( M_nodeIndex + BC_CONSTANT ).evaluate (time);
645  }
646 
647  //@}
648 
649 protected:
650 
651  Real M_voltage ; //voltage at time t_{n}
652  Real M_deltaVoltage ; //\frac{\mathrm{d \text{ voltage}} }{\mathrm{d} t}
653 };
654 
655 
656 
657 //! ZeroDimensionalElementCurrentSource - Current Source.
658 /*!
659  * @authors Mahmoud Jafargholi
660  */
662 {
663 
664 public:
665 
666  //! @name Constructors and Destructor
667  //@{
668 
669  //! Constructor.
671 
672  //! Destructor
674 
675  //@}
676 
677 
678  //! @name Methods
679  //@{
680 
682 
683  void buildABC ( matrix_Type& A, matrix_Type& B, vector_Type& C, const zeroDimensionalNodeSPtr_Type& Nodes );
684 
685  //@}
686 
687 
688  //! @name set Methods
689  //@{
690 
691  void setCurrentByTime (const Real& time )
692  {
693  M_current = M_bc->bc ( M_nodeIndex ).evaluate (time);
694  }
695 
696  //@}
697 
698 
699  //! @name Get Methods
700  //@{
701 
702  Real currentByTime (const Real& time ) const
703  {
704  return M_bc->bc ( M_nodeIndex ).evaluate (time);
705  }
706 
707  Real current() const
708  {
709  return M_current;
710  }
711 
712  //@}
713 
714 };
715 
716 
717 
718 
719 
720 
721 
722 
723 
724 
725 
726 
727 
728 // TODO Move type definitions inside classes
735 
736 
743 
744 
751 
758 
759 
760 //! ZeroDimensionalNode - The base node class.
761 /*!
762  * @authors Mahmoud Jafargholi
763  */
765 {
766 public:
767 
768  //! @name Constructors and Destructor
769  //@{
770 
771  //! Constructor
772  explicit ZeroDimensionalNode();
773 
774  //! Destructor
775  virtual ~ZeroDimensionalNode() {}
776 
777  //@}
778 
779 
780  //! @name Methods
781  //@{
782 
783  //! Calculate current balance at node.
784  /*!
785  * After updating current in all elements, we can verify the balance of current flow at each node.
786  */
787  void calculateCurrentBalance ( const ZeroDimensionalElementS& Elements );
788 
789  virtual void showMe ( const Int& flag = 0 );
790 
791  //@}
792 
793 
794  //! @name Set Methods
795  //@{
796 
797  const std::string enum2string ( const ZeroDimensionalNodeType& type ) const;
798 
799  void setId ( const Int& id )
800  {
801  M_id = id;
802  }
803 
804  //! add an element index to the elelemt list.
805  void setElementListIndex ( const Int& index )
806  {
807  M_elementListIndex.push_back (index);
808  }
809 
810  //! add an node index which is connected by an element in element list.
811  /*!
812  * Each elelemnt in element list, coonects this node to another node ( except source elementt). nodeList is a container for conecting nodes.
813  * If the element connected to this node has only one terminal ( like voltage source and current source), the connecting index would be -1.
814  */
815  void setNodeListIndex (const Int& index )
816  {
817  M_nodeListIndex.push_back (index);
818  }
819 
820  virtual void setVoltage (const Real& voltage )
821  {
822  M_voltage = voltage;
823  }
824 
825  virtual void setDeltaVoltage (const Real& deltaVoltage )
826  {
827  M_deltaVoltage = deltaVoltage;
828  }
829 
830  //@}
831 
832 
833  //! @name Get Methods
834  //@{
835 
836  const Int& id() const
837  {
838  return M_id;
839  }
840 
842  {
843  return M_type;
844  }
845 
846  const Int& elementListIndexAt ( const Int& position ) const
847  {
848  return M_elementListIndex.at (position);
849  }
850 
852  {
853  return M_elementListIndex;
854  }
855 
856  const Int& nodeListIndexAt ( const Int& position ) const
857  {
858  return M_nodeListIndex.at (position);
859  }
860 
861  virtual const Real& voltage() const
862  {
863  return M_voltage;
864  }
865 
866  virtual Real deltaVoltage() const
867  {
868  return M_deltaVoltage;
869  }
870 
871  const Real& currentBalance() const
872  {
873  return M_currentBalance;
874  }
875 
876  //@}
877 
878 protected:
879 
881  ZeroDimensionalNodeType M_type; //= 'Known';%'Unknown'
882  Real M_currentBalance; //sum of currents over all branches
883  vecInt_Type M_elementListIndex; // List of id(s) of connected Elements to this Node
884  vecInt_Type M_nodeListIndex; // List of id(s) of connected Nodes to this Node
887 };
888 
889 
890 //! ZeroDimensionalNodeUnknown - This class defines the unknown node class.
891 /*!
892  * @authors Mahmoud Jafargholi
893  */
895 {
896 public:
897 
898  //! @name Constructors and Destructor
899  //@{
900 
901  //! Constructor
902  explicit ZeroDimensionalNodeUnknown();
903 
904  //! Destructor
906 
907  //@}
908 
909 
910  //! @name Methods
911  //@{
912 
913  void showMe ( const Int& flag = 0 );
914 
915  //@}
916 
917 
918  //! @name Set Methods
919  //@{
920 
921  //! assign the index of the unknown voltage.
922  void assignVariableIndex (const Int& index) ;
923 
924  //@}
925 
926 
927  //! @name Get Methods
928  //@{
929 
930  const Int& variableIndex() const
931  {
932  return M_variableIndex;
933  }
934 
935  const Int& equationRow() const
936  {
937  return M_equationRow;
938  }
939 
940  //@}
941 
942 protected:
943  Int M_variableIndex; // Index of the variable
944  Int M_equationRow; // #Row(equation) in the Matrix
945 };
946 
947 
948 
949 //! ZeroDimensionalNodeKnown - This class defines the known node class. A Voltage Source element is connected to this class.
950 /*!
951  * @authors Mahmoud Jafargholi
952  */
954 {
955 public:
956 
957  //! @name Constructors and Destructor
958  //@{
959 
960  //! Contructor
961  explicit ZeroDimensionalNodeKnown();
962 
963  //! Contructor.
964  /*!
965  *@param Voltage Source connected to the knwn node.
966  */
968 
969 
970  //! Destructor
972 
973  //@}
974 
975 
976  //! @name Set Methods
977  //@{
978 
979  //!Set the VoltageSource Element which is connected to the Node
981  {
982  M_element = element;
983  }
984 
985  void setVoltageByTime (const Real& time )
986  {
987  M_voltage = M_element->voltageByTime (time);
988  M_element->setVoltageByTime (time);
989  }
990 
991  void setDeltaVoltageByTime (const Real& time )
992  {
993  M_deltaVoltage = M_element->deltaVoltageByTime (time);
994  M_element->setDeltaVoltageByTime (time);
995  }
996 
997  const Real& voltage() const
998  {
999  return M_element->voltage();
1000  }
1001 
1002  Real voltageByTime (Real& time) const
1003  {
1004  return M_element->voltageByTime (time);
1005  }
1006 
1008  {
1009  return M_element->deltaVoltageByTime (time);
1010  }
1011 
1012  //@}
1013 
1014 protected:
1015 
1017 };
1018 
1019 
1020 
1021 
1022 // TODO Move type definitions inside classes
1027 
1032 
1037 
1040 
1041 
1042 //! ZeroDimensionalElementS - Container of elements
1043 /*!
1044  * @authors Mahmoud Jafargholi
1045  */
1047 {
1048 public:
1049 
1050  //! constructor
1051  explicit ZeroDimensionalElementS();
1052 
1053  //! Destructor
1055 
1056  void showMe ( const Int& flag = 0 );
1057 
1058  //! add element to the list.
1060  {
1061  M_elementList->push_back (theElement);
1062  }
1063 
1064  //! get element.
1065  /*!
1066  *@param element index
1067  *@return element
1068  */
1069  const zeroDimensionalElementPtr_Type& elementListAt ( const Int& index ) const
1070  {
1071  return M_elementList->at (index);
1072  }
1073 
1075  {
1076  return M_elementList;
1077  }
1078 
1080  {
1081  return M_resistorList;
1082  }
1083 
1085  {
1086  return M_capacitorList;
1087  }
1088 
1090  {
1091  return M_inductorList;
1092  }
1093 
1095  {
1096  return M_diodeList;
1097  }
1098 
1100  {
1101  return M_voltageSourceList;
1102  }
1103 
1105  {
1106  return M_currentSourceList;
1107  }
1108 
1109  //! total number of elements including sources.
1111  {
1112  return M_elementList->size(); //TODO Why when I use CONST I get a warning??
1113  }
1114 
1116  {
1117  return M_resistorList->size();
1118  }
1119 
1121  {
1122  return M_capacitorList->size();
1123  }
1124 
1126  {
1127  return M_inductorList->size();
1128  }
1129 
1131  {
1132  return M_diodeList->size();
1133  }
1134 
1136  {
1137  return M_voltageSourceList->size();
1138  }
1139 
1141  {
1142  return M_currentSourceList->size();
1143  }
1144 
1145  //! add resistor to the resistor list.
1147  {
1148  M_resistorList->push_back (resistorPtr);
1149  }
1150 
1151  //! add capacitor to the capacitor list.
1153  {
1154  M_capacitorList->push_back (capacitorPtr);
1155  }
1156 
1157  //! add inductor to the inductor list.
1159  {
1160  M_inductorList->push_back (inductorPtr);
1161  }
1162 
1163  //! add diode to the diode list.
1165  {
1166  M_diodeList->push_back (diodePtr);
1167  }
1168 
1169  //! add currentSource to the current Source list.
1171  {
1172  M_currentSourceList->push_back (currentSourcePtr);
1173  }
1174 
1175  //! add voltgeSource to the voltage source list.
1177  {
1178  M_voltageSourceList->push_back (voltageSourcePtr);
1179  }
1180 
1181  //! add object to the map from voltage source index to the voltage source object.
1183  {
1184  (*M_voltageSourceMap) [id] = voltageSource;
1185  }
1186 
1188  {
1189  return (*M_voltageSourceMap) [id] ;
1190  }
1191 
1192 protected:
1193 
1194  //!List of Elements Ptr
1203 };
1204 
1205 // TODO Move type definitions inside classes
1210 
1211 
1212 
1213 //! ZeroDimensionalNodeS - Container of nodes
1214 /*!
1215  * @authors Mahmoud Jafargholi
1216  */
1218 {
1219 public:
1220 
1221  //! @name Constructors and Destructor
1222  //@{
1223 
1224  //! Constructor
1225  explicit ZeroDimensionalNodeS();
1226 
1227  //! Destructor
1228  virtual ~ZeroDimensionalNodeS() {}
1229 
1230  virtual void showMe ( const Int& flag = 0 );
1231 
1232  const zeroDimensionalNodePtr_Type& nodeListAt ( const Int& index ) const
1233  {
1234  return M_nodeList->at (index);
1235  }
1236 
1238  {
1239  return M_unknownNodeList->at (Index);
1240  }
1241 
1243  {
1244  return M_knownNodeList->at (Index);
1245  }
1246 
1248  {
1249  return M_nodeList;
1250  }
1251 
1253  {
1254  return M_unknownNodeList;
1255  }
1256 
1258  {
1259  return M_knownNodeList;
1260  }
1261 
1263  {
1264  return (*M_knownNodeMap) [id];
1265  }
1266 
1268  {
1269  return (*M_unknownNodeMap) [id];
1270  }
1271 
1272  //! add node to the list
1274  {
1275  M_nodeList->push_back (theNode);
1276  }
1277 
1278  //! add unknownNode to the unknwnNode List
1280  {
1281  M_unknownNodeList->push_back (unknownNode);
1282  }
1283 
1284  //! add knownNode to the knwnNode List
1286  {
1287  M_knownNodeList->push_back (knownNode);
1288  }
1289 
1290  //! add knownNode to the map. A map from the index (id) to the object.
1291  void setknownNodeMap ( const Int& id, const zeroDimensionalNodeKnownPtr_Type& knownNode)
1292  {
1293  (*M_knownNodeMap) [id] = knownNode;
1294  }
1295 
1296  //! add unknownNode to the map. A map from the index (id) to the object.
1297  void setunknownNodeMap ( const Int& id, const zeroDimensionalNodeUnknownPtr_Type& unknownNode)
1298  {
1299  (*M_unknownNodeMap) [id] = unknownNode;
1300  }
1301 
1303  {
1304  return M_unknownNodeList->size();
1305  }
1306 
1308  {
1309  return M_knownNodeList->size();
1310  }
1311 
1313  {
1314  return M_nodeList->size();
1315  }
1316 
1317 protected:
1318 
1319  //List of Nodes
1325 };
1326 
1327 
1328 
1329 //! ZeroDimensionalCircuitData - Container of circuit data
1330 /*!
1331  * @authors Mahmoud Jafargholi
1332  */
1334 {
1335 public:
1336 
1337  //! @name Constructors and Destructor
1338  //@{
1339 
1340  //! Constructor
1341  explicit ZeroDimensionalCircuitData();
1342 
1343  //! Destructor
1345 
1346  //@}
1347 
1348  void showMe ( const Int& flag = 0 );
1349 
1350  //! create the circuit.
1351  /*!
1352  * @param circuit file
1353  * @param BC handler
1354  */
1355  void buildCircuit (const char* fileName, bcPtr_Type bc);
1356 
1357  //! get element container object.
1359  {
1360  return M_Elements;
1361  }
1362 
1363  //! get node container object.
1365  {
1366  return M_Nodes;
1367  }
1368 
1369  //! (shallow) update the circuit data from the solution.
1370  /*!
1371  * This method is invoked every iteration before calling the updateABC method.
1372  * This method updates the circuit data which is dependent on time or solution vector. For example
1373  * source elements are function of time and diode R_{eff} are function of voltage difference.
1374  */
1375  void updateCircuitDataFromY (const Real& t, const Epetra_Vector* y, const Epetra_Vector* yp);
1376 
1377  //! create matrix A,B and C.
1378  /*!
1379  * before calling this method, updateCircuitDataFromY method should be invoked.
1380  */
1381  void updateABC (matrix_Type& A, matrix_Type& B, vector_Type& C);
1382 
1383 
1384  //! (deep) update the circuit data from solution.
1385  /*!
1386  * This methed is invoked after Rythoms step is finished. This method computes currents.
1387  */
1388  void extractSolutionFromY (const Real& t, const Epetra_Vector& y, const Epetra_Vector& yp);
1389 
1390 protected:
1391 
1392  // set BCs to source elements
1393  void fixBC (bcPtr_Type bc);
1394 
1395  void createElementResistor (Int ID, Int node1, Int node2, Real parameter);
1396  void createElementCapacitor (Int ID, Int node1, Int node2, Real parameter );
1397  void createElementInductor (Int ID, Int node1, Int node2, Real parameter);
1398  void createElementDiode (Int ID, Int node1, Int node2, Real forwardBias, Real alpha, Real beta);
1400  void createElementCurrentSource (Int node1);
1401  void createUnknownNode (const Int& id);
1402  void createKnownNode (const Int& id);
1403  void createKnownNode (const Int& id, const zeroDimensionalElementVoltageSourcePtr_Type& theElement);
1404 
1407  bcPtr_Type M_bc;
1408 };
1409 
1410 
1411 
1412 
1413 
1414 
1416 
1417 //! OutPutFormat - Write to output
1418 /*!
1419  * @authors Mahmoud Jafargholi
1420  */
1422 {
1423 public:
1424 
1425  //! Constructor
1426  explicit OutPutFormat ( std::string width, std::string precision, std::string whiteSpace, Int bufferSize);
1427 
1428  //! Destructor
1429  virtual ~OutPutFormat();
1430 
1432 
1433  void writeDataFormat (const Real& number, std::ofstream& stream, const EndLine& flag);
1434  void writeDataFormat (const Int& number, std::ofstream& stream, const EndLine& flag);
1435  void writeDataFormat (const std::string& text, std::ofstream& stream, const EndLine& flag);
1436  void writeNewLine (std::ofstream& stream);
1437 
1438 private:
1439 
1440  std::string M_width;
1442  std::string M_precision ;
1443  std::string M_whiteSpace ;
1444  std::string M_formatDouble;
1445  std::string M_formatInteger;
1446  std::string M_formatString;
1447  char* M_buffer;
1448 };
1449 
1450 } // LifeV namespace
1451 
1452 #endif //ZeroDimensionalCircuitData_H
void connectElement(zeroDimensionalNodeSPtr_Type &Nodes)
Connect elements to the nodes.
VectorEpetra - The Epetra Vector format Wrapper.
ZeroDimensionalElementPassiveInductor - Inductor.
ZeroDimensionalNodeKnown(const zeroDimensionalElementVoltageSourcePtr_Type &theElement)
Contructor.
void extractSolution(const ZeroDimensionalNodeS &nodes)
Compute outputs (currents and voltages) from the solution vector after each succesful iteration...
void buildABC(matrix_Type &A, matrix_Type &B, vector_Type &C, const zeroDimensionalNodeSPtr_Type &Nodes)
Contribution of the element of matrix {A} and {B} and vector {C}.
std::vector< zeroDimensionalNodeKnownPtr_Type > vecZeroDimensionalNodeKnownPtr_Type
void setalpha(const Real &alpha)
current = beta * exp(alpha * (voltage - forwardBias )) - (beta * exp(alpha * ( - forwardBias ))) ...
const ptrVecZeroDimensionalNodeKnownPtr_Type knownNodeList() const
void createElementCapacitor(Int ID, Int node1, Int node2, Real parameter)
vecZeroDimensionalElementPassiveInductorPtr_Type::iterator iterZeroDimensionalElementPassiveInductor_Type
virtual const Real & voltage() const
virtual void showMe(const Int &flag=0)
vecZeroDimensionalElementPassiveCapacitorPtr_Type::iterator iterZeroDimensionalElementPassiveCapacitor_Type
ZerodimentionalElementPassiveCapacitor - Capacitor.
ZeroDimensionalElementPassive - A class for passive elements.
std::shared_ptr< ZeroDimensionalNodeKnown > zeroDimensionalNodeKnownPtr_Type
void setknownNodeList(const zeroDimensionalNodeKnownPtr_Type &knownNode)
add knownNode to the knwnNode List
vecZeroDimensionalElementPassiveDiodePtr_Type::iterator iterZeroDimensionalElementPassiveDiode_Type
std::vector< Int > vecInt_Type
const ptrVecZeroDimensionalElementPtr_Type & elementList() const
std::shared_ptr< vecZeroDimensionalElementCurrentSourcePtr_Type > ptrVecZeroDimensionalElementCurrentSourcePtr_Type
virtual void connectElement(zeroDimensionalNodeSPtr_Type &nodes)=0
Connect elements to the nodes.
void buildABC(matrix_Type &A, matrix_Type &B, vector_Type &C, const zeroDimensionalNodeSPtr_Type &Nodes)
Contribution of the element of matrix {A} and {B} and vector {C}.
void setElementListIndex(const Int &index)
add an element index to the elelemt list.
std::shared_ptr< ZeroDimensionalNodeS > zeroDimensionalNodeSPtr_Type
ZeroDimensionalCircuitData - Container of circuit data.
void connectElement(zeroDimensionalNodeSPtr_Type &nodes)
Impleaments the abstarct class for passive elements.
#define BC_CONSTANT
const zeroDimensionalNodeUnknownPtr_Type unknownNodeMapAt(Int &id) const
std::shared_ptr< mapNodeUnknown_Type > mapNodeUnknownPtr_Type
std::shared_ptr< vecZeroDimensionalElementPassiveCapacitorPtr_Type > ptrVecZeroDimensionalElementPassiveCapacitorPtr_Type
void createKnownNode(const Int &id, const zeroDimensionalElementVoltageSourcePtr_Type &theElement)
void calculateCurrentBalance(const ZeroDimensionalElementS &Elements)
Calculate current balance at node.
void setelementList(const zeroDimensionalElementPtr_Type &theElement)
add element to the list.
vecZeroDimensionalElementVoltageSourcePtr_Type::iterator iterZeroDimensionalElementVoltageSourcePtr_Type
std::vector< zeroDimensionalElementPassiveDiodePtr_Type > vecZeroDimensionalElementPassiveDiodePtr_Type
void importFromHDF5(std::string const &fileName, std::string const &matrixName="matrix")
Read a matrix from a HDF5 (.h5) file.
ZerodimentionalElementPassiveDiode - Diode.
std::shared_ptr< matrix_Type > matrixPtr_Type
const ptrVecZeroDimensionalElementPassiveCapacitorPtr_Type & capacitorList() const
std::shared_ptr< vecZeroDimensionalNodeKnownPtr_Type > ptrVecZeroDimensionalNodeKnownPtr_Type
std::shared_ptr< ZeroDimensionalElementPassiveDiode > zeroDimensionalElementPassiveDiodePtr_Type
const zeroDimensionalNodeSPtr_Type Nodes() const
get node container object.
void showMe(const Int &flag=0)
Show some information.
ZeroDimensionalBCHandler - A boundary conditions handler for zero-dimensional models.
void showMe(const Int &flag=0)
Show some information.
virtual void showMe(const Int &flag=0)
void setknownNodeMap(const Int &id, const zeroDimensionalNodeKnownPtr_Type &knownNode)
add knownNode to the map. A map from the index (id) to the object.
ptrVecZeroDimensionalElementPassiveInductorPtr_Type M_inductorList
ptrVecZeroDimensionalElementPassiveDiodePtr_Type M_diodeList
OutPutFormat - Write to output.
ZeroDimensionalElement - The base element class.
const std::string enum2string(const ZeroDimensionalElementType &type)
void extractSolution(const ZeroDimensionalNodeS &nodes)
Compute outputs (currents and voltages) from the solution vector after each succesful iteration...
int32_type Int
Generic integer data.
Definition: LifeV.hpp:188
const ptrVecZeroDimensionalElementPassiveResistorPtr_Type & resistorList() const
const ptrVecZeroDimensionalElementCurrentSourcePtr_Type & currentSourceList() const
std::vector< zeroDimensionalElementCurrentSourcePtr_Type > vecZeroDimensionalElementCurrentSourcePtr_Type
OutPutFormat(std::string width, std::string precision, std::string whiteSpace, Int bufferSize)
Constructor.
void updateABC(matrix_Type &A, matrix_Type &B, vector_Type &C)
create matrix A,B and C.
virtual void buildABC(matrix_Type &, matrix_Type &, vector_Type &, const zeroDimensionalNodeSPtr_Type &)
Contribution of the element of matrix {A} and {B} and vector {C}.
std::shared_ptr< ZeroDimensionalElementS > zeroDimensionalElementSPtr_Type
void updateInverseJacobian(const UInt &iQuadPt)
const zeroDimensionalNodeKnownPtr_Type knownNodeMapAt(Int &id) const
const ZeroDimensionalElementType & type() const
void writeNewLine(std::ofstream &stream)
const Int & nodeIndex(const Int &position) const
get the node index connected to the node.
void setunknownNodeMap(const Int &id, const zeroDimensionalNodeUnknownPtr_Type &unknownNode)
add unknownNode to the map. A map from the index (id) to the object.
void setVoltageSourceList(const zeroDimensionalElementVoltageSourcePtr_Type &voltageSourcePtr)
add voltgeSource to the voltage source list.
const ZeroDimensionalNodeType & type() const
void createElementInductor(Int ID, Int node1, Int node2, Real parameter)
std::shared_ptr< vecZeroDimensionalElementPassiveDiodePtr_Type > ptrVecZeroDimensionalElementPassiveDiodePtr_Type
std::shared_ptr< vecZeroDimensionalNodePtr_Type > ptrVecZeroDimensionalNodePtr_Type
const zeroDimensionalNodeUnknownPtr_Type unknownNodeListAt(const Int &Index) const
virtual void setDeltaVoltage(const Real &deltaVoltage)
void showMe(const Int &flag=0)
Show some information.
const ptrVecZeroDimensionalElementPassiveDiodePtr_Type & diodeList() const
void createElementDiode(Int ID, Int node1, Int node2, Real forwardBias, Real alpha, Real beta)
std::vector< zeroDimensionalNodeUnknownPtr_Type > vecZeroDimensionalNodeUnknownPtr_Type
std::map< Int, zeroDimensionalNodeKnownPtr_Type > mapNodeKnown_Type
const Int & variableIndex() const
get variable index in solution vector and
zeroDimensionalElementSPtr_Type M_Elements
void buildCircuit(const char *fileName, bcPtr_Type bc)
create the circuit.
void showMe(const Int &flag=0)
Show some information.
std::shared_ptr< ZeroDimensionalElementCurrentSource > zeroDimensionalElementCurrentSourcePtr_Type
ZeroDimensionalNodeKnown - This class defines the known node class. A Voltage Source element is conne...
const zeroDimensionalNodeKnownPtr_Type knownNodeListAt(const Int &Index) const
ptrVecZeroDimensionalNodeKnownPtr_Type M_knownNodeList
const zeroDimensionalNodePtr_Type & nodeListAt(const Int &index) const
virtual void extractSolution(const ZeroDimensionalNodeS &)
Compute outputs (currents and voltages) from the solution vector after each succesful iteration...
void writeDataFormat(const Real &number, std::ofstream &stream, const EndLine &flag)
ptrVecZeroDimensionalElementPassiveCapacitorPtr_Type M_capacitorList
const Real & deltaCurrent() const
Get derivative of current respect to time.
std::vector< zeroDimensionalElementPtr_Type > vecZeroDimensionalElementPtr_Type
ZeroDimensionalElementVoltageSource - Voltage Source.
const Int & equationRow() const
get equation row for in matrix A,B and C.
const zeroDimensionalElementSPtr_Type Elements() const
get element container object.
virtual void setVoltage(const Real &voltage)
Int elementCounter() const
total number of elements including sources.
std::shared_ptr< ZeroDimensionalElement > zeroDimensionalElementPtr_Type
void calculateCurrent(const ZeroDimensionalNodeS &Nodes, const ZeroDimensionalElementS &Elements)
calculate current passing outward in voltage source.
void setElement(const zeroDimensionalElementVoltageSourcePtr_Type &element)
Set the VoltageSource Element which is connected to the Node.
Real direction(const Int &) const
This method specifies the convention of current direction in an element.
vecZeroDimensionalElementPtr_Type::iterator iterZeroDimensionalElement_Type
const vecInt_Type & elementListIndex() const
void setnodeList(const zeroDimensionalNodePtr_Type &theNode)
add node to the list
vecZeroDimensionalNodePtr_Type::iterator iterZeroDimensionalNode_Type
const ptrVecZeroDimensionalElementVoltageSourcePtr_Type & voltageSourceList() const
void setBC(const bcPtr_Type &bc)
Set BC handler.
ZeroDimensionalElementS - Container of elements.
const std::string enum2string(const ZeroDimensionalNodeType &type) const
Real direction(const Int &nodeId) const
This method specifies the convention of current direction in an element.
std::vector< zeroDimensionalElementPassiveCapacitorPtr_Type > vecZeroDimensionalElementPassiveCapacitorPtr_Type
ZeroDimensionalElementPassiveResistor - Resistor.
void setVoltageSourceMap(const Int &id, const zeroDimensionalElementVoltageSourcePtr_Type &voltageSource)
add object to the map from voltage source index to the voltage source object.
std::shared_ptr< vecZeroDimensionalElementPassiveResistorPtr_Type > ptrVecZeroDimensionalElementPassiveResistorPtr_Type
virtual void assignVariableIndex(const Int &index)
Set the variable index and equation row index for Inductor.
double Real
Generic real data.
Definition: LifeV.hpp:175
ptrVecZeroDimensionalNodeUnknownPtr_Type M_unknownNodeList
void setDiodeList(const zeroDimensionalElementPassiveDiodePtr_Type &diodePtr)
add diode to the diode list.
void showMe(const Int &flag=0)
Show some information.
vecZeroDimensionalElementCurrentSourcePtr_Type::iterator iterZeroDimensionalElementCurrentSource_Type
const ptrVecZeroDimensionalNodePtr_Type nodeList() const
ZeroDimensionalNodeS - Container of nodes.
vecZeroDimensionalNodeUnknownPtr_Type::iterator iterZeroDimensionalNodeUnknown_Type
void showMe(const Int &flag=0)
Display some information.
std::map< Int, zeroDimensionalElementVoltageSourcePtr_Type > mapVoltageSource_Type
void createElementResistor(Int ID, Int node1, Int node2, Real parameter)
const zeroDimensionalElementPtr_Type & elementListAt(const Int &index) const
get element.
std::shared_ptr< vecZeroDimensionalElementPtr_Type > ptrVecZeroDimensionalElementPtr_Type
ZeroDimensionalNode - The base node class.
ptrVecZeroDimensionalElementPtr_Type M_elementList
List of Elements Ptr.
void setunknownNodeList(const zeroDimensionalNodeUnknownPtr_Type &unknownNode)
add unknownNode to the unknwnNode List
void connectElement(zeroDimensionalNodeSPtr_Type &Nodes)
Connect elements to the nodes.
void setInductorList(const zeroDimensionalElementPassiveInductorPtr_Type &inductorPtr)
add inductor to the inductor list.
void buildABC(matrix_Type &A, matrix_Type &B, vector_Type &C, const zeroDimensionalNodeSPtr_Type &Nodes)
Contribution of the element of matrix {A} and {B} and vector {C}.
std::shared_ptr< vecZeroDimensionalElementVoltageSourcePtr_Type > ptrVecZeroDimensionalElementVoltageSourcePtr_Type
void extractSolution(const ZeroDimensionalNodeS &nodes)
Compute outputs (currents and voltages) from the solution vector after each succesful iteration...
void assignVariableIndex(const Int &index)
assign the index of the unknown voltage.
std::shared_ptr< mapNodeKnown_Type > mapNodeKnownPtr_Type
ptrVecZeroDimensionalElementPassiveResistorPtr_Type M_resistorList
void setNodeIndex(const Int &index)
add the node to the list.
const ptrVecZeroDimensionalNodeUnknownPtr_Type & unknownNodeList() const
std::shared_ptr< vecZeroDimensionalNodeUnknownPtr_Type > ptrVecZeroDimensionalNodeUnknownPtr_Type
const Int & elementListIndexAt(const Int &position) const
const Int & nodeListIndexAt(const Int &position) const
virtual ~OutPutFormat()
Destructor.
void updateCircuitDataFromY(const Real &t, const Epetra_Vector *y, const Epetra_Vector *yp)
(shallow) update the circuit data from the solution.
void setDeltaCurrent(const Real &deltaCurrent)
Set derivative of current respect to time.
const Real & parameter() const
get the parameter (1/R, 1/L, C, 1/R_{eff})
virtual Real direction(const Int &nodeId) const =0
This method specifies the convention of current direction in an element.
std::vector< zeroDimensionalElementPassiveInductorPtr_Type > vecZeroDimensionalElementPassiveInductorPtr_Type
std::shared_ptr< mapVoltageSource_Type > mapVoltageSourcePtr_Type
std::shared_ptr< ZeroDimensionalElementVoltageSource > zeroDimensionalElementVoltageSourcePtr_Type
Epetra_Vector vectorEpetra_Type
void setVoltageByTime(const Real &time)
Update voltage source by time.
std::vector< zeroDimensionalNodePtr_Type > vecZeroDimensionalNodePtr_Type
void setDeltaVoltageByTime(const Real &time)
Update { voltage}{ t} by time.
std::map< Int, zeroDimensionalNodeUnknownPtr_Type > mapNodeUnknown_Type
vecZeroDimensionalElementPassiveResistorPtr_Type::iterator iterZeroDimensionalElementPassiveResistor_Type
void setCurrentSourceList(const zeroDimensionalElementCurrentSourcePtr_Type &currentSourcePtr)
add currentSource to the current Source list.
void setCapacitorList(const zeroDimensionalElementPassiveCapacitorPtr_Type &capacitorPtr)
add capacitor to the capacitor list.
vecZeroDimensionalNodeKnownPtr_Type::iterator iterZeroDimensionalNodeKnown_Type
std::shared_ptr< ZeroDimensionalNodeUnknown > zeroDimensionalNodeUnknownPtr_Type
ptrVecZeroDimensionalElementCurrentSourcePtr_Type M_currentSourceList
std::shared_ptr< vectorEpetra_Type > vectorEpetraPtr_Type
std::shared_ptr< ZeroDimensionalNode > zeroDimensionalNodePtr_Type
void setResistorList(const zeroDimensionalElementPassiveResistorPtr_Type &resistorPtr)
add resistor to the resistor list.
const zeroDimensionalElementVoltageSourcePtr_Type voltageSourceMap(Int &id) const
vecInt_Type::iterator iterVecInt_Type
std::vector< zeroDimensionalElementVoltageSourcePtr_Type > vecZeroDimensionalElementVoltageSourcePtr_Type
void buildABC(matrix_Type &A, matrix_Type &B, vector_Type &C, const zeroDimensionalNodeSPtr_Type &Nodes)
Contribution of the element of matrix {A} and {B} and vector {C}.
void extractSolutionFromY(const Real &t, const Epetra_Vector &y, const Epetra_Vector &yp)
(deep) update the circuit data from solution.
virtual void showMe(const Int &flag=0)
Display some information.
ZeroDimensionalElementCurrentSource - Current Source.
ZeroDimensionalElementSource - Base class for source elements.
zeroDimensionalElementVoltageSourcePtr_Type M_element
std::shared_ptr< ZeroDimensionalElementPassiveCapacitor > zeroDimensionalElementPassiveCapacitorPtr_Type
std::shared_ptr< ZeroDimensionalElementPassiveInductor > zeroDimensionalElementPassiveInductorPtr_Type
ptrVecZeroDimensionalElementVoltageSourcePtr_Type M_voltageSourceList
ZeroDimensionalNodeUnknown - This class defines the unknown node class.
std::shared_ptr< ZeroDimensionalElementPassiveResistor > zeroDimensionalElementPassiveResistorPtr_Type
ptrVecZeroDimensionalNodePtr_Type M_nodeList
void setParameter(const Real &parameter)
set parameter (1/R, 1/L, C, 1/R_{eff})
void writeDataFormat(const std::string &text, std::ofstream &stream, const EndLine &flag)
void calculateEffectiveResistance(const Real &voltage)
calculate the effective resistance.
ZeroDimensionalBCHandler bc_Type
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191
void setNodeListIndex(const Int &index)
add an node index which is connected by an element in element list.
std::vector< zeroDimensionalElementPassiveResistorPtr_Type > vecZeroDimensionalElementPassiveResistorPtr_Type
std::shared_ptr< vecZeroDimensionalElementPassiveInductorPtr_Type > ptrVecZeroDimensionalElementPassiveInductorPtr_Type
void buildABC(matrix_Type &A, matrix_Type &B, vector_Type &C, const zeroDimensionalNodeSPtr_Type &Nodes)
Contribution of the element of matrix {A} and {B} and vector {C}.
std::shared_ptr< ZeroDimensionalCircuitData > zeroDimensionalCircuitDataPtr_Type
const ptrVecZeroDimensionalElementPassiveInductorPtr_Type & inductorList() const