Nektar++
Public Member Functions | List of all members
Nektar::LibUtilities::functions Struct Reference
Inheritance diagram for Nektar::LibUtilities::functions:
[legend]

Public Member Functions

 functions ()
 

Detailed Description

This struct creates a parser that matches the function definitions from math.h. All of the functions accept one of more NekDoubles as arguments and returns a NekDouble.

Definition at line 125 of file Interpreter.cpp.

Constructor & Destructor Documentation

◆ functions()

Nektar::LibUtilities::functions::functions ( )
inline

Definition at line 127 of file Interpreter.cpp.

128  {
129  // Add all of the functions from math.h
130  add("abs", std::abs) // absolute value
131  ("asin", asin) // arcsin
132  ("acos", acos) // arccos
133  ("atan", atan) // arctan
134  ("atan2", atan2) // arctan2
135  ("ang", ang) // angle calculation
136  ("ceil", ceil) // ceiling
137  ("cos", cos) // cosine
138  ("cosh", cosh) // hyperbolic cosine
139  ("exp", exp) // exponential
140  ("fabs", fabs) // absolute value
141  ("floor", floor) // floor
142  ("log", log) // natural log
143  ("log10", log10) // log base 10
144  ("rad", rad) // radians
145  ("sin", sin) // sine
146  ("sinh", sinh) // hyperbolic sine
147  ("sqrt", sqrt) // square root
148  ("tan", tan) // tangent
149  ("tanh", tanh) // hyperbolic tangent
150  // and few more custom functions
151  ("sign", sign) // sign
152  ("awgn", awgn) // white noise
153  ;
154  }
static NekDouble rad(NekDouble x, NekDouble y)
Definition: Interpreter.cpp:86
NekDouble awgn(NekDouble sigma)
Definition: Interpreter.cpp:78
static NekDouble ang(NekDouble x, NekDouble y)
Definition: Interpreter.cpp:91
NekDouble sign(NekDouble arg)
Definition: Interpreter.cpp:70
scalarT< T > log(scalarT< T > in)
Definition: scalar.hpp:278
scalarT< T > abs(scalarT< T > in)
Definition: scalar.hpp:272
scalarT< T > sqrt(scalarT< T > in)
Definition: scalar.hpp:267

References tinysimd::abs(), Nektar::LibUtilities::ang(), Nektar::LibUtilities::awgn(), tinysimd::log(), Nektar::LibUtilities::rad(), Nektar::LibUtilities::sign(), and tinysimd::sqrt().