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
e6af01d5
Commit
e6af01d5
authored
Feb 04, 2022
by
Serhii Yaskovets
Browse files
Add scalar grid operations tanh & signum
parent
46684b80
Changes
1
Hide whitespace changes
Inline
Side-by-side
amdis/gridfunctions/Operations.hpp
View file @
e6af01d5
...
...
@@ -111,6 +111,22 @@ namespace AMDiS
return
invokeAtQP
([](
auto
const
&
v
)
{
using
std
::
abs
;
return
abs
(
v
);
},
FWD
(
value
));
}
/// \brief Applies \ref Operation::Tanh to GridFunctions. \relates ComposerGridFunction
template
<
class
T
,
REQUIRES
(
Concepts
::
AnyGridFunction
<
T
>)
>
auto
tanh
(
T
&&
value
)
{
return
invokeAtQP
([](
auto
const
&
v
)
{
using
std
::
tanh
;
return
tanh
(
v
);
},
FWD
(
value
));
}
/// \brief Applies \ref Operation::Signum to GridFunctions. \relates ComposerGridFunction
template
<
class
T
,
REQUIRES
(
Concepts
::
AnyGridFunction
<
T
>)
>
auto
signum
(
T
&&
value
)
{
return
invokeAtQP
([](
auto
const
&
v
)
{
return
v
>
0.0
?
1.0
:
-
1.0
;
},
FWD
(
value
));
}
/// \brief Applies \ref Operation::Sqr to GridFunction. \relates ComposerGridFunction
template
<
class
T
,
REQUIRES
(
Concepts
::
AnyGridFunction
<
T
>)
>
...
...
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