Manning: Add parameter to setup manning coef instead of strickler, and switch the value on the view only, but keeps strickler value in the model for the solvers

This commit is contained in:
Dylan Jeannin committed 2026-07-27 13:22:32 +02:00
1 parent ce04f5fd1e
commit fefc6ebc4f
12 files changed
+189 -31

No files matched your search

+13 -4
View File
@@ -20,6 +20,7 @@ import logging
from tools import timer, flatten
from View.Tools.PamhyrPlot import PamhyrPlot
from View.Tools.CoefficientDisplay import display_coefficient
from PyQt5.QtCore import (
QCoreApplication
@@ -32,7 +33,7 @@ _translate = QCoreApplication.translate
class PlotStricklers(PamhyrPlot):
def __init__(self, data=None, canvas=None, trad=None,
toolbar=None, parent=None):
toolbar=None, display_manning=True, parent=None):
super(PlotStricklers, self).__init__(
canvas=canvas,
trad=trad,
@@ -42,7 +43,11 @@ class PlotStricklers(PamhyrPlot):
)
self.label_x = self._trad["rk"]
self.label_y = self._trad["strickler_plot"]
self._display_manning = display_manning
self.label_y = (
self._trad["manning_plot"] if display_manning
else self._trad["strickler_plot"]
)
self.line_rk_elevation = [None, None]
@@ -113,8 +118,12 @@ class PlotStricklers(PamhyrPlot):
)
)
coef_minor = list(map(lambda s: s.minor, coef))
coef_medium = list(map(lambda s: s.medium, coef))
coef_minor = [
display_coefficient(s.minor, self._display_manning) for s in coef
]
coef_medium = [
display_coefficient(s.medium, self._display_manning) for s in coef
]
self.line_rk_elevation[0] = self.canvas.axes.plot(
rk, coef_minor,