Commit 113b86d1 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Merge branch 'feature/scalar_operations' into 'master'

Add scalar grid operations tanh & signum

See merge request amdis/amdis!73
parents 163ea7db 1df2826c
......@@ -20,6 +20,7 @@
- A data transfer strategy based on a simple caching and interpolation is added, called
`SimpleDataTransfer`. It can be selected with the datatranser tag `tag::simple_datatransfer`.
Note, this datatransfer is restricted to grids with a single GeometryType.
- Add scalar grid operations `tanh(value)` and `signum(value)`
### Fixed
......
......@@ -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(Operation::Tanh{}, FWD(value));
}
/// \brief Applies \ref Operation::Signum to GridFunctions. \relates ComposerGridFunction
template <class T,
REQUIRES(Concepts::AnyGridFunction<T>)>
auto signum(T&& value)
{
return invokeAtQP(Operation::Signum{}, FWD(value));
}
/// \brief Applies \ref Operation::Sqr to GridFunction. \relates ComposerGridFunction
template <class T,
REQUIRES(Concepts::AnyGridFunction<T>)>
......
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