Nektar++
Public Member Functions | List of all members
Nektar::LibUtilities::functions Struct Reference
Inheritance diagram for Nektar::LibUtilities::functions:
Inheritance graph
[legend]
Collaboration diagram for Nektar::LibUtilities::functions:
Collaboration graph
[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 119 of file AnalyticExpressionEvaluator.cpp.

Constructor & Destructor Documentation

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

Definition at line 121 of file AnalyticExpressionEvaluator.cpp.

References Nektar::LibUtilities::ang(), Nektar::LibUtilities::awgn(), Nektar::LibUtilities::rad(), and sign.

122  {
123  // Add all of the functions from math.h
124  add
125  ("abs", std::abs)
126  ("asin", asin)
127  ("acos", acos)
128  ("atan", atan)
129  ("atan2", atan2)
130  ("ang", ang)
131  ("ceil", ceil)
132  ("cos", cos)
133  ("cosh", cosh)
134  ("exp", exp)
135  ("fabs", fabs) // same as abs
136  ("floor", floor)
137  ("log", log)
138  ("log10", log10)
139  ("rad", rad)
140  ("sin", sin)
141  ("sinh", sinh)
142  ("sqrt", sqrt)
143  ("tan", tan)
144  ("tanh", tanh)
145  // and few more custom functions
146  ("sign", sign)
147  ("awgn", awgn)
148  ;
149  }
static NekDouble ang(NekDouble x, NekDouble y)
NekDouble sign(NekDouble arg)
NekDouble awgn(NekDouble sigma)
static NekDouble rad(NekDouble x, NekDouble y)