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

Update results logs for SPP

parent 26698455
No related branches found
No related tags found
1 merge request!69Resolve "Module y = a.x + b"
...@@ -214,13 +214,15 @@ export class VarResults extends CalculatedParamResults implements PlottableData ...@@ -214,13 +214,15 @@ export class VarResults extends CalculatedParamResults implements PlottableData
} }
} }
// children results // children results
const sn = this.result.sourceNub; if (this.result) {
for (const c of sn.getChildren()) { const sn = this.result.sourceNub;
if (c.result) { for (const c of sn.getChildren()) {
// using latest ResultElement; results count / types are supposed to be the same on every iteration if (c.result) {
for (const k of c.result.resultElement.keys) { // using latest ResultElement; results count / types are supposed to be the same on every iteration
if (k.indexOf("ENUM_") === -1) { // ENUM variables are not plottable for (const k of c.result.resultElement.keys) {
res.push(c.findPositionInParent() + "_" + k); if (k.indexOf("ENUM_") === -1) { // ENUM variables are not plottable
res.push(c.findPositionInParent() + "_" + k);
}
} }
} }
} }
...@@ -277,19 +279,21 @@ export class VarResults extends CalculatedParamResults implements PlottableData ...@@ -277,19 +279,21 @@ export class VarResults extends CalculatedParamResults implements PlottableData
} }
} }
// children results // children results
const sn = this.result.sourceNub; if (this.result) {
for (const c of sn.getChildren()) { const sn = this.result.sourceNub;
if (c.result) { for (const c of sn.getChildren()) {
for (const k of c.result.resultElement.keys) { if (c.result) {
const fam = this.result.sourceNub.getFamily(k); for (const k of c.result.resultElement.keys) {
// exclude pseudo-family "ANY" const fam = this.result.sourceNub.getFamily(k);
if (fam !== undefined && fam !== ParamFamily.ANY) { // exclude pseudo-family "ANY"
const f = ParamFamily[fam]; if (fam !== undefined && fam !== ParamFamily.ANY) {
if (! (f in families)) { const f = ParamFamily[fam];
families[f] = []; if (! (f in families)) {
families[f] = [];
}
const pos = c.findPositionInParent();
families[f].push(pos + "_" + k);
} }
const pos = c.findPositionInParent();
families[f].push(pos + "_" + k);
} }
} }
} }
...@@ -302,7 +306,11 @@ export class VarResults extends CalculatedParamResults implements PlottableData ...@@ -302,7 +306,11 @@ export class VarResults extends CalculatedParamResults implements PlottableData
* (used by tooltip functions) * (used by tooltip functions)
*/ */
public getVariatingParametersSymbols(): string[] { public getVariatingParametersSymbols(): string[] {
return this._variatedParams.map(vp => this.getVariatingParameterSymbol(vp, this.result.sourceNub)); if (this.result && this.result.sourceNub) {
return this._variatedParams.map(vp => this.getVariatingParameterSymbol(vp, this.result.sourceNub));
} else {
return [];
}
} }
public getVariatingParameterSymbol(vp: NgParameter, sourceNub: Nub): string { public getVariatingParameterSymbol(vp: NgParameter, sourceNub: Nub): string {
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
"ERROR_SECTION_NON_CONVERGENCE_NEWTON_HNORMALE": "Non convergence of the calculation of the normal depth (Newton's method)", "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HNORMALE": "Non convergence of the calculation of the normal depth (Newton's method)",
"ERROR_SECTION_PENTE_NEG_NULLE_HNORMALE_INF": "The slope is negative or zero, the normal depth is infinite", "ERROR_SECTION_PENTE_NEG_NULLE_HNORMALE_INF": "The slope is negative or zero, the normal depth is infinite",
"ERROR_SECTION_SURFACE_NULLE": "Section: calculation is impossible when surface is null", "ERROR_SECTION_SURFACE_NULLE": "Section: calculation is impossible when surface is null",
"ERROR_SOMETHING_FAILED": "Some calculation step has failed", "ERROR_SOMETHING_FAILED_IN_CHILD": "Calculation of child module #%number% failed",
"ERROR_STRUCTURE_Q_TROP_ELEVE": "The flow passing through the other devices is too high: the requested parameter is not calculable.", "ERROR_STRUCTURE_Q_TROP_ELEVE": "The flow passing through the other devices is too high: the requested parameter is not calculable.",
"INFO_CALCULATOR_CALC_NAME": "Calculator name", "INFO_CALCULATOR_CALC_NAME": "Calculator name",
"INFO_CALCULATOR_CALCULER": "Compute", "INFO_CALCULATOR_CALCULER": "Compute",
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
"ERROR_SECTION_NON_CONVERGENCE_NEWTON_HNORMALE": "Non convergence du calcul de la hauteur normale (Méthode de Newton)", "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HNORMALE": "Non convergence du calcul de la hauteur normale (Méthode de Newton)",
"ERROR_SECTION_PENTE_NEG_NULLE_HNORMALE_INF": "La pente est négative ou nulle, la hauteur normale est infinie", "ERROR_SECTION_PENTE_NEG_NULLE_HNORMALE_INF": "La pente est négative ou nulle, la hauteur normale est infinie",
"ERROR_SECTION_SURFACE_NULLE": "Section : calcul impossible à cause d'une surface nulle", "ERROR_SECTION_SURFACE_NULLE": "Section : calcul impossible à cause d'une surface nulle",
"ERROR_SOMETHING_FAILED": "Une étape du calcul a échoué", "ERROR_SOMETHING_FAILED_IN_CHILD": "Le calcul du module enfant n°%number% a échoué",
"ERROR_STRUCTURE_Q_TROP_ELEVE": "Le débit passant par les autres ouvrages est trop élevé: le paramètre demandé n'est pas calculable.", "ERROR_STRUCTURE_Q_TROP_ELEVE": "Le débit passant par les autres ouvrages est trop élevé: le paramètre demandé n'est pas calculable.",
"INFO_CALCULATOR_CALC_NAME": "Nom du module de calcul", "INFO_CALCULATOR_CALC_NAME": "Nom du module de calcul",
"INFO_CALCULATOR_CALCULER": "Calculer", "INFO_CALCULATOR_CALCULER": "Calculer",
......
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