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

Fix nghyd#226 (for real)

parent 751d5a8d
No related branches found
No related tags found
No related merge requests found
import { CalculatorType } from "../compute-node";
import { Nub } from "../index";
import { Nub, Pab, StructureParams } from "../index";
import { ParamCalculability } from "../param/param-definition";
import { ParallelStructure } from "../structure/parallel_structure";
import { StructureKiviParams } from "../structure/structure_kivi";
......@@ -26,6 +26,13 @@ export class Cloisons extends ParallelStructure {
return loiAdmissiblesCloisons;
}
/**
* Is the Nub used in a PAB?
*/
get isInPAB(): boolean {
return (this.parent !== undefined && this.parent instanceof Pab);
}
public Equation(sVarCalc: string): Result {
this.updatePrms();
return super.Equation(sVarCalc);
......
......@@ -30,6 +30,9 @@ export class ParallelStructure extends Nub {
public set structures(structures: Structure[]) {
this._children = structures;
this._children.forEach((s) => {
s.parent = this;
});
}
/**
......
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