mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
pep8
This commit is contained in:
1 parent
3693c32d4b
commit
845bf3c325
5 files changed
+16
-13
No files matched your search
@@ -211,4 +211,3 @@ class TableModel(PamhyrTableModel):
|
||||
)
|
||||
self.layoutAboutToBeChanged.emit()
|
||||
self.update()
|
||||
|
||||
@@ -182,6 +182,7 @@ class PasteCommand(QUndoCommand):
|
||||
for bc in self._bcs:
|
||||
self._data.insert(self._row, bc)
|
||||
|
||||
|
||||
class ReplaceDataCommand(QUndoCommand):
|
||||
def __init__(self, data, data1, data2):
|
||||
QUndoCommand.__init__(self)
|
||||
|
||||
@@ -196,8 +196,12 @@ class EditBoundaryConditionWindow(PamhyrWindow):
|
||||
self.find(QAction, "action_add").triggered.connect(self.add)
|
||||
self.find(QAction, "action_del").triggered.connect(self.delete)
|
||||
self.find(QAction, "action_sort").triggered.connect(self.sort)
|
||||
self.find(QAction, "action_generate_uniform").triggered.connect(self.generate_uniform)
|
||||
self.find(QAction, "action_generate_critical").triggered.connect(self.generate_critical)
|
||||
self.find(QAction, "action_generate_uniform").triggered.connect(
|
||||
self.generate_uniform
|
||||
)
|
||||
self.find(QAction, "action_generate_critical").triggered.connect(
|
||||
self.generate_critical
|
||||
)
|
||||
if self._data.bctype != "ZD" or not self._data.has_node:
|
||||
self.find(QAction, "action_generate_uniform").setVisible(False)
|
||||
self.find(QAction, "action_generate_critical").setVisible(False)
|
||||
@@ -334,10 +338,8 @@ class EditBoundaryConditionWindow(PamhyrWindow):
|
||||
strickler = 25
|
||||
height = [(i)*(z_max-z_min)/50 for i in range(51)]
|
||||
q = [((profile.wet_width(z_min + h) * 0.8) * strickler
|
||||
* (h ** (5/3))
|
||||
* (abs(incline) ** (0.5)))
|
||||
for h in height
|
||||
]
|
||||
* (h ** (5/3)) * (abs(incline) ** (0.5)))
|
||||
for h in height]
|
||||
self._table.replace_data(height, q)
|
||||
|
||||
return
|
||||
@@ -351,8 +353,8 @@ class EditBoundaryConditionWindow(PamhyrWindow):
|
||||
z_min = profile.z_min()
|
||||
z_max = profile.z_max()
|
||||
height = [(i)*(z_max-z_min)/50 for i in range(51)]
|
||||
q = [sqrt(9.81 * (profile.wet_area(z_min + h) ** 3) / profile.wet_width(z_min + h))
|
||||
for h in height
|
||||
]
|
||||
q = [sqrt(9.81 * (profile.wet_area(z_min + h) ** 3)
|
||||
/ profile.wet_width(z_min + h))
|
||||
for h in height]
|
||||
self._table.replace_data(height, q)
|
||||
return
|
||||
Reference in new issue
Block a user