Skip to content
Snippets Groups Projects
Commit eaa6f495 authored by mathias.chouet's avatar mathias.chouet
Browse files

Removed CourbeRemous dependencies from config, use hardcoded presets from model instead

parent fe582eb6
No related branches found
No related tags found
No related merge requests found
......@@ -7,96 +7,43 @@
{
"id": "select_section",
"type": "select",
"select": [
{
"id": "select_section_trapez",
"enum": "ComputeNodeType.SectionTrapeze"
},
{
"id": "select_section_rect",
"enum": "ComputeNodeType.SectionRectangle"
},
{
"id": "select_section_circ",
"enum": "ComputeNodeType.SectionCercle"
},
{
"id": "select_section_puiss",
"enum": "ComputeNodeType.SectionPuissance"
}
]
"source": "acsection_available_sections"
},
{
"type": "input",
"id": "LargeurFond",
"nodeType": "SectionTrapeze",
"unit": "m",
"dep_exist": [
{
"refid": "select_section",
"refvalue": "select_section_trapez"
}
]
"unit": "m"
},
{
"type": "input",
"id": "Fruit",
"nodeType": "SectionTrapeze",
"unit": "m/m",
"dep_exist": [
{
"refid": "select_section",
"refvalue": "select_section_trapez"
}
]
"unit": "m/m"
},
{
"type": "input",
"id": "LargeurBerge",
"nodeType": "SectionRectangle",
"unit": "m",
"dep_exist": [
{
"refid": "select_section",
"refvalue": "select_section_rect"
}
]
"unit": "m"
},
{
"type": "input",
"id": "D",
"nodeType": "SectionCercle",
"unit": "m",
"dep_exist": [
{
"refid": "select_section",
"refvalue": "select_section_circ"
}
]
"unit": "m"
},
{
"type": "input",
"id": "k",
"nodeType": "SectionPuissance",
"unit": "",
"dep_exist": [
{
"refid": "select_section",
"refvalue": "select_section_puiss"
}
]
"unit": ""
},
{
"type": "input",
"id": "LargeurBerge",
"nodeType": "SectionPuissance",
"unit": "m",
"dep_exist": [
{
"refid": "select_section",
"refvalue": "select_section_puiss"
}
]
"unit": "m"
}
]
},
......@@ -166,20 +113,7 @@
{
"id": "select_resolution",
"type": "select",
"select": [
{
"id": "select_resolution_trap",
"enum": "MethodeResolution.Trapezes"
},
{
"id": "select_resolution_rk4",
"enum": "MethodeResolution.RungeKutta4"
},
{
"id": "select_resolution_euler",
"enum": "MethodeResolution.EulerExplicite"
}
]
"source": "remous_methode_resolution"
}
]
},
......@@ -190,71 +124,7 @@
{
"id": "select_target",
"type": "select",
"select": [
{
"id": "select_target_none"
},
{
"id": "select_target_Hs",
"value": "Hs"
},
{
"id": "select_target_Hsc",
"value": "Hsc"
},
{
"id": "select_target_B",
"value": "B"
},
{
"id": "select_target_P",
"value": "P"
},
{
"id": "select_target_S",
"value": "S"
},
{
"id": "select_target_R",
"value": "R"
},
{
"id": "select_target_V",
"value": "V"
},
{
"id": "select_target_Fr",
"value": "Fr"
},
{
"id": "select_target_Yf",
"value": "Yf"
},
{
"id": "select_target_Yt",
"value": "Yt"
},
{
"id": "select_target_Yco",
"value": "Yco"
},
{
"id": "select_target_J",
"value": "J"
},
{
"id": "select_target_I-J",
"value": "I-J"
},
{
"id": "select_target_Imp",
"value": "Imp"
},
{
"id": "select_target_Tau0",
"value": "Tau0"
}
]
"source": "remous_target"
}
]
},
......
......@@ -25,7 +25,7 @@ export class FormulaireCourbeRemous extends FormulaireBase {
this._formCompute = new FormComputeCourbeRemous(this, this._formSection, (this._formResult as FormResultRemous));
// default properties
this._props["methodeResolution"] = MethodeResolution.Trapezes;
this._props["varCalc"] = undefined; // important
this._props["varCalc"] = ""; // important
}
protected parseOptions(json: {}) {
......
import { LechaptCalmon, acSection } from "jalhyd";
import { LechaptCalmon, acSection, CourbeRemous } from "jalhyd";
import { Field } from "./field";
import { SelectEntry } from "./select-entry";
......@@ -128,7 +128,21 @@ export class SelectField extends Field {
case "acsection_available_sections":
for (const sec of acSection.availableSectionTypes) {
const e: SelectEntry = new SelectEntry("select_section_" + sec.id, sec.value);
console.log(">> adding entry", e);
this.addEntry(e);
}
break;
case "remous_methode_resolution":
for (const mr of CourbeRemous.availableMethodeResolution) {
const e: SelectEntry = new SelectEntry("select_resolution_" + mr.id, mr.value);
this.addEntry(e);
}
break;
case "remous_target":
this.addEntry(new SelectEntry("select_target_none", ""));
for (const at of CourbeRemous.availableTargets) {
const e: SelectEntry = new SelectEntry("select_target_" + at, at);
this.addEntry(e);
}
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment