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
e51b9d57
Commit
e51b9d57
authored
Apr 16, 2020
by
Dorchies David
Browse files
Fix
#209
Add bounds to the Newton derivative
parent
246eefc5
Changes
2
Hide whitespace changes
Inline
Side-by-side
spec/open-channel/section_param/section_param_circ_fluvial.spec.ts
View file @
e51b9d57
...
...
@@ -12,7 +12,7 @@ const resultSectCirc: {[name: string]: number} = {
'
I-J
'
:
-
0.00102
,
Imp
:
5076.304
,
Tau0
:
8.505
}
f
describe
(
"
Section paramétrée circulaire ouverte:
"
,
()
=>
{
describe
(
"
Section paramétrée circulaire ouverte:
"
,
()
=>
{
beforeEach
(()
=>
{
SessionSettings
.
precision
=
precDist
;
});
...
...
@@ -70,7 +70,7 @@ fdescribe("Section paramétrée circulaire ouverte: ", () => {
});
});
f
describe
(
"
Section paramétrée circulaire fermée:
"
,
()
=>
{
describe
(
"
Section paramétrée circulaire fermée:
"
,
()
=>
{
beforeEach
(()
=>
{
SessionSettings
.
precision
=
precDist
;
});
...
...
src/open-channel/section/newton.ts
View file @
e51b9d57
...
...
@@ -101,7 +101,7 @@ export abstract class acNewton extends Debug {
return
rDER
;
}
const
rDer
=
rDER
.
vCalc
;
const
rDer
=
Math
.
max
(
-
1
E10
,
Math
.
min
(
rDER
.
vCalc
,
1
E10
));
// Bornage de la dérivée pour éviter Delta=0
if
(
rDer
!==
0
)
{
if
(
XOR
(
rFn
<
0
,
this
.
rFnPrec
<
0
))
{
this
.
iOscil
++
;
...
...
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