Commit 7b6e5403 authored by Mathias Chouet's avatar Mathias Chouet :spaghetti:
Browse files

refactor nubs

merged cParamsCanal and ParamsSection
Structures are now only defined by their LoiDebit (no more StructureType)
Session : fixed serialization of lately registered Nubs
Sections are now defined by a CalculatorType and a NodeType
fixed bug in findFirstSingleParameter
added tests for session serialisation
Showing with 20 additions and 0 deletions
+20 -0
......@@ -2,6 +2,7 @@ import { Result } from "../util/result";
import { RectangularStructure } from "./rectangular_structure";
import { RectangularStructureParams } from "./rectangular_structure_params";
import { Structure, StructureFlowRegime } from "./structure";
import { LoiDebit } from "./structure_props";
export { RectangularStructureParams };
......@@ -12,6 +13,7 @@ export class StructureRectangularOrificeSubmerged extends RectangularStructure {
constructor(prms: RectangularStructureParams, dbg: boolean = false) {
super(prms, dbg);
this._loiDebit = LoiDebit.RectangularOrificeSubmerged;
if (prms.W.v !== Infinity) {
this._isZDVcalculable = false;
}
......
import { ParamCalculability } from "../param/param-definition";
import { Result } from "../util/result";
import { Structure, StructureFlowMode, StructureFlowRegime } from "./structure";
import { LoiDebit } from "./structure_props";
import { TriangularTruncStructureParams } from "./structure_triangular_trunc_weir_free_params";
export { TriangularTruncStructureParams };
......@@ -12,6 +13,7 @@ export class StructureTriangularTruncWeirFree extends Structure {
constructor(prms: TriangularTruncStructureParams, dbg: boolean = false) {
super(prms, dbg);
this._loiDebit = LoiDebit.TriangularTruncWeirFree;
}
/**
......
import { ParamCalculability } from "../param/param-definition";
import { Result } from "../util/result";
import { Structure, StructureFlowMode, StructureFlowRegime } from "./structure";
import { LoiDebit } from "./structure_props";
import { TriangularStructureParams } from "./structure_triangular_weir_free_params";
export { TriangularStructureParams };
......@@ -12,6 +13,7 @@ export class StructureTriangularWeirFree extends Structure {
constructor(prms: TriangularStructureParams, dbg: boolean = false) {
super(prms, dbg);
this._loiDebit = LoiDebit.TriangularWeirFree;
}
/**
......
......@@ -2,6 +2,7 @@ import { Result } from "../util/result";
import { RectangularStructure } from "./rectangular_structure";
import { RectangularStructureParams } from "./rectangular_structure_params";
import { Structure, StructureFlowMode, StructureFlowRegime } from "./structure";
import { LoiDebit } from "./structure_props";
export { RectangularStructureParams };
......@@ -9,6 +10,12 @@ export { RectangularStructureParams };
* Equation classique seuil dénoyé
*/
export class StructureWeirFree extends RectangularStructure {
constructor(prms: RectangularStructureParams, dbg: boolean = false) {
super(prms, dbg);
this._loiDebit = LoiDebit.WeirFree;
}
/**
* Calcul analytique Q = f(Cd, L, h1, h2, W) seuil dénoyé
* @param sVarCalc Variable à calculer (doit être "Q")
......
......@@ -2,6 +2,7 @@ import { Result } from "../util/result";
import { RectangularStructure } from "./rectangular_structure";
import { RectangularStructureParams } from "./rectangular_structure_params";
import { Structure, StructureFlowMode, StructureFlowRegime } from "./structure";
import { LoiDebit } from "./structure_props";
export { RectangularStructureParams };
......@@ -11,6 +12,12 @@ export { RectangularStructureParams };
* Passes à poissons : expertise et conception des ouvrages de franchissement
*/
export class StructureWeirSubmergedLarinier extends RectangularStructure {
constructor(prms: RectangularStructureParams, dbg: boolean = false) {
super(prms, dbg);
this._loiDebit = LoiDebit.WeirSubmergedLarinier;
}
/**
* Calcul analytique Q = f(Cd, L, h1, h2, W) seuil dénoyé
* @param sVarCalc Variable à calculer (doit être "Q")
......
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