From 4ccbc8fa13bb52532283468413714aaffa292510 Mon Sep 17 00:00:00 2001
From: "francois.grand" <francois.grand@irstea.fr>
Date: Fri, 9 Feb 2018 11:48:11 +0100
Subject: [PATCH] =?UTF-8?q?=20#36=20:=20correction=20du=20journal=20global?=
 =?UTF-8?q?=20retourn=C3=A9=20par=20CourbeRemous.calculRemous()?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/remous.ts | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/remous.ts b/src/remous.ts
index b6255523..62338606 100644
--- a/src/remous.ts
+++ b/src/remous.ts
@@ -516,13 +516,15 @@ export class CourbeRemous extends Nub {
 		// let Yc: number = this.Sn.Calc("Yc");
 		const rYC = this.Sn.Calc("Yc");
 		if (!rYC.ok) {
-			return rYC;
+			res.addLog(rYC.log);
+			return res;
 		}
 		const Yc: number = rYC.vCalc;
 
 		const rB: Result = this.Sn.Calc("B", this.Sn.prms.YB.v)
 		if (!rB.ok) {
-			return rB;
+			res.addLog(rB.log);
+			return res;
 		}
 
 		let m: Message = new Message(MessageCode.INFO_REMOUS_LARGEUR_BERGE);
@@ -549,12 +551,12 @@ export class CourbeRemous extends Nub {
 		res.addMessage(m);
 
 		// this.debug("largeur berge " + this.Sn.Calc("B"));
-		const rB2: Result = this.Sn.Calc("B")
-		this.debug("largeur berge " + rB2.vCalc);
-		this.debug("hauteur critique " + Yc);
+		// const rB2: Result = this.Sn.Calc("B")
+		// this.debug("largeur berge " + rB2.vCalc);
+		// this.debug("hauteur critique " + Yc);
 		// this.Sn.HautNormale = this.Sn.Calc("Yn");
 		// this.debug("hauteur normale " + this.Sn.HautNormale);
-		this.debug("hauteur normale " + Yn);
+		// this.debug("hauteur normale " + Yn);
 
 		// Calcul des courbes de remous
 
@@ -591,12 +593,12 @@ export class CourbeRemous extends Nub {
 
 		for (let xflu in crbFlu) {
 			let yflu = crbFlu[xflu];
-			this.debug("imp x " + xflu + " flu " + this.Sn.Calc('Imp', yflu));
+			// this.debug("imp x " + xflu + " flu " + this.Sn.Calc('Imp', yflu));
 		}
 
 		for (let xtor in crbTor) {
 			let ytor = crbTor[xtor];
-			this.debug("imp x " + xtor + " tor " + this.Sn.Calc('Imp', ytor));
+			// this.debug("imp x " + xtor + " tor " + this.Sn.Calc('Imp', ytor));
 		}
 
 		// Détection du ressaut hydraulique
-- 
GitLab