Commit 79f70324 authored by Mathias Chouet's avatar Mathias Chouet 🍝
Browse files

Fix #122 - refactored classes organization

parent bde96c93
......@@ -12,7 +12,8 @@ import { Session } from "../../src/session";
import { CreateStructure } from "../../src/structure/factory_structure";
import { ParallelStructure } from "../../src/structure/parallel_structure";
import { ParallelStructureParams } from "../../src/structure/parallel_structure_params";
import { StructureKivi, StructureKiviParams } from "../../src/structure/structure_kivi";
import { StructureKivi } from "../../src/structure/structure_kivi";
import { StructureKiviParams } from "../../src/structure/structure_kivi_params";
import { LoiDebit } from "../../src/structure/structure_props";
import { MessageCode } from "../../src/util/message";
import { Result } from "../../src/util/result";
......
......@@ -6,7 +6,7 @@
*/
// import { describe, expect, it, xdescribe } from "../mock_jasmine";
import { Structure, StructureFlowMode, StructureFlowRegime } from "../../src/structure/structure";
import { StructureFlowMode, StructureFlowRegime } from "../../src/structure/structure";
import { checkResult } from "../test_func";
import { CreateStructTest, StructureTest } from "./structure_test";
......
......@@ -8,7 +8,7 @@
import { RectangularStructureParams } from "../../src/structure/rectangular_structure_params";
import { StructureFlowMode, StructureFlowRegime } from "../../src/structure/structure";
import { StructureGateCem88d, StructureWeirCem88d } from "../../src/structure/structure_cem88d";
import { StructureGateCem88d } from "../../src/structure/structure_gate_cem88d";
import { itCalcQ } from "./functions";
const structPrm: RectangularStructureParams = new RectangularStructureParams(1, 0, 1, 1, 2, 0.6, 0);
......
......@@ -9,7 +9,7 @@
import { CreateStructure, LoiDebit, MessageCode, Result } from "../../src/index";
import { RectangularStructureParams } from "../../src/structure/rectangular_structure_params";
import { StructureFlowMode, StructureFlowRegime } from "../../src/structure/structure";
import { StructureGateCem88v } from "../../src/structure/structure_cem88v";
import { StructureGateCem88v } from "../../src/structure/structure_gate_cem88v";
import { itCalcQ } from "./functions";
let structPrm: RectangularStructureParams = new RectangularStructureParams(1, 0, 1, 1, 2, 0.6, 0);
......
......@@ -8,8 +8,7 @@
import { RectangularStructureParams } from "../../src/structure/rectangular_structure_params";
import { StructureFlowMode, StructureFlowRegime } from "../../src/structure/structure";
import { StructureGateCunge80 } from "../../src/structure/structure_cunge80";
import { Result } from "../../src/util/result";
import { StructureGateCunge80 } from "../../src/structure/structure_gate_cunge80";
import { itCalcQ } from "./functions";
const structPrm: RectangularStructureParams = new RectangularStructureParams(1, 0, 1, 1, 2, 0.6, 0);
......
......@@ -7,7 +7,8 @@
// import { describe, expect, it, xdescribe, xit } from "../mock_jasmine";
import { MessageCode, StructureFlowMode, StructureFlowRegime } from "../../src/index";
import { StructureKivi, StructureKiviParams } from "../../src/structure/structure_kivi";
import { StructureKivi } from "../../src/structure/structure_kivi";
import { StructureKiviParams } from "../../src/structure/structure_kivi_params";
import { testStructure } from "./functions";
const kiviParams: StructureKiviParams = new StructureKiviParams(
......
......@@ -8,7 +8,8 @@
import { StructureFlowMode, StructureFlowRegime } from "../../src/structure/structure";
// tslint:disable-next-line:max-line-length
import { StructureOrificeSubmerged, StructureOrificeSubmergedParams } from "../../src/structure/structure_orifice_submerged";
import { StructureOrificeSubmerged } from "../../src/structure/structure_orifice_submerged";
import { StructureOrificeSubmergedParams } from "../../src/structure/structure_orifice_submerged_params";
import { itCalcQ } from "../structure/functions";
const prms: StructureOrificeSubmergedParams = new StructureOrificeSubmergedParams(0, 102, 101.5, 0.7, 0.1);
......
......@@ -6,7 +6,8 @@
*/
// import { describe, expect, it, xdescribe, xit } from "../mock_jasmine";
import { Structure, StructureParams } from "../../src/structure/structure";
import { Structure } from "../../src/structure/structure";
import { StructureParams } from "../../src/structure/structure_params";
import { Result } from "../../src/util/result";
export class StructureTest extends Structure {
......
......@@ -9,7 +9,6 @@
import { RectangularStructureParams } from "../../src/structure/rectangular_structure_params";
import { StructureFlowMode, StructureFlowRegime } from "../../src/structure/structure";
import { StructureWeirFree } from "../../src/structure/structure_weir_free";
import { Result } from "../../src/util/result";
import { itCalcQ } from "./functions";
function getStructTest(): StructureWeirFree {
......
import { Cloisons, CloisonsParams, CreateStructure, cSnRectang, LoiDebit,
ParamsSectionRectang, SectionParametree, Session } from "../../src/index";
import { PabDimension, PabDimensionParams } from "../../src/pab/pab_dimension";
import { PabPuissance, PabPuissanceParams } from "../../src/pab/pab_puissance";
import { Cloisons, CreateStructure, cSnRectang, LoiDebit,
SectionParametree, Session } from "../../src/index";
import { CloisonsParams } from "../../src/pab/cloisons_params";
import { PabDimension } from "../../src/pab/pab_dimension";
import { PabDimensionParams } from "../../src/pab/pab_dimensions_params";
import { PabPuissance } from "../../src/pab/pab_puissance";
import { PabPuissanceParams } from "../../src/pab/pab_puissance_params";
import { RegimeUniforme } from "../../src/regime_uniforme";
import { ParamsSectionRectang } from "../../src/section/section_rectang_params";
describe("chained computation of linked Nubs : ", () => {
......
import { CreateStructure, LoiDebit, ParallelStructure,
ParallelStructureParams, Session, Structure } from "../../src/index";
import { RectangularStructureParams } from "../../src/structure/structure_cem88d";
import { RectangularStructureParams } from "../../src/structure/rectangular_structure_params";
import { NubTest, NubTestParams } from "../nubtest";
/**
......
import { ExtensionStrategy, ParamValueMode } from "../../src/index";
import { Nub } from "../../src/nub";
import { PabChute, PabChuteParams } from "../../src/pab/pab_chute";
import { PabNombre, PabNombreParams } from "../../src/pab/pab_nombre";
import { PabChute } from "../../src/pab/pab_chute";
import { PabChuteParams } from "../../src/pab/pab_chute_params";
import { PabNombre } from "../../src/pab/pab_nombre";
import { PabNombreParams } from "../../src/pab/pab_nombre_params";
import { Session } from "../../src/session";
function saveAndReload(nubToSave: Nub): Nub {
......
import { CreateStructure, cSnTrapez, LoiDebit, ParamsSectionTrapez, Session } from "../../src/index";
import { CreateStructure, cSnTrapez, LoiDebit, Session } from "../../src/index";
import { SectionParametree } from "../../src/section/section_parametree";
import { Dever, DeverParams } from "../../src/structure/dever";
import { ParamsSectionTrapez } from "../../src/section/section_trapez_params";
import { Dever } from "../../src/structure/dever";
import { DeverParams } from "../../src/structure/dever_params";
/**
* IMPORTANT !
......
......@@ -7,7 +7,8 @@
// import { describe, expect, it } from "../mock_jasmine";
import { Session } from "../../src/index";
import { PabDimension, PabDimensionParams } from "../../src/pab/pab_dimension";
import { PabDimension } from "../../src/pab/pab_dimension";
import { PabDimensionParams } from "../../src/pab/pab_dimensions_params";
let nub1: PabDimension;
let nub2: PabDimension;
......
import { CreateStructure, cSnCirc, LinkedValue, LoiDebit, ParallelStructure, ParallelStructureParams,
ParamsSectionCirc, Session } from "../../src/index";
Session } from "../../src/index";
import { RegimeUniforme } from "../../src/regime_uniforme";
import { RectangularStructureParams } from "../../src/structure/structure_cem88d";
import { ParamsSectionCirc } from "../../src/section/section_circulaire_params";
import { RectangularStructureParams } from "../../src/structure/rectangular_structure_params";
/**
* IMPORTANT !
......@@ -12,8 +13,8 @@ import { RectangularStructureParams } from "../../src/structure/structure_cem88d
// import { describe, expect, it, xdescribe, xit } from "../mock_jasmine";
let nub1: RegimeUniforme;
let prm1: ParamsSectionCirc;
let nub2: ParallelStructure;
let prm1: ParamsSectionCirc;
let prm2: ParallelStructureParams;
/**
......
import { ConduiteDistrib, ConduiteDistribParams } from "../../src/cond_distri";
import { ParamValueMode, Session } from "../../src/index";
import { ConduiteDistrib } from "../../src/cond_distri";
import { ConduiteDistribParams } from "../../src/cond_distri_params";
import { Session } from "../../src/index";
import { Result } from "../../src/util/result";
/**
......
// tslint:disable-next-line:max-line-length
import { CreateStructure, cSnCirc, LoiDebit, ParamsSectionCirc, Session } from "../../src/index";
import { CreateStructure, cSnCirc, LoiDebit, Session } from "../../src/index";
import { RegimeUniforme } from "../../src/regime_uniforme";
import { Dever, DeverParams } from "../../src/structure/dever";
import { ParamsSectionCirc } from "../../src/section/section_circulaire_params";
import { Dever } from "../../src/structure/dever";
import { DeverParams } from "../../src/structure/dever_params";
/**
* IMPORTANT !
......
import { ConduiteDistrib, ConduiteDistribParams } from "../../src/cond_distri";
import { ConduiteDistrib } from "../../src/cond_distri";
import { ConduiteDistribParams } from "../../src/cond_distri_params";
import { Session } from "../../src/index";
import { Result } from "../../src/util/result";
......
import { Debug, IDebug } from "./base";
import { JalhydObject } from "./jalhyd_object";
import { ParamCalculability, ParamDefinition } from "./param/param-definition";
import { IParamDefinitionIterator, ParamsEquation } from "./param/params-equation";
import { IParamDefinitionIterator } from "./param/param_definition_iterator";
import { ParamsEquation } from "./param/params-equation";
/**
* type de calculette
......
import { CalculatorType } from "./compute-node";
import { ConduiteDistribParams } from "./cond_distri_params";
import { Nub } from "./nub";
import { ParamCalculability, ParamDefinition, ParamFamily } from "./param/param-definition";
import { ParamDomainValue } from "./param/param-domain";
import { ParamsEquation } from "./param/params-equation";
import { ParamCalculability } from "./param/param-definition";
import { Result } from "./util/result";
/**
* paramètres pour la conduite distributrice
*/
export class ConduiteDistribParams extends ParamsEquation {
/** Débit */
public Q: ParamDefinition;
/** Diamètre */
public D: ParamDefinition;
/** Perte de charge */
public J: ParamDefinition;
/** Longueur de la conduite */
// tslint:disable-next-line:variable-name
public Lg: ParamDefinition;
/** Viscosité dynamique nu */
// tslint:disable-next-line:variable-name
public Nu: ParamDefinition;
constructor(rQ: number, rD: number, rJ: number, rLg: number, rNu: number) {
super();
this.Q = new ParamDefinition(this, "Q", ParamDomainValue.POS, "m³/s", rQ, ParamFamily.FLOWS);
this.D = new ParamDefinition(this, "D", ParamDomainValue.POS, "m", rD, ParamFamily.DIAMETERS);
this.J = new ParamDefinition(this, "J", ParamDomainValue.POS, "m", rJ);
this.Lg = new ParamDefinition(this, "Lg", ParamDomainValue.POS, "m", rLg, ParamFamily.LENGTHS);
this.Nu = new ParamDefinition(this, "Nu", ParamDomainValue.POS, "Pa·s", rNu);
this.addParamDefinition(this.Q);
this.addParamDefinition(this.D);
this.addParamDefinition(this.J);
this.addParamDefinition(this.Lg);
this.addParamDefinition(this.Nu);
}
}
/**
* classe de calcul sur la conduite distributrice
*/
// tslint:disable-next-line:max-classes-per-file
export class ConduiteDistrib extends Nub {
constructor(prms: ConduiteDistribParams, dbg: boolean = false) {
......
Markdown is supported
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