iam-git / WellMet (public) (License: MIT) (since 2021-08-31) (hash sha1)
WellMet is pure Python framework for spatial structural reliability analysis. Or, more specifically, for "failure probability estimation and detection of failure surfaces by adaptive sequential decomposition of the design domain".
List of commits:
Subject Hash Author Date (UTC)
qt_plot: connection to BlackBox feature added fcff3099dc61e568981e1f1236c29b5326547fd5 Олёш 2020-06-23 09:52:56
qt_plot: estimation graphs are implemented a31c5b3c344893f0f0b7022ee54544493e97c79a Олёш 2020-06-21 22:21:55
qt_plot: WIP 7cf97855991f717873d02ce65058790b324a319d Олёш 2020-06-21 10:17:04
qt_plot: minor changes 931ca9629256f37588e7ed4cb497f71c93954a7b Олёш 2020-06-15 06:01:10
candybox introduced, stores additional data 2d7e227d114a60ab47456bfc62308b16dba4eacf Олёш 2020-06-11 23:54:54
qt_plot: konečně něco interaktivního... 2bcc8842afe87d1e44e066fe168fcfedb8043947 Олёш 2020-06-07 07:35:57
WIP: matplotlib and QtGui ce3d38363636ba60fcddc0ebfe45c1cefadfc7a5 Олёш 2020-06-07 01:57:04
tri_estimations_graph added (by plot.ly) 1d307b1a8e26277c6259596eb4c912b3262d3ee7 Олёш 2020-06-04 15:03:57
directory structure changed d67e975a7f4c7b01388f469324f635c74cf17995 Олёш 2020-06-03 21:17:35
Commit fcff3099dc61e568981e1f1236c29b5326547fd5 - qt_plot: connection to BlackBox feature added
Author: Олёш
Author date (UTC): 2020-06-23 09:52
Committer name: Олёш
Committer date (UTC): 2020-06-23 09:52
Parent(s): a31c5b3c344893f0f0b7022ee54544493e97c79a
Signer:
Signing key:
Signing status: N
Tree: 2fa77de733389e4b52398075ec76d1760ff4f260
File Lines added Lines deleted
qt_plot.py 65 17
File qt_plot.py changed (mode: 100644) (index bfe626a..4a1e8fb)
... ... import pandas as pd # required for estimation graph
11 11
12 12
13 13
14 def test_simulator_output():
15 simulator = Simulator()
16
17 loop = QtCore.QEventLoop()
18 simulator.finished.connect(loop.quit)
19 simulator.run_simulation()
20 loop.exec_() # Execution stops here until finished called
21
22
23
24 14 def qt_gui_plot_2d(sample_box, space='R', *args, **kwargs): def qt_gui_plot_2d(sample_box, space='R', *args, **kwargs):
25 15 """ """
26 16 This function will start Qt graph window in event loop This function will start Qt graph window in event loop
 
... ... class QtGuiPlot2D:
71 61 self.btn = QtGui.QPushButton('run box') self.btn = QtGui.QPushButton('run box')
72 62 self.btn.clicked.connect(self.run_sb) self.btn.clicked.connect(self.run_sb)
73 63
74 self.btn2 = QtGui.QPushButton('continue')
64 self.btn2 = QtGui.QPushButton('connect/disconnect')
65 self.btn2.setCheckable(True)
66 self.btn2.clicked.connect(self.bx_connect)
67
68 # self.btn_connect = QtGui.QPushButton('connect')
69 # self.btn_connect.clicked.connect(lambda:self.sample_box.connect(self.logger))
70 #
71 # self.btn_disconnect = QtGui.QPushButton('disconnect')
72 # self.btn_disconnect.clicked.connect(self.sample_box.disconnect)
75 73
76 74
77 75 # zkusím prostě generovať # zkusím prostě generovať
 
... ... class QtGuiPlot2D:
99 97 # Dockables, najzajimavejší věc # Dockables, najzajimavejší věc
100 98 self.dockables = [] self.dockables = []
101 99
100 dock = QtGui.QDockWidget("BlackBox output", self.w)
101 self.output_label = QtGui.QLabel()
102 dock.setWidget(self.output_label)
103 self.dockables.append(dock)
104 self.w.addDockWidget(QtCore.Qt.BottomDockWidgetArea, dock)
105
102 106 dock = QtGui.QDockWidget("TRI_current estimation graph", self.w) dock = QtGui.QDockWidget("TRI_current estimation graph", self.w)
103 107 dock.setWidget(TriEstimationGraph(self.sample_box, tri_estimation_name='TRI_current_estimations')) dock.setWidget(TriEstimationGraph(self.sample_box, tri_estimation_name='TRI_current_estimations'))
104 108 self.dockables.append(dock) self.dockables.append(dock)
105 self.w.addDockWidget(QtCore.Qt.BottomDockWidgetArea, dock)
109 self.w.tabifyDockWidget(self.dockables[0], dock)
106 110
107 111 dock = QtGui.QDockWidget("TRI_overall estimation graph", self.w) dock = QtGui.QDockWidget("TRI_overall estimation graph", self.w)
108 112 dock.setWidget(TriEstimationGraph(self.sample_box, tri_estimation_name='TRI_overall_estimations')) dock.setWidget(TriEstimationGraph(self.sample_box, tri_estimation_name='TRI_overall_estimations'))
 
... ... class QtGuiPlot2D:
115 119
116 120 #self.w.addDockWidget(QtCore.Qt.RightDockWidgetArea, self.items) #self.w.addDockWidget(QtCore.Qt.RightDockWidgetArea, self.items)
117 121
118 def logger(self, *args, **kwargs):
119 print(*args, **kwargs)
122
123 # status bar, mainly to observe BlackBox
124 self.statusBar = QtGui.QStatusBar()
125 self.w.setStatusBar(self.statusBar)
126 self.btn_continue = QtGui.QPushButton('continue')
127 self.continue_label = QtGui.QLabel()
128 # self.continue_layout = QtGui.QHBoxLayout()
129 # self.continue_layout.addWidget(self.btn_continue)
130 # self.continue_layout.addWidget(self.continue_label)
131 self.statusBar.addWidget(self.btn_continue)
132 self.statusBar.addWidget(self.continue_label)
133 self.btn_continue.hide()
134 self.continue_label.hide()
135
136 self.statusBar.showMessage("Vitáme vás u nás!")
137
138 def bx_connect(self):
139 if self.btn2.isChecked():
140 try:
141 self.sample_box.connect(self.logger)
142 except BaseException as e:
143 print(self.__class__.__name__ + ":", "connection to BlackBox failed", repr(e))
144 else:
145 try:
146 self.sample_box.disconnect()
147 except BaseException as e:
148 print(self.__class__.__name__ + ":", "error while disconnecting of BlackBox", repr(e))
149
150
151 def logger(self, *args, msg="", indent=0, **kwargs):
152 self.continue_label.setText("BlackBox: " + msg)
153 self.output_label.setText(str(args) + str(kwargs))
120 154
121 155 loop = QtCore.QEventLoop() loop = QtCore.QEventLoop()
122 self.btn2.clicked.connect(loop.quit)
123 loop.exec_() # Execution stops here until finished called
156 self.btn_continue.clicked.connect(loop.quit)
157 self.btn_continue.show()
158 self.continue_label.show()
159 # i want to clear status bar temporaly
160 status = self.statusBar.currentMessage()
161 self.statusBar.clearMessage()
162
163 loop.exec_() # Execution stops here until finished called
164
165 self.btn_continue.hide()
166 self.continue_label.hide()
167 self.statusBar.showMessage(status)
168
124 169
125 170 def run_sb(self): def run_sb(self):
126 171 self.slice_plot_data(self.sample_box()) self.slice_plot_data(self.sample_box())
 
... ... class QtGuiPlot2D:
128 173
129 174 # zatím tak # zatím tak
130 175 for dock in self.dockables: for dock in self.dockables:
131 dock.widget().redraw()
176 try:
177 dock.widget().redraw()
178 except AttributeError:
179 pass
132 180 #dock.setFloating(True) #dock.setFloating(True)
133 181
134 182 def plot_widget_2d(self): def plot_widget_2d(self):
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/iam-git/WellMet

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/iam-git/WellMet

Clone this repository using git:
git clone git://git.rocketgit.com/user/iam-git/WellMet

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main