EmbededFunctions.hpp File Reference

#include <Types.hpp>
#include <StreamCenter.hpp>
#include <cmath>

Include dependency graph for EmbededFunctions.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ExpressionBinaryOperator< B, TypeExpression >
class  ExpressionPlus< TypeExpression >
class  ExpressionMinus< TypeExpression >
class  ExpressionMultiplies< TypeExpression >
class  ExpressionDivides< TypeExpression >
class  ExpressionPower< TypeExpression >
class  ExpressionUnaryOperator< U, TypeExpression >
class  ExpressionUnaryMinus< TypeExpression >
class  ExpressionStdFunction< TypeExpression, F >

Functions

real_t unaryMinus (real_t x)
bool not_ (bool a)
bool and_ (bool a, bool b)
bool or_ (bool a, bool b)
bool xor_ (bool a, bool b)
real_t sum (real_t x, real_t y)
real_t difference (real_t x, real_t y)
real_t division (real_t x, real_t y)
real_t product (real_t x, real_t y)
real_t modulo (real_t x, real_t y)
bool gt (real_t x, real_t y)
bool lt (real_t x, real_t y)
bool ge (real_t x, real_t y)
bool le (real_t x, real_t y)
bool eq (real_t x, real_t y)
bool ne (real_t x, real_t y)
real_t function_x (real_t x, real_t y, real_t z)
real_t function_y (real_t x, real_t y, real_t z)
real_t function_z (real_t x, real_t y, real_t z)
template<real_t(*)(real_t x) F>
std::ostream & functionName (std::ostream &os)
template<>
std::ostream & functionName< std::log > (std::ostream &os)
template<>
std::ostream & functionName< std::sin > (std::ostream &os)
template<>
std::ostream & functionName< std::cos > (std::ostream &os)
template<>
std::ostream & functionName< std::tan > (std::ostream &os)
template<>
std::ostream & functionName< std::asin > (std::ostream &os)
template<>
std::ostream & functionName< std::acos > (std::ostream &os)
template<>
std::ostream & functionName< std::atan > (std::ostream &os)
template<>
std::ostream & functionName< std::exp > (std::ostream &os)
template<>
std::ostream & functionName< std::abs > (std::ostream &os)
template<>
std::ostream & functionName< std::sqrt > (std::ostream &os)
template<bool(*)(real_t x, real_t y) F>
std::ostream & operatorName (std::ostream &os)
template<>
std::ostream & operatorName< gt > (std::ostream &os)
template<>
std::ostream & operatorName< lt > (std::ostream &os)
template<>
std::ostream & operatorName< ge > (std::ostream &os)
template<>
std::ostream & operatorName< le > (std::ostream &os)
template<>
std::ostream & operatorName< eq > (std::ostream &os)
template<>
std::ostream & operatorName< ne > (std::ostream &os)
template<bool(*)(bool x, bool y) F>
std::ostream & binaryBooleanName (std::ostream &os)
template<>
std::ostream & binaryBooleanName< and_ > (std::ostream &os)
template<>
std::ostream & binaryBooleanName< or_ > (std::ostream &os)
template<>
std::ostream & binaryBooleanName< xor_ > (std::ostream &os)
template<bool(*)(bool x) F>
std::ostream & unaryBooleanName (std::ostream &os)
template<>
std::ostream & unaryBooleanName< not_ > (std::ostream &os)


Function Documentation

bool and_ ( bool  a,
bool  b 
)

Definition at line 92 of file EmbededFunctions.cpp.

00093 {
00094   return (a and b);
00095 }

template<bool(*)(bool x, bool y) F>
std::ostream& binaryBooleanName ( std::ostream &  os  )  [inline]

Associates name to boolean operators

Definition at line 418 of file EmbededFunctions.hpp.

00419 {
00420   os << __FILE__ << ':' << __LINE__ << ": Not implemented\n";
00421   return os;
00422 }

template<>
std::ostream& binaryBooleanName< and_ > ( std::ostream &  os  )  [inline]

template<>
std::ostream& binaryBooleanName< or_ > ( std::ostream &  os  )  [inline]

template<>
std::ostream& binaryBooleanName< xor_ > ( std::ostream &  os  )  [inline]

real_t difference ( real_t  x,
real_t  y 
)

Definition at line 46 of file EmbededFunctions.cpp.

00047 {
00048   return x-y;
00049 }

real_t division ( real_t  x,
real_t  y 
)

Definition at line 51 of file EmbededFunctions.cpp.

00052 {
00053   return x/y;
00054 }

bool eq ( real_t  x,
real_t  y 
)

Definition at line 82 of file EmbededFunctions.cpp.

00083 {
00084   return (x == y);
00085 }

real_t function_x ( real_t  x,
real_t  y,
real_t  z 
) [inline]

Definition at line 54 of file EmbededFunctions.hpp.

00055 {
00056   return x;
00057 }

real_t function_y ( real_t  x,
real_t  y,
real_t  z 
) [inline]

Definition at line 59 of file EmbededFunctions.hpp.

00060 {
00061   return y;
00062 }

real_t function_z ( real_t  x,
real_t  y,
real_t  z 
) [inline]

Definition at line 64 of file EmbededFunctions.hpp.

00065 {
00066   return z;
00067 }

template<real_t(*)(real_t x) F>
std::ostream& functionName ( std::ostream &  os  )  [inline]

Associates name to cmath functions

Definition at line 350 of file EmbededFunctions.hpp.

00351 {
00352   os << __FILE__ << ':' << __LINE__ << ": Not implemented\n";
00353   return os;
00354 }

template<>
std::ostream& functionName< std::abs > ( std::ostream &  os  )  [inline]

template<>
std::ostream& functionName< std::acos > ( std::ostream &  os  )  [inline]

template<>
std::ostream& functionName< std::asin > ( std::ostream &  os  )  [inline]

template<>
std::ostream& functionName< std::atan > ( std::ostream &  os  )  [inline]

template<>
std::ostream& functionName< std::cos > ( std::ostream &  os  )  [inline]

template<>
std::ostream& functionName< std::exp > ( std::ostream &  os  )  [inline]

template<>
std::ostream& functionName< std::log > ( std::ostream &  os  )  [inline]

template<>
std::ostream& functionName< std::sin > ( std::ostream &  os  )  [inline]

template<>
std::ostream& functionName< std::sqrt > ( std::ostream &  os  )  [inline]

template<>
std::ostream& functionName< std::tan > ( std::ostream &  os  )  [inline]

bool ge ( real_t  x,
real_t  y 
)

Definition at line 72 of file EmbededFunctions.cpp.

00073 {
00074   return (x >= y);
00075 }

bool gt ( real_t  x,
real_t  y 
)

Definition at line 62 of file EmbededFunctions.cpp.

00063 {
00064   return (x > y);
00065 }

bool le ( real_t  x,
real_t  y 
)

Definition at line 77 of file EmbededFunctions.cpp.

00078 {
00079   return (x <= y);
00080 }

bool lt ( real_t  x,
real_t  y 
)

Definition at line 67 of file EmbededFunctions.cpp.

00068 {
00069   return (x < y);
00070 }

real_t modulo ( real_t  x,
real_t  y 
)

Definition at line 34 of file EmbededFunctions.cpp.

00035 {
00036   int a = static_cast<int>(x);
00037   int b = static_cast<int>(y);
00038   return a%b;
00039 }

bool ne ( real_t  x,
real_t  y 
)

Definition at line 87 of file EmbededFunctions.cpp.

00088 {
00089   return (x != y);
00090 }

bool not_ ( bool  a  ) 

Definition at line 28 of file EmbededFunctions.cpp.

00029 {
00030   return not(a);
00031 }

template<bool(*)(real_t x, real_t y) F>
std::ostream& operatorName ( std::ostream &  os  )  [inline]

Associates name to boolean functions

Definition at line 390 of file EmbededFunctions.hpp.

Referenced by PDEVectorialOperatorExpressionOrderTwo::add().

00391 {
00392   os << __FILE__ << ':' << __LINE__ << ": Not implemented\n";
00393   return os;
00394 }

template<>
std::ostream& operatorName< eq > ( std::ostream &  os  )  [inline]

template<>
std::ostream& operatorName< ge > ( std::ostream &  os  )  [inline]

template<>
std::ostream& operatorName< gt > ( std::ostream &  os  )  [inline]

template<>
std::ostream& operatorName< le > ( std::ostream &  os  )  [inline]

template<>
std::ostream& operatorName< lt > ( std::ostream &  os  )  [inline]

template<>
std::ostream& operatorName< ne > ( std::ostream &  os  )  [inline]

bool or_ ( bool  a,
bool  b 
)

Definition at line 97 of file EmbededFunctions.cpp.

00098 {
00099   return (a or b);
00100 }

real_t product ( real_t  x,
real_t  y 
)

Definition at line 56 of file EmbededFunctions.cpp.

00057 {
00058   return x*y;
00059 }

real_t sum ( real_t  x,
real_t  y 
)

template<bool(*)(bool x) F>
std::ostream& unaryBooleanName ( std::ostream &  os  )  [inline]

Associates name to boolean operators

Definition at line 437 of file EmbededFunctions.hpp.

00438 {
00439   os << __FILE__ << ':' << __LINE__ << ": Not implemented\n";
00440   return os;
00441 }

template<>
std::ostream& unaryBooleanName< not_ > ( std::ostream &  os  )  [inline]

real_t unaryMinus ( real_t  x  ) 

Definition at line 23 of file EmbededFunctions.cpp.

00024 {
00025   return -x;
00026 }

bool xor_ ( bool  a,
bool  b 
)

Definition at line 102 of file EmbededFunctions.cpp.

00103 {
00104   return (a xor b);
00105 }


Generated on Wed Nov 19 00:01:08 2008 for FreeFEM3D (aka ff3d) by  doxygen 1.5.6