Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
jonathan.drechsel_at_mailbox.tu-dresden.de
dune-elasticity
Commits
60b25a5d
Commit
60b25a5d
authored
Jun 25, 2020
by
Jonathan Drechsel
Browse files
Improved calculation of hyperdual sqrt
parent
695efe89
Pipeline
#29983
passed with stage
in 4 minutes and 19 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
dune/elasticity/common/hyperdual.hh
View file @
60b25a5d
...
...
@@ -460,7 +460,12 @@ hyperdual atan(hyperdual x)
}
hyperdual
sqrt
(
hyperdual
x
)
{
return
pow
(
x
,
0.5
);
hyperdual
temp
;
temp
.
f0
=
std
::
sqrt
(
x
.
f0
);
temp
.
f1
=
0.5
*
x
.
f1
/
temp
.
f0
;
temp
.
f2
=
0.5
*
x
.
f2
/
temp
.
f0
;
temp
.
f12
=
0.5
*
(
x
.
f12
-
2.
*
temp
.
f1
*
temp
.
f2
)
/
temp
.
f0
;
return
temp
;
}
hyperdual
fabs
(
hyperdual
x
)
{
...
...
Write
Preview
Supports
Markdown
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