/home/runner/work/amr-wind/amr-wind/amr-wind/utilities/math_ops.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/utilities/math_ops.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
math_ops.H
Go to the documentation of this file.
1#ifndef MATH_OPS_H
2#define MATH_OPS_H
3
8
9#include "AMReX_REAL.H"
10#include "AMReX_Gpu.H"
11
12using namespace amrex::literals;
13
14namespace amr_wind::utils {
15
17AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real
18powi(const amrex::Real& x, const int& y)
19{
20 return static_cast<amrex::Real>(std::pow(x, y));
21}
22
24template <typename T, typename U>
25amrex::Real powi(T, U) = delete;
26
27} // namespace amr_wind::utils
28
29#endif /* MATH_OPS_H */
Definition MultiParser.H:7
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real powi(const amrex::Real &x, const int &y)
Helper function to do pow() with integer exponents and output amrex::Real.
Definition math_ops.H:18