Qucs-GUI
0.0.18
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
qucs
components
hb_sim.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
hb_sim.cpp - description
3
-------------------
4
begin : Sat Aug 23 2003
5
copyright : (C) 2003 by Michael Margraf
6
email : michael.margraf@alumni.tu-berlin.de
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 "
hb_sim.h
"
19
#include "
main.h
"
20
21
22
HB_Sim::HB_Sim
()
23
{
24
Description
= QObject::tr(
"Harmonic balance simulation"
);
25
26
QString s =
Description
;
27
int
a = s.findRev(
" "
);
28
if
(a != -1) s[a] =
'\n'
;
// break line before the word "simulation"
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
+163;
y2
=
y1
+59;
36
37
tx
= 0;
38
ty
=
y2
+1;
39
Model
=
".HB"
;
40
Name
=
"HB"
;
41
42
Props
.append(
new
Property
(
"f"
,
"1 GHz"
,
false
,
43
QObject::tr(
"frequency in Hertz"
)));
44
Props
.append(
new
Property
(
"n"
,
"4"
,
true
,
45
QObject::tr(
"number of harmonics"
)));
46
Props
.append(
new
Property
(
"iabstol"
,
"1 pA"
,
false
,
47
QObject::tr(
"absolute tolerance for currents"
)));
48
Props
.append(
new
Property
(
"vabstol"
,
"1 uV"
,
false
,
49
QObject::tr(
"absolute tolerance for voltages"
)));
50
Props
.append(
new
Property
(
"reltol"
,
"0.001"
,
false
,
51
QObject::tr(
"relative tolerance for convergence"
)));
52
Props
.append(
new
Property
(
"MaxIter"
,
"150"
,
false
,
53
QObject::tr(
"maximum number of iterations until error"
)));
54
}
55
56
HB_Sim::~HB_Sim
()
57
{
58
}
59
60
Component
*
HB_Sim::newOne
()
61
{
62
return
new
HB_Sim
();
63
}
64
65
Element
*
HB_Sim::info
(QString& Name,
char
* &BitmapFile,
bool
getNewOne)
66
{
67
Name = QObject::tr(
"Harmonic balance"
);
68
BitmapFile = (
char
*)
"hb"
;
69
70
if
(getNewOne)
return
new
HB_Sim
();
71
return
0;
72
}
Element::y1
int y1
Definition:
element.h:153
HB_Sim::~HB_Sim
~HB_Sim()
Definition:
hb_sim.cpp:56
QucsSettings
tQucsSettings QucsSettings
Definition:
main.cpp:52
Component::tx
int tx
Definition:
component.h:78
Element::y2
int y2
Definition:
element.h:153
Element::x1
int x1
Definition:
element.h:153
hb_sim.h
main.h
Definitions and declarations for the main application.
Component::ty
int ty
Definition:
component.h:78
Component::Props
Q3PtrList< Property > Props
Definition:
component.h:72
HB_Sim::newOne
Component * newOne()
Definition:
hb_sim.cpp:60
Property
Definition:
element.h:94
Text
Definition:
element.h:82
Component
Definition:
component.h:33
Element
Superclass of all schematic drawing elements.
Definition:
element.h:142
Component::Name
QString Name
Definition:
component.h:80
Component::Texts
Q3PtrList< Text > Texts
Definition:
component.h:71
Component::Model
QString Model
Definition:
component.h:80
Component::Description
QString Description
Definition:
component.h:81
tQucsSettings::largeFontSize
float largeFontSize
Definition:
main.h:47
HB_Sim::info
static Element * info(QString &, char *&, bool getNewOne=false)
Definition:
hb_sim.cpp:65
HB_Sim::HB_Sim
HB_Sim()
Definition:
hb_sim.cpp:22
Element::x2
int x2
Definition:
element.h:153
Generated on Mon Sep 1 2014 20:05:19 for Qucs-GUI by
1.8.6