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

Update #152

parent d19efa47
No related branches found
No related tags found
1 merge request!36Resolve "Déplacer la (dé)dérialisation dans JalHyd"
......@@ -44,27 +44,18 @@ export class FormComputeFixedVar extends FormCompute {
protected compute() {
const nub: Nub = this._formBase.currentNub;
let computePrec: number;
if (this._formBase.hasParameter("Pr")) {
computePrec = this._formBase.getParameterValue("Pr"); // précision de calcul
}
const computedParam: NgParameter = this.getComputedParameter();
this.formResult.addFixedParameters();
const varParam: NgParameter = this.getVariatedParameter();
if (varParam === undefined) {
// pas de paramètre à varier
const res: Result = this.runNubCalc(nub, computedParam, computePrec);
const res: Result = this.runNubCalc(nub, computedParam);
this.formResult.fixedResults.result = res;
this.formResult.fixedResults.calculatedParameter = computedParam;
} else {
// il y a un paramètre à varier
const res: Result = this.runNubCalc(nub, computedParam, computePrec);
const res: Result = this.runNubCalc(nub, computedParam);
this.formResult.varResults.variatedParameter = varParam;
this.formResult.varResults.calculatedParameter = computedParam;
......
......@@ -33,7 +33,6 @@ export class FormComputeSectionParametree extends FormCompute {
* @param varParam paramètre à varier
*/
private doComputeSectionVar(varParam: NgParameter) {
const computePrec: number = this._formBase.getParameterValue("Pr"); // précision de calcul
this._formSectionResult.addSectionFixedParameters(false);
......@@ -50,7 +49,7 @@ export class FormComputeSectionParametree extends FormCompute {
const computedParam: NgParameter = this.createParameter(computedParamInfo.symbol, this._formBase);
this._varResults.calculatedParameter = computedParam;
this._varResults.result = this.runNubCalc(sectNub, computedParam, computePrec);
this._varResults.result = this.runNubCalc(sectNub, computedParam);
this._varResults.graphTitle = computedParamInfo.symbol + " = f( " + varParam.symbol + " )";
this._varResults.update(false);
}
......@@ -67,8 +66,7 @@ export class FormComputeSectionParametree extends FormCompute {
const sect: acSection = sectNub.section;
this._sectionResults.section = sect;
const computePrec: number = this._formBase.getParameterValue("Pr"); // précision de calcul
const tmpResult: Result = sectNub.CalcSerie(computePrec,
const tmpResult: Result = sectNub.CalcSerie(
undefined, // valeur initiale, non utilisée dans ce cas
undefined // variable à calculer, non utilisée
);
......
......@@ -25,7 +25,7 @@ export abstract class FormCompute {
/**
* lance le calcul d'un paramètre en déterminant une valeur initiale
*/
protected runNubCalc(nub: Nub, computedParam: NgParameter, prec: number): Result {
protected runNubCalc(nub: Nub, computedParam: NgParameter): Result {
let init: number;
switch (computedParam.domain.domain) {
case ParamDomainValue.ANY:
......@@ -69,7 +69,7 @@ export abstract class FormCompute {
break;
}
return nub.CalcSerie(prec, init, this.getParameterRefid(computedParam));
return nub.CalcSerie(init, this.getParameterRefid(computedParam));
}
public doCompute() {
......
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