Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr

This commit is contained in:
Theophile Terraz committed 2024-04-30 14:24:15 +02:00
commit fb2d0d3e71
7 files changed
+90 -14

No files matched your search

+1 -1
View File
@@ -47,7 +47,7 @@ class PointXYZ(Point, SQLSubModel):
z INTEGER NOT NULL,
profile INTEGER NOT NULL,
sl INTEGER,
FOREIGN KEY(profile) REFERENCES profileXYZ(id),
FOREIGN KEY(profile) REFERENCES geometry_profileXYZ(id),
FOREIGN KEY(sl) REFERENCES sedimentary_layer(id)
)
""")
+4 -2
View File
@@ -167,8 +167,10 @@ class CommandLineSolver(AbstractSolver):
repertory, "pamhyr-study-description.txt"
)
with open(path, "w+") as f:
txt = study.description
with open(path, "w+", encoding='utf-8') as f:
txt = study.description\
.encode()\
.decode('utf-8', 'replace')
f.write(txt)
#######
+4 -7
View File
@@ -282,6 +282,9 @@ class Mage(CommandLineSolver):
if bound.node is None:
continue
if not study.river.is_enable_node(bound.node):
continue
if bound.bctype == "ZD":
AVA.append(bound)
elif bound.bctype == "TD" or bound.bctype == "PC":
@@ -357,13 +360,7 @@ class Mage(CommandLineSolver):
with mage_file_open(os.path.join(repertory, f"{name}.RUG"), "w+") as f:
files.append(f"{name}.RUG")
edges = study.river.edges()
edges = list(
filter(
lambda e: e.is_enable(),
edges
)
)
edges = study.river.enable_edges()
id = 1
for edge in edges:
+16 -4
View File
@@ -160,7 +160,10 @@ class ResultsWindow(PamhyrWindow):
self.canvas = MplCanvas(width=5, height=4, dpi=100)
self.canvas.setObjectName("canvas")
self.toolbar = PamhyrPlotToolbar(
self.canvas, self
self.canvas, self, items=[
"home", "move", "zoom", "save",
"iso", "back/forward"
]
)
self.plot_layout = self.find(QVBoxLayout, "verticalLayout")
self.plot_layout.addWidget(self.toolbar)
@@ -180,7 +183,10 @@ class ResultsWindow(PamhyrWindow):
self.canvas_2 = MplCanvas(width=5, height=4, dpi=100)
self.canvas_2.setObjectName("canvas_2")
self.toolbar_2 = PamhyrPlotToolbar(
self.canvas_2, self
self.canvas_2, self, items=[
"home", "move", "zoom", "save",
"iso", "back/forward"
]
)
self.plot_layout_2 = self.find(QVBoxLayout, "verticalLayout_2")
self.plot_layout_2.addWidget(self.toolbar_2)
@@ -199,7 +205,10 @@ class ResultsWindow(PamhyrWindow):
self.canvas_3 = MplCanvas(width=5, height=4, dpi=100)
self.canvas_3.setObjectName("canvas_3")
self.toolbar_3 = PamhyrPlotToolbar(
self.canvas_3, self
self.canvas_3, self, items=[
"home", "move", "zoom", "save",
"iso", "back/forward"
]
)
self.plot_layout_3 = self.find(QVBoxLayout, "verticalLayout_3")
self.plot_layout_3.addWidget(self.toolbar_3)
@@ -218,7 +227,10 @@ class ResultsWindow(PamhyrWindow):
self.canvas_4 = MplCanvas(width=5, height=4, dpi=100)
self.canvas_4.setObjectName("canvas_4")
self.toolbar_4 = PamhyrPlotToolbar(
self.canvas_4, self
self.canvas_4, self, items=[
"home", "move", "zoom", "save",
"iso", "back/forward"
]
)
self.plot_layout_4 = self.find(
QVBoxLayout, "verticalLayout_hydrograph")