/*! * @file Macros.h * @author Jan Zapletal * @date July 16, 2013 * */ #ifndef MACROS_H #define MACROS_H #define EPS (0.000000000001) #define PI_FACT ( (SCVT) 0.07957747154594766788 ) #define DOT3( a, b ) ( a[ 0 ] * b[ 0 ] + a[ 1 ] * b[ 1 ] + a[ 2 ] * b[ 2 ] ) #define NORM3( a ) (std::sqrt(DOT3(a,a))) #define DIST3( a, b ) ( std::sqrt( ( a[ 0 ] - b[ 0 ] ) * ( a[ 0 ] - b[ 0 ] ) + \ ( a[ 1 ] - b[ 1 ] ) * ( a[ 1 ] - b[ 1 ] ) + \ ( a[ 2 ] - b[ 2 ] ) * ( a[ 2 ] - b[ 2 ] ) ) ) #define DIST3SQ( a, b ) ( ( a[ 0 ] - b[ 0 ] ) * ( a[ 0 ] - b[ 0 ] ) + \ ( a[ 1 ] - b[ 1 ] ) * ( a[ 1 ] - b[ 1 ] ) + \ ( a[ 2 ] - b[ 2 ] ) * ( a[ 2 ] - b[ 2 ] ) ) #define BUFFER_SIZE (40) namespace bem4i { template struct GetType { }; template<> struct GetType > { double eps = 1e-12; typedef double SCVT; }; template<> struct GetType > { float eps = 1e-7; typedef float SCVT; }; template<> struct GetType { double eps = 1e-12; typedef double SCVT; }; template<> struct GetType { double eps = 1e-7; typedef float SCVT; }; template<> struct GetType > { double eps = 1e-12; typedef double SCVT; }; template<> struct GetType > { float eps = 1e-7; typedef float SCVT; }; template<> struct GetType { double eps = 1e-12; typedef double SCVT; }; template<> struct GetType { double eps = 1e-7; typedef float SCVT; }; } #endif /* MACROS_H */