-
Notifications
You must be signed in to change notification settings - Fork 0
/
design.py
165 lines (162 loc) · 10.2 KB
/
design.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1440, 791)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
self.verticalLayout.setContentsMargins(10, 10, 10, 10)
self.verticalLayout.setSpacing(5)
self.verticalLayout.setObjectName("verticalLayout")
self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
self.tabWidget.setObjectName("tabWidget")
self.page1 = QtWidgets.QWidget()
self.page1.setObjectName("page1")
self.solution = QtWidgets.QCheckBox(self.page1)
self.solution.setGeometry(QtCore.QRect(1300, 70, 85, 20))
self.solution.setObjectName("solution")
self.solution.setStyleSheet("QCheckBox { color: red }")
self.euler = QtWidgets.QCheckBox(self.page1)
self.euler.setGeometry(QtCore.QRect(1300, 100, 85, 20))
self.euler.setObjectName("euler")
self.euler.setStyleSheet("QCheckBox { color: rgb(0, 100, 0) }")
self.improvedEuler = QtWidgets.QCheckBox(self.page1)
self.improvedEuler.setGeometry(QtCore.QRect(1300, 130, 111, 20))
self.improvedEuler.setObjectName("improvedEuler")
self.improvedEuler.setStyleSheet("QCheckBox { color: rgb(0, 0, 255) }")
self.rungeKutta = QtWidgets.QCheckBox(self.page1)
self.rungeKutta.setGeometry(QtCore.QRect(1300, 160, 111, 20))
self.rungeKutta.setObjectName("rungeKutta")
self.rungeKutta.setStyleSheet("QCheckBox { color: rgb(222, 151, 11) }")
self.n_var = QtWidgets.QLineEdit(self.page1)
self.n_var.setGeometry(QtCore.QRect(30, 70, 41, 20))
self.n_var.setObjectName("n_var")
self.n_text = QtWidgets.QLabel(self.page1)
self.n_text.setGeometry(QtCore.QRect(10, 70, 20, 16))
self.n_text.setObjectName("n_text")
self.b_var = QtWidgets.QLineEdit(self.page1)
self.b_var.setGeometry(QtCore.QRect(30, 100, 41, 20))
self.b_var.setObjectName("b_var")
self.b_text = QtWidgets.QLabel(self.page1)
self.b_text.setGeometry(QtCore.QRect(10, 100, 20, 16))
self.b_text.setObjectName("b_text")
self.x0_var = QtWidgets.QLineEdit(self.page1)
self.x0_var.setGeometry(QtCore.QRect(30, 130, 41, 20))
self.x0_var.setObjectName("x0_var")
self.x0_text = QtWidgets.QLabel(self.page1)
self.x0_text.setGeometry(QtCore.QRect(10, 130, 20, 16))
self.x0_text.setObjectName("x0_text")
self.y0_var = QtWidgets.QLineEdit(self.page1)
self.y0_var.setGeometry(QtCore.QRect(30, 160, 41, 20))
self.y0_var.setObjectName("y0_var")
self.y0_text = QtWidgets.QLabel(self.page1)
self.y0_text.setGeometry(QtCore.QRect(10, 160, 20, 16))
self.y0_text.setObjectName("y0_text")
self.verticalLayoutWidget = QtWidgets.QWidget(self.page1)
self.verticalLayoutWidget.setGeometry(QtCore.QRect(159, 70, 1081, 671))
self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
self.verticalLayout_pg1 = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
self.verticalLayout_pg1.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_pg1.setObjectName("verticalLayout_pg1")
self.text_pg1 = QtWidgets.QLabel(self.page1)
self.text_pg1.setGeometry(QtCore.QRect(160, 19, 1081, 41))
self.text_pg1.setAlignment(QtCore.Qt.AlignCenter)
self.text_pg1.setObjectName("text_pg1")
self.tabWidget.addTab(self.page1, "")
self.page2 = QtWidgets.QWidget()
self.page2.setObjectName("page2")
self.improvedEuler_error = QtWidgets.QCheckBox(self.page2)
self.improvedEuler_error.setGeometry(QtCore.QRect(1300, 100, 111, 20))
self.improvedEuler_error.setObjectName("improvedEuler_error")
self.improvedEuler_error.setStyleSheet("QCheckBox { color: rgb(0, 0, 255) }")
self.euler_error = QtWidgets.QCheckBox(self.page2)
self.euler_error.setGeometry(QtCore.QRect(1300, 70, 85, 20))
self.euler_error.setObjectName("euler_error")
self.euler_error.setStyleSheet("QCheckBox { color: rgb(0, 100, 0) }")
self.rungeKutta_error = QtWidgets.QCheckBox(self.page2)
self.rungeKutta_error.setGeometry(QtCore.QRect(1300, 130, 111, 20))
self.rungeKutta_error.setObjectName("rungeKutta_error")
self.rungeKutta_error.setStyleSheet("QCheckBox { color: rgb(222, 151, 11) }")
self.verticalLayoutWidget_2 = QtWidgets.QWidget(self.page2)
self.verticalLayoutWidget_2.setGeometry(QtCore.QRect(159, 70, 1081, 671))
self.verticalLayoutWidget_2.setObjectName("verticalLayoutWidget_2")
self.verticalLayout_pg2 = QtWidgets.QVBoxLayout(self.verticalLayoutWidget_2)
self.verticalLayout_pg2.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_pg2.setObjectName("verticalLayout_pg2")
self.text_pg2 = QtWidgets.QLabel(self.page2)
self.text_pg2.setGeometry(QtCore.QRect(160, 19, 1081, 41))
self.text_pg2.setAlignment(QtCore.Qt.AlignCenter)
self.text_pg2.setObjectName("text_pg2")
self.tabWidget.addTab(self.page2, "")
self.page3 = QtWidgets.QWidget()
self.page3.setObjectName("page3")
self.improvedEuler_MaxError = QtWidgets.QCheckBox(self.page3)
self.improvedEuler_MaxError.setGeometry(QtCore.QRect(1300, 100, 111, 20))
self.improvedEuler_MaxError.setObjectName("improvedEuler_MaxError")
self.improvedEuler_MaxError.setStyleSheet("QCheckBox { color: rgb(0, 0, 255) }")
self.Euler_MaxError = QtWidgets.QCheckBox(self.page3)
self.Euler_MaxError.setGeometry(QtCore.QRect(1300, 70, 111, 20))
self.Euler_MaxError.setObjectName("Euler_MaxError")
self.Euler_MaxError.setStyleSheet("QCheckBox { color: rgb(0, 100, 0) }")
self.RungeKutta_MaxError = QtWidgets.QCheckBox(self.page3)
self.RungeKutta_MaxError.setGeometry(QtCore.QRect(1300, 130, 111, 20))
self.RungeKutta_MaxError.setObjectName("RungeKutta_MaxError")
self.RungeKutta_MaxError.setStyleSheet("QCheckBox { color: rgb(222, 151, 11) }")
self.n0_var = QtWidgets.QLineEdit(self.page3)
self.n0_var.setGeometry(QtCore.QRect(30, 70, 41, 20))
self.n0_var.setObjectName("n0_var")
self.N_var = QtWidgets.QLineEdit(self.page3)
self.N_var.setGeometry(QtCore.QRect(30, 100, 41, 20))
self.N_var.setObjectName("N_var")
self.n0_text = QtWidgets.QLabel(self.page3)
self.n0_text.setGeometry(QtCore.QRect(10, 70, 20, 16))
self.n0_text.setObjectName("n0_text")
self.N_text = QtWidgets.QLabel(self.page3)
self.N_text.setGeometry(QtCore.QRect(10, 100, 20, 16))
self.N_text.setObjectName("N_text")
self.verticalLayoutWidget_3 = QtWidgets.QWidget(self.page3)
self.verticalLayoutWidget_3.setGeometry(QtCore.QRect(159, 70, 1081, 671))
self.verticalLayoutWidget_3.setObjectName("verticalLayoutWidget_3")
self.text_pg3 = QtWidgets.QLabel(self.page3)
self.text_pg3.setGeometry(QtCore.QRect(160, 19, 1081, 41))
self.text_pg3.setAlignment(QtCore.Qt.AlignCenter)
self.text_pg3.setObjectName("text_pg3")
self.verticalLayout_pg3 = QtWidgets.QVBoxLayout(self.verticalLayoutWidget_3)
self.verticalLayout_pg3.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_pg3.setObjectName("verticalLayout_pg3")
self.tabWidget.addTab(self.page3, "")
self.verticalLayout.addWidget(self.tabWidget)
MainWindow.setCentralWidget(self.centralwidget)
self.retranslateUi(MainWindow)
self.tabWidget.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Computational practicum by Safina Alina, B20-02 group"))
self.solution.setText(_translate("MainWindow", "y(x)"))
self.euler.setText(_translate("MainWindow", "Euler"))
self.improvedEuler.setText(_translate("MainWindow", "Improved Euler"))
self.rungeKutta.setText(_translate("MainWindow", "Runge-Kutta"))
self.n_text.setText(_translate("MainWindow", "n"))
self.b_text.setText(_translate("MainWindow", "b"))
self.x0_text.setText(_translate("MainWindow", "x0"))
self.y0_text.setText(_translate("MainWindow", "y0"))
self.text_pg1.setText(_translate("MainWindow", "DE: y\' = y/x - x * e^(y/x). Task initial conditions: y0(1) = 0 & "
" x ∈ (1,8). Default values in program: n = 10, b = 8, x0 = 1, "
"y0 = 0, n0 = 1, N = 10"))
self.text_pg2.setText(_translate("MainWindow", "DE: y\' = y/x - x * e^(y/x). Task initial conditions: y0(1) = 0 & "
" x ∈ (1,8). Default values in program: n = 10, b = 8, x0 = 1, y0 = 0, n0 = 1, N = 10"))
self.text_pg3.setText(_translate("MainWindow", "DE: y\' = y/x - x * e^(y/x). Task initial conditions: y0(1) = 0 & "
" x ∈ (1,8). Default values in program: n = 10, b = 8, x0 = 1, y0 = 0, n0 = 1, N = 10"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.page1), _translate("MainWindow", "Graphs"))
self.improvedEuler_error.setText(_translate("MainWindow", "Improved Euler"))
self.euler_error.setText(_translate("MainWindow", "Euler"))
self.rungeKutta_error.setText(_translate("MainWindow", "Runge-Kutta"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.page2), _translate("MainWindow", "Errors"))
self.improvedEuler_MaxError.setText(_translate("MainWindow", "Improved Euler"))
self.Euler_MaxError.setText(_translate("MainWindow", "Euler"))
self.RungeKutta_MaxError.setText(_translate("MainWindow", "Runge-Kutta"))
self.n0_text.setText(_translate("MainWindow", "n0"))
self.N_text.setText(_translate("MainWindow", "N"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.page3), _translate("MainWindow", "Max Errors"))