IFEM 90A354
IFEM_math.h
Go to the documentation of this file.
1// $Id$
2//==============================================================================
12//==============================================================================
13
14#ifndef UTL_MATH_H
15#define UTL_MATH_H
16
17#include <cmath>
18#include <cstddef>
19#include <vector>
20
21
22namespace utl
23{
27 size_t Pascal(int p, unsigned short int nsd);
29 void Pascal(int p, Real x, Real y, std::vector<Real>& phi);
31 void Pascal(int p, Real x, Real y, Real z, std::vector<Real>& phi);
32
34 inline Real Pos(Real x) { return x > Real(0) ? x : Real(0); }
36 inline Real Neg(Real x) { return x < Real(0) ? x : Real(0); }
38 inline Real Rad(Real x) { return x*M_PI/Real(180); }
39}
40
41#endif
#define Real
The floating point type to use.
Definition ImmersedBoundaries.h:18
General utility classes and functions.
Definition SIMoptions.h:22
Real Rad(Real x)
Converts from degrees to radians.
Definition IFEM_math.h:38
size_t Pascal(int p, unsigned short int nsd)
Returns the number of monomials in Pascal's triangle.
Definition IFEM_math.C:17
Real Pos(Real x)
Evaluates the positive ramp function .
Definition IFEM_math.h:34
Real Neg(Real x)
Evaluates the negative ramp function .
Definition IFEM_math.h:36