Commit cf7a5a53 authored by Serhii Yaskovets's avatar Serhii Yaskovets
Browse files

Use Operation::Tanh and Operation::Signum instead of manual computing

parent e6af01d5
......@@ -116,7 +116,7 @@ namespace AMDiS
REQUIRES(Concepts::AnyGridFunction<T>)>
auto tanh(T&& value)
{
return invokeAtQP([](auto const& v) { using std::tanh; return tanh(v); }, FWD(value));
return invokeAtQP(Operation::Tanh{}, 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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment