Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
cassiopee
jalhyd
Commits
b0d0a420
Commit
b0d0a420
authored
Apr 15, 2020
by
Dorchies David
Browse files
Fix
#206
Speed extra result should be calculated in Calc instead of Equation
parent
bc2933e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
spec/open-channel/regime_uniforme/regime_uniforme_rect.spec.ts
View file @
b0d0a420
...
...
@@ -26,7 +26,7 @@ function generateRegimeUniforme(sect: acSection): RegimeUniforme {
let
ruRect1
=
generateRegimeUniforme
(
generateRectangularSection
());
describe
(
"
Class RegimeUniforme / section rectangulaire :
"
,
()
=>
{
f
describe
(
"
pas de débordement :
"
,
()
=>
{
describe
(
"
pas de débordement :
"
,
()
=>
{
beforeEach
(()
=>
{
ruRect1
=
generateRegimeUniforme
(
generateRectangularSection
());
SessionSettings
.
precision
=
1
E
-
7
;
...
...
src/open-channel/regime_uniforme.ts
View file @
b0d0a420
...
...
@@ -43,10 +43,6 @@ export class RegimeUniforme extends SectionNub {
throw
new
Error
(
"
RegimeUniforme.Equation() : invalid variable name
"
+
sVarCalc
);
}
// Vitesse moyenne
const
V
=
this
.
section
.
CalcSection
(
"
V
"
,
this
.
section
.
prms
.
Y
.
v
);
r
.
resultElement
.
values
.
V
=
V
.
vCalc
;
return
r
;
}
...
...
@@ -58,6 +54,11 @@ export class RegimeUniforme extends SectionNub {
*/
public
Calc
(
sVarCalc
?:
string
,
rInit
?:
number
):
Result
{
const
r
=
super
.
Calc
(
sVarCalc
,
rInit
);
// Vitesse moyenne
const
V
=
this
.
section
.
CalcSection
(
"
V
"
,
this
.
section
.
prms
.
Y
.
v
);
r
.
resultElement
.
values
.
V
=
V
.
vCalc
;
// Est-ce que ça déborde ?
if
(
this
.
section
.
prms
.
Y
.
v
>
this
.
section
.
prms
.
YB
.
v
)
{
r
.
resultElement
.
log
.
add
(
new
Message
(
MessageCode
.
WARNING_SECTION_OVERFLOW
));
...
...
@@ -73,11 +74,12 @@ export class RegimeUniforme extends SectionNub {
}
// tslint:disable-next-line:no-empty
protected
setParametersCalculability
()
{}
protected
setParametersCalculability
()
{
}
protected
adjustChildParameters
():
void
{
this
.
section
.
prms
.
Q
.
calculability
=
ParamCalculability
.
EQUATION
;
this
.
section
.
prms
.
Y
.
calculability
=
ParamCalculability
.
EQUATION
;
this
.
section
.
prms
.
YB
.
calculability
=
ParamCalculability
.
FREE
;
}
protected
exposeResults
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment