Commit 6edd007d authored by Mathias Chouet's avatar Mathias Chouet :spaghetti:
Browse files

Fixed PAB debug

Showing with 23 additions and 32 deletions
+23 -32
......@@ -28,30 +28,6 @@ export class Pab extends Nub {
return this._children as Cloisons[];
}
private static consoleDbgWall(cl: CloisonAval | Cloisons) {
let s: string = "";
for (const p of cl.prms) {
// tslint:disable-next-line:no-console
s += p.symbol + " = " + p.v + "; ";
}
// tslint:disable-next-line:no-console
console.log(s);
for (const c of cl.getChildren()) {
// tslint:disable-next-line:no-console
console.log("Ouvrage");
s = "";
for (const p of c.prms) {
if (p.visible) {
s += "*";
}
s += p.symbol + " = " + p.v + "; ";
}
// tslint:disable-next-line:no-console
console.log(s);
}
}
/**
* Last wall at downstream
*/
......@@ -148,10 +124,8 @@ export class Pab extends Nub {
- this.children[this.children.length - 1].prms.DH.v / 2;
this.downWall.result.extraResults.Q = this.downWall.prms.Q.v;
this.downWall.result.extraResults.x = l;
if (this.debug) {
console.log("Downstream wall");
Pab.consoleDbgWall(this.downWall);
}
this.debug("Downstream wall");
this.dbgWall(this.downWall);
for (let i = this.children.length - 1; i >= 0; i--) {
......@@ -168,10 +142,8 @@ export class Pab extends Nub {
l -= cl.prms.LB.v;
cl.result.extraResults.x = l;
if (this.debug) {
console.log("Bassin n°" + i);
Pab.consoleDbgWall(cl);
}
this.debug("Bassin n°" + i);
this.dbgWall(cl);
}
r.vCalc = Z;
......@@ -302,4 +274,23 @@ export class Pab extends Nub {
return cl.result.vCalc;
}
private dbgWall(cl: ParallelStructure) {
let s: string = "";
for (const p of cl.prms) {
s += p.symbol + " = " + p.v + "; ";
}
this.debug(s);
for (const c of cl.getChildren()) {
this.debug("Ouvrage");
s = "";
for (const p of c.prms) {
if (p.visible) {
s += "*";
}
s += p.symbol + " = " + p.v + "; ";
}
this.debug(s);
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment