27 #ifndef IPPL_TYPE_COMPUTATIONS_H 
   28 #define IPPL_TYPE_COMPUTATIONS_H 
   37 template<
class T, 
unsigned D> 
class Vektor;
 
   38 template<
class T, 
unsigned D> 
class Tenzor;
 
   40 template<
class T, 
unsigned D> 
class SymTenzor;
 
   47 inline int sign(
T a) { 
return ((a > 0) ? 1 : (a == 0 ? 0 : -1)); }
 
   64 #define _SCALAR_RNG_OP_RETURNS_(GEN,SCA,OP)                             \ 
   66 struct PETEBinaryReturn<GEN,SCA,OP> {                                   \ 
   67   typedef PETEBinaryReturn<double,SCA,OP>::type type;                   \ 
   70 struct PETEBinaryReturn<SCA,GEN,OP> {                                   \ 
   71   typedef PETEBinaryReturn<SCA,double,OP>::type type;                   \ 
   74 #define _SCALAR_RNG_RETURNS_(GEN,SCA)                                   \ 
   75 _SCALAR_RNG_OP_RETURNS_(GEN,SCA,OpAdd)                                  \ 
   76 _SCALAR_RNG_OP_RETURNS_(GEN,SCA,OpSubtract)                             \ 
   77 _SCALAR_RNG_OP_RETURNS_(GEN,SCA,OpMultipply)                             \ 
   78 _SCALAR_RNG_OP_RETURNS_(GEN,SCA,OpDivide) 
   80 #define _PETE_RNG_RETURNS_(GEN)                                         \ 
   82 template <> struct PETE_Type2Index< GEN > {                             \ 
   83   enum { val = PETE_Type2Index<double>::val };                          \ 
   86 _SCALAR_RNG_RETURNS_(GEN,short)                                         \ 
   87 _SCALAR_RNG_RETURNS_(GEN,int)                                           \ 
   88 _SCALAR_RNG_RETURNS_(GEN,long)                                          \ 
   89 _SCALAR_RNG_RETURNS_(GEN,float)                                         \ 
   90 _SCALAR_RNG_RETURNS_(GEN,double)                                        \ 
   91 _SCALAR_RNG_RETURNS_(GEN,std::complex<double>) 
   99 template<class 
T, 
unsigned Dim>
 
  104 template<
class T, 
unsigned Dim>
 
  109 template<
class T, 
unsigned Dim>
 
  114 template<
class T, 
unsigned Dim>
 
  214 template<
class T, 
unsigned Dim>
 
  219 template<
class T, 
unsigned Dim>
 
  224 template<
class T, 
unsigned Dim>
 
  229 template<
class T, 
unsigned Dim>
 
  234 template<
class T, 
unsigned Dim>
 
  239 template<
class T, 
unsigned Dim>
 
  244 template<
class T, 
unsigned Dim>
 
  249 template<
class T, 
unsigned Dim>
 
  254 template<
class T, 
unsigned Dim>
 
  259 template<
class T, 
unsigned Dim>
 
  264 template<
class T, 
unsigned Dim>
 
  269 template<
class T, 
unsigned Dim>
 
  313 template<
class T1, 
class T2, 
unsigned Dim>
 
  318 template<
class T1, 
class T2, 
unsigned Dim>
 
  323 template<
class T1, 
class T2, 
unsigned Dim>
 
  330 template<
class T1, 
class T2, 
unsigned Dim>
 
  335 template<
class T1, 
class T2, 
unsigned Dim>
 
  340 template<
class T1, 
class T2, 
unsigned Dim>
 
  345 template<
class T1, 
class T2, 
unsigned Dim>
 
  352 template<
class T1, 
class T2, 
unsigned Dim>
 
  358 template<
class T1, 
class T2, 
unsigned Dim>
 
  363 template<
class T1, 
class T2, 
unsigned Dim>
 
  368 template<
class T1, 
class T2, 
unsigned Dim>
 
  373 template<
class T1, 
class T2, 
unsigned Dim>
 
  378 template<
class T1, 
class T2, 
unsigned Dim>
 
  383 template<
class T1, 
class T2, 
unsigned Dim>
 
  388 template<
class T1, 
class T2, 
unsigned Dim>
 
  393 template<
class T1, 
class T2, 
unsigned Dim>
 
  398 template<
class T1, 
class T2, 
unsigned Dim>
 
  403 template<
class T1, 
class T2, 
unsigned Dim>
 
  408 template<
class T1, 
class T2, 
unsigned Dim>
 
  413 template<
class T1, 
class T2, 
unsigned Dim>
 
  420 template<
class T1, 
class T2, 
unsigned Dim>
 
  426 template<
class T1, 
class T2, 
unsigned Dim>
 
  432 template<
class T1, 
class T2, 
unsigned Dim>
 
  437 template<
class T1, 
class T2, 
unsigned Dim>
 
  442 template<
class T1, 
class T2, 
unsigned Dim>
 
  447 template<
class T1, 
class T2, 
unsigned Dim>
 
  452 template<
class T1, 
class T2, 
unsigned Dim>
 
  457 template<
class T1, 
class T2, 
unsigned Dim>
 
  462 template<
class T1, 
class T2, 
unsigned Dim>
 
  467 template<
class T1, 
class T2, 
unsigned Dim>
 
  472 template<
class T1, 
class T2, 
unsigned Dim>
 
  477 template<
class T1, 
class T2, 
unsigned Dim>
 
  482 template<
class T1, 
class T2, 
unsigned Dim>
 
  487 template<
class T1, 
class T2, 
unsigned Dim>
 
  492 template<
class T1, 
class T2, 
unsigned Dim>
 
  497 template<
class T1, 
class T2, 
unsigned Dim>
 
  502 template<
class T1, 
class T2, 
unsigned Dim>
 
  507 template<
class T1, 
class T2, 
unsigned Dim>
 
  512 template<
class T1, 
class T2, 
unsigned Dim>
 
  517 template<
class T1, 
class T2, 
unsigned Dim>
 
  522 template<
class T1, 
class T2, 
unsigned Dim>
 
  527 template<
class T1, 
class T2, 
unsigned Dim>
 
  534 #define _SCALAR_VST_RETURNS_(Sca)                                           \ 
  535 template<class T1, unsigned Dim>                                            \ 
  536 struct PETEBinaryReturn<Vektor<T1,Dim>,Sca,OpMultipply> {                    \ 
  537   typedef Vektor<typename PETEBinaryReturn<T1,Sca,OpMultipply>::type,Dim>    \ 
  540 template<class T2, unsigned Dim>                                            \ 
  541 struct PETEBinaryReturn<Sca,Vektor<T2,Dim>,OpMultipply> {                    \ 
  542   typedef Vektor<typename PETEBinaryReturn<Sca,T2,OpMultipply>::type,Dim>    \ 
  545 template<class T1, unsigned Dim>                                            \ 
  546 struct PETEBinaryReturn<Vektor<T1,Dim>,Sca,OpDivide> {                      \ 
  547   typedef Vektor<typename PETEBinaryReturn<T1,Sca,OpDivide>::type,Dim>      \ 
  550 template<class T1, unsigned Dim>                                            \ 
  551 struct PETEBinaryReturn<Tenzor<T1,Dim>,Sca,OpMultipply> {                    \ 
  552   typedef Tenzor<typename PETEBinaryReturn<T1,Sca,OpMultipply>::type,Dim>    \ 
  555 template<class T2, unsigned Dim>                                            \ 
  556 struct PETEBinaryReturn<Sca,Tenzor<T2,Dim>,OpMultipply> {                    \ 
  557   typedef Tenzor<typename PETEBinaryReturn<Sca,T2,OpMultipply>::type,Dim>    \ 
  560 template<class T1, unsigned Dim>                                            \ 
  561 struct PETEBinaryReturn<Tenzor<T1,Dim>,Sca,OpDivide> {                      \ 
  562   typedef Tenzor<typename PETEBinaryReturn<T1,Sca,OpDivide>::type,Dim>      \ 
  565 template<class T1, unsigned Dim>                                            \ 
  566 struct PETEBinaryReturn<SymTenzor<T1,Dim>,Sca,OpMultipply> {                 \ 
  567   typedef SymTenzor<typename PETEBinaryReturn<T1,Sca,OpMultipply>::type,Dim> \ 
  570 template<class T2, unsigned Dim>                                            \ 
  571 struct PETEBinaryReturn<Sca,SymTenzor<T2,Dim>,OpMultipply> {                 \ 
  572   typedef SymTenzor<typename PETEBinaryReturn<Sca,T2,OpMultipply>::type,Dim> \ 
  575 template<class T1, unsigned Dim>                                            \ 
  576 struct PETEBinaryReturn<SymTenzor<T1,Dim>,Sca,OpDivide> {                   \ 
  577   typedef SymTenzor<typename PETEBinaryReturn<T1,Sca,OpDivide>::type,Dim>   \ 
  580 template<class T1, unsigned Dim>                                            \ 
  581 struct PETEBinaryReturn<AntiSymTenzor<T1,Dim>,Sca,OpMultipply> {             \ 
  583   AntiSymTenzor<typename PETEBinaryReturn<T1,Sca,OpMultipply>::type,Dim>     \ 
  586 template<class T2, unsigned Dim>                                            \ 
  587 struct PETEBinaryReturn<Sca,AntiSymTenzor<T2,Dim>,OpMultipply> {             \ 
  589   AntiSymTenzor<typename PETEBinaryReturn<Sca,T2,OpMultipply>::type,Dim>     \ 
  592 template<class T1, unsigned Dim>                                            \ 
  593 struct PETEBinaryReturn<AntiSymTenzor<T1,Dim>,Sca,OpDivide> {               \ 
  595   AntiSymTenzor<typename PETEBinaryReturn<T1,Sca,OpDivide>::type,Dim>       \ 
  606 #undef _SCALAR_VST_RETURNS_ 
  638 template<
class T, 
class TP, 
unsigned Dim>
 
  643 template<
class T, 
class TP, 
unsigned Dim>
 
  648 template<
class T, 
class TP, 
unsigned Dim>
 
  653 template<
class T, 
class TP, 
unsigned Dim>
 
  658 #endif // IPPL_TYPE_COMPUTATIONS_H 
Tenzor< typename PETEBinaryReturn< T1, T2, OpSubtract >::type, Dim > type
 
#define _PETE_RNG_RETURNS_(GEN)
 
const int PETE_BinaryPromoteTag
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, Dim > type
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, Dim > type
 
Vektor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, Dim > type
 
Vektor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, Dim > type
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, Dim > type
 
Vektor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, Dim > type
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpSubtract >::type, Dim > type
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, Dim > type
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, Dim > type
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpSubtract >::type, Dim > type
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, Dim > type
 
Vektor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, Dim > type
 
PETEBinaryReturn< T1, T2, OpMultipply >::type type
 
PETE_ComputeBinaryType< T1, T2, Op, Op::tag >::type type
 
Vektor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, Dim > type
 
AntiSymTenzor< T, Dim > type
 
Vektor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, Dim > type
 
PETEBinaryReturn< T1, T2, OpMultipply >::type type
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpAdd >::type, Dim > type
 
clearpage the user may choose between constant or variable radius This model includes fringe fields TP
 
PETEBinaryReturn< T1, T2, OpMultipply >::type type
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpAdd >::type, Dim > type
 
PETEBinaryReturn< T1, T2, OpMultipply >::type type
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, Dim > type
 
PETEBinaryReturn< T1, T2, OpMultipply >::type type
 
PETEBinaryReturn< T1, T2, OpMultipply >::type type
 
PETEBinaryReturn< T1, T2, OpMultipply >::type type
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, Dim > type
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, Dim > type
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpSubtract >::type, Dim > type
 
const int PETE_UnaryPassThruTag
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpSubtract >::type, Dim > type
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, Dim > type
 
#define _SCALAR_VST_RETURNS_(Sca)
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpAdd >::type, Dim > type
 
const int PETE_BinaryUseLeftTag
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpAdd >::type, Dim > type
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, Dim > type
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpAdd >::type, Dim > type
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpSubtract >::type, Dim > type
 
AntiSymTenzor< T, Dim > type
 
MMatrix< m_complex > complex(MMatrix< double > real)
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpAdd >::type, Dim > type
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, Dim > type
 
PETEBinaryReturn< T1, T2, OpMultipply >::type type
 
Vektor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, Dim > type
 
PETEBinaryReturn< T1, T2, OpMultipply >::type type
 
PETEBinaryReturn< T1, T2, OpMultipply >::type type
 
Tenzor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, Dim > type