Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:25:33

0001 #ifndef NINJA_TENSOR_NINJA_HH
0002 #define NINJA_TENSOR_NINJA_HH
0003 
0004 #include <ninja/num_defs.hh>
0005 
0006 namespace ninja {
0007 
0008   // Numeber of entries of a rank R symmetric tensor-numerator
0009   // (namely, all the entries up to rank R), i.e. binomial(R+4,R)
0010   template <int R>
0011   struct SymTensorDim {
0012     enum {val = (R+1)*(R+2)*(R+3)*(R+4)/12 };
0013   };
0014   
0015 
0016   // This class represents a generic symmetric tensor numerator of n
0017   // internal legs and rank r.  The numerator is defined by a
0018   // unidimensional array of coefficients, which must follow the
0019   // convention of the representation of Eq. (C.15) in
0020   // http://arxiv.org/abs/1405.0301, and is passed to the constructor.
0021   class TensorNumerator : public Numerator {
0022   public:
0023 
0024     TensorNumerator(unsigned n, unsigned r, const Complex * num);
0025 
0026     virtual Complex evaluate(const ninja::ComplexMomentum & q,
0027                              const ninja::Complex & muq,
0028                              int cut, const ninja::PartitionInt part[]);
0029 
0030     virtual void muExpansion(const ninja::ComplexMomentum v_perp[],
0031                              const ninja::PartitionInt part[],
0032                              ninja::Complex c[]);
0033 
0034     virtual void t3Expansion(const ninja::ComplexMomentum & a,
0035                              const ninja::ComplexMomentum & e3,
0036                              const ninja::ComplexMomentum & e4,
0037                              const ninja::Complex & param,
0038                              int mindeg,
0039                              int cut, const ninja::PartitionInt part[],
0040                              ninja::Complex c[]);
0041 
0042     virtual void t2Expansion(const ninja::ComplexMomentum & a0,
0043                              const ninja::ComplexMomentum & a1,
0044                              const ninja::ComplexMomentum & e3,
0045                              const ninja::ComplexMomentum & e4,
0046                              const ninja::Complex param[],
0047                              int mindeg,
0048                              int cut, const ninja::PartitionInt part[],
0049                              ninja::Complex c[]);
0050 
0051     virtual ~TensorNumerator()
0052     {
0053       delete [] t0_;
0054       delete [] t1_;
0055       delete [] t2_;
0056       delete [] t3_;
0057       delete [] t4_;
0058       delete [] t5_;
0059       delete [] t6_;
0060       delete [] t7_;
0061     }
0062 
0063   private:
0064     // a pointer to the tensor numerator
0065     const Complex * num_;
0066 
0067     // pointers to more allocated tensors used to store the Laurent
0068     // expansions
0069     Complex * t0_;
0070     Complex * t1_;
0071     Complex * t2_;
0072     Complex * t3_;
0073     Complex * t4_;
0074     Complex * t5_;
0075     Complex * t6_;
0076     Complex * t7_;
0077 
0078     // nlegs and rank
0079     int n_, r_;
0080   };
0081   
0082 } // namespace ninja
0083 
0084 #endif // NINJA_TENSOR_NINJA_HH
0085