Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
etr_sim.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  etr_sim.cpp
3  ------------
4  begin : Wed Dec 04 2013
5  copyright : (C) 2013 by Richard Crozier
6  email : richard.crozier@yahoo.co.uk
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 #include <QtGui>
18 #include "etr_sim.h"
19 #include "main.h"
20 
21 
23 {
24  Description = QObject::tr("externally driven transient simulation");
25 
26  QString s = Description;
27  int a = 17;
28  s[a] = '\n';
29 
30  Texts.append(new Text(0, 0, s.left(a), Qt::darkBlue, QucsSettings.largeFontSize));
31  if (a != -1)
32  Texts.append(new Text(0, 0, s.mid(a+1), Qt::darkBlue, QucsSettings.largeFontSize));
33 
34  x1 = -10; y1 = -9;
35  x2 = x1+130; y2 = y1+59;
36 
37  tx = 0;
38  ty = y2+1;
39  Model = ".ETR";
40  Name = "ETR";
41 
42  Props.append(new Property("IntegrationMethod", "Trapezoidal", false,
43  QObject::tr("integration method")+
44  " [Euler, Trapezoidal, Gear, AdamsMoulton]"));
45  Props.append(new Property("Order", "2", false,
46  QObject::tr("order of integration method")+" (1-6)"));
47  Props.append(new Property("InitialStep", "1 ns", false,
48  QObject::tr("initial step size in seconds")));
49  Props.append(new Property("MinStep", "1e-16", false,
50  QObject::tr("minimum step size in seconds")));
51  Props.append(new Property("MaxIter", "150", false,
52  QObject::tr("maximum number of iterations until error")));
53  Props.append(new Property("reltol", "0.001", false,
54  QObject::tr("relative tolerance for convergence")));
55  Props.append(new Property("abstol", "1 pA", false,
56  QObject::tr("absolute tolerance for currents")));
57  Props.append(new Property("vntol", "1 uV", false,
58  QObject::tr("absolute tolerance for voltages")));
59  Props.append(new Property("Temp", "26.85", false,
60  QObject::tr("simulation temperature in degree Celsius")));
61  Props.append(new Property("LTEreltol", "1e-3", false,
62  QObject::tr("relative tolerance of local truncation error")));
63  Props.append(new Property("LTEabstol", "1e-6", false,
64  QObject::tr("absolute tolerance of local truncation error")));
65  Props.append(new Property("LTEfactor", "1", false,
66  QObject::tr("overestimation of local truncation error")));
67  Props.append(new Property("Solver", "CroutLU", false,
68  QObject::tr("method for solving the circuit matrix")+
69  " [CroutLU, DoolittleLU, HouseholderQR, HouseholderLQ, GolubSVD]"));
70  Props.append(new Property("relaxTSR", "no", false,
71  QObject::tr("relax time step raster")+" [no, yes]"));
72  Props.append(new Property("initialDC", "yes", false,
73  QObject::tr("perform an initial DC analysis")+" [yes, no]"));
74  Props.append(new Property("MaxStep", "0", false,
75  QObject::tr("maximum step size in seconds")));
76 }
77 
79 {
80 }
81 
83 {
84  return new ETR_Sim();
85 }
86 
87 Element* ETR_Sim::info(QString& Name, char* &BitmapFile, bool getNewOne)
88 {
89  Name = QObject::tr("External transient simulation");
90  BitmapFile = (char *) "etran";
91 
92  if(getNewOne) return new ETR_Sim();
93  return 0;
94 }
95 
ETR_Sim()
Definition: etr_sim.cpp:22
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: etr_sim.cpp:87
int y1
Definition: element.h:153
tQucsSettings QucsSettings
Definition: main.cpp:52
int tx
Definition: component.h:78
int y2
Definition: element.h:153
int x1
Definition: element.h:153
Definitions and declarations for the main application.
int ty
Definition: component.h:78
Q3PtrList< Property > Props
Definition: component.h:72
Definition: element.h:82
Component * newOne()
Definition: etr_sim.cpp:82
Superclass of all schematic drawing elements.
Definition: element.h:142
QString Name
Definition: component.h:80
Q3PtrList< Text > Texts
Definition: component.h:71
QString Model
Definition: component.h:80
QString Description
Definition: component.h:81
float largeFontSize
Definition: main.h:47
int x2
Definition: element.h:153
~ETR_Sim()
Definition: etr_sim.cpp:78