Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
amdis
amdis-core
Commits
cf7a5a53
Commit
cf7a5a53
authored
Feb 05, 2022
by
Serhii Yaskovets
Browse files
Use Operation::Tanh and Operation::Signum instead of manual computing
parent
e6af01d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
amdis/gridfunctions/Operations.hpp
View file @
cf7a5a53
...
...
@@ -116,7 +116,7 @@ namespace AMDiS
REQUIRES
(
Concepts
::
AnyGridFunction
<
T
>)
>
auto
tanh
(
T
&&
value
)
{
return
invokeAtQP
(
[](
auto
const
&
v
)
{
using
std
::
t
anh
;
return
tanh
(
v
);
},
FWD
(
value
));
return
invokeAtQP
(
Operation
::
T
anh
{
},
FWD
(
value
));
}
/// \brief Applies \ref Operation::Signum to GridFunctions. \relates ComposerGridFunction
...
...
@@ -124,7 +124,7 @@ namespace AMDiS
REQUIRES
(
Concepts
::
AnyGridFunction
<
T
>)
>
auto
signum
(
T
&&
value
)
{
return
invokeAtQP
(
[](
auto
const
&
v
)
{
return
v
>
0.0
?
1.0
:
-
1.0
;
},
FWD
(
value
));
return
invokeAtQP
(
Operation
::
Signum
{
},
FWD
(
value
));
}
/// \brief Applies \ref Operation::Sqr to GridFunction. \relates ComposerGridFunction
...
...
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