44 integer,
intent(in) :: rmax
45 double complex,
intent(in) :: CoefsA(0:rmax/2), CoefsAuv(0:rmax/2)
46 double precision,
intent(in) :: CoefsAerr(0:rmax)
47 double complex,
intent(out) :: TA(RtS(rmax)), TAuv(RtS(rmax))
48 double precision :: TAerr(0:rmax)
50 integer :: mu1,mu2,nsum,mu,nu,r,a,cnt
58 do nu=rts(nsum-1)+1,rts(nsum)
69 do nu=rts(nsum-1)+1,rts(nsum)
88 subroutine calctensora(TA,TAuv,TAerr,CoefsA,CoefsAuv,CoefsAerr,rmax)
90 integer,
intent(in) :: rmax
91 double complex,
intent(in) :: CoefsA(0:rmax/2), CoefsAuv(0:rmax/2)
92 double precision,
intent(in) :: CoefsAerr(0:rmax)
93 double complex,
intent(out) :: TA(0:rmax,0:rmax,0:rmax,0:rmax)
94 double complex,
intent(out) :: TAuv(0:rmax,0:rmax,0:rmax,0:rmax)
95 double precision,
intent(out) :: TAerr(0:rmax)
96 double complex :: TA_aux(RtS(rmax)), TAuv_aux(RtS(rmax))
122 subroutine calctensorb_list(TB,TBuv,TBerr,CoefsB,CoefsBuv,CoefsBerr,mom,rmax)
124 integer,
intent(in) :: rmax
125 double complex,
intent(in) :: mom(0:3)
126 double complex,
intent(in) :: CoefsB(0:rmax/2,0:rmax), CoefsBuv(0:rmax/2,0:rmax)
127 double precision,
intent(in) :: CoefsBerr(0:rmax)
128 double complex,
intent(out) :: TB(RtS(rmax)), TBuv(RtS(rmax))
129 double precision,
intent(out) :: TBerr(0:rmax)
130 double complex :: MomTen(RtS(rmax)), CB, Pmu
131 double precision :: MomMax
132 integer :: mu1,mu2,nsum,mu,nu,r,a,cnt
138 tberr(0) = coefsberr(0)
143 do nu=rts(nsum-1)+1,rts(nsum)
151 tbuv(1) = coefsbuv(0,0)
154 cb = coefsbuv(nsum,0)
156 do nu=rts(nsum-1)+1,rts(nsum)
172 do a = mu1-binomtable(r-1,r+2-mu),mu1-1
173 momten(cnt)=momten(a)*pmu
179 tb(mu1:mu2) = tb(mu1:mu2) + cb*momten(mu1:mu2)
184 do nu=rts(nsum-1)+1,rts(nsum)
194 tbuv(mu1:mu2) = tbuv(mu1:mu2) + cb*momten(mu1:mu2)
197 cb = coefsbuv(nsum,r)
199 do nu=rts(nsum-1)+1,rts(nsum)
211 mommax = maxval(abs(mom))
213 tberr(r) = coefsberr(r)*mommax**r
228 subroutine calctensorb(TB,TBuv,TBerr,CoefsB,CoefsBuv,CoefsBerr,mom,rmax)
230 integer,
intent(in) :: rmax
231 double complex,
intent(in) :: mom(0:3)
232 double complex,
intent(in) :: CoefsB(0:rmax/2,0:rmax), CoefsBuv(0:rmax/2,0:rmax)
233 double precision,
intent(in) :: CoefsBerr(0:rmax)
234 double complex,
intent(out) :: TB(0:rmax,0:rmax,0:rmax,0:rmax)
235 double complex,
intent(out) :: TBuv(0:rmax,0:rmax,0:rmax,0:rmax)
236 double precision,
intent(out) :: TBerr(0:rmax)
237 double complex :: TB_aux(RtS(rmax)), TBuv_aux(RtS(rmax))
240 call calctensorb_list(tb_aux,tbuv_aux,tberr,coefsb,coefsbuv,coefsberr,mom,rmax)
264 subroutine calctensorc_list(TC,TCuv,TCerr,CoefsC,CoefsCuv,CoefsCerr,MomVec,rmax)
266 integer,
intent(in) :: rmax
267 double complex,
intent(in) :: MomVec(0:3,2)
268 double complex,
intent(in) :: CoefsC(0:rmax/2,0:rmax,0:rmax)
269 double complex,
intent(in) :: CoefsCuv(0:rmax/2,0:rmax,0:rmax)
270 double precision,
intent(in) :: CoefsCerr(0:rmax)
271 double complex,
intent(out) :: TC(RtS(rmax)), TCuv(RtS(rmax))
272 double precision,
intent(out) :: TCerr(0:rmax)
273 double complex :: MomTen(5), CC, Pmu
274 double precision :: MomMax
275 integer :: IndsCoef(2),mu1,mu2,nsum,mu,nu,i,a,cnt,r0
279 tc(1) = coefsc(0,0,0)
281 tcerr(0) = coefscerr(0)
284 cc = coefsc(nsum,0,0)
286 do nu=rts(nsum-1)+1,rts(nsum)
297 cc = coefscuv(nsum,0,0)
299 do nu=rts(nsum-1)+1,rts(nsum)
310 momten(2:5) = momvec(0:3,1)
314 momten(2:5) = momvec(0:3,2)
317 mommax = maxval(abs(momvec))
319 tcerr(r0) = coefscerr(r0)*mommax**r0
335 integer,
intent(in) :: r
336 double complex,
intent(in) :: momtenrec(rts(r))
337 integer,
intent(inout) :: indscoef(2)
338 double complex :: momten(rts(r+1)), cc, pmu
339 integer :: mu1,mu2,nsum,mu,nu,i,a,cnt
341 cc = coefsc(0,indscoef(1),indscoef(2))
346 tc(mu1:mu2) = tc(mu1:mu2) + cc*momtenrec(mu1:mu2)
349 cc = coefsc(nsum,indscoef(1),indscoef(2))
351 do nu=rts(nsum-1)+1,rts(nsum)
365 cc = coefscuv(nsum,indscoef(1),indscoef(2))
367 do nu=rts(nsum-1)+1,rts(nsum)
380 indscoef(i) = indscoef(i)+1
385 do a = mu2-binomtable(r,r+3-mu)+1,mu2
386 momten(cnt)=momtenrec(a)*pmu
393 indscoef(i) = indscoef(i)-1
412 subroutine calctensorc(TC,TCuv,TCerr,CoefsC,CoefsCuv,CoefsCerr,MomVec,rmax)
414 integer,
intent(in) :: rmax
415 double complex,
intent(in) :: MomVec(0:3,2)
416 double complex,
intent(in) :: CoefsC(0:rmax/2,0:rmax,0:rmax)
417 double complex,
intent(in) :: CoefsCuv(0:rmax/2,0:rmax,0:rmax)
418 double precision,
intent(in) :: CoefsCerr(0:rmax)
419 double complex,
intent(out) :: TC(0:rmax,0:rmax,0:rmax,0:rmax)
420 double complex,
intent(out) :: TCuv(0:rmax,0:rmax,0:rmax,0:rmax)
421 double precision,
intent(out) :: TCerr(0:rmax)
422 double complex :: TC_aux(RtS(rmax)), TCuv_aux(RtS(rmax))
425 call calctensorc_list(tc_aux,tcuv_aux,tcerr,coefsc,coefscuv,coefscerr,momvec,rmax)
451 subroutine calctensord_list(TD,TDuv,TDerr,CoefsD,CoefsDuv,CoefsDerr,MomVec,rmax)
453 integer,
intent(in) :: rmax
454 double complex,
intent(in) :: MomVec(0:3,3)
455 double complex,
intent(in) :: CoefsD(0:rmax/2,0:rmax,0:rmax,0:rmax)
456 double complex,
intent(in) :: CoefsDuv(0:rmax/2,0:rmax,0:rmax,0:rmax)
457 double precision,
intent(in) :: CoefsDerr(0:rmax)
458 double complex,
intent(out) :: TD(RtS(rmax)), TDuv(RtS(rmax))
459 double precision,
intent(out) :: TDerr(0:rmax)
460 double complex :: MomTen(5), CD, Pmu
461 double precision :: MomMax
462 integer :: IndsCoef(3),mu1,mu2,nsum,mu,nu,i,a,cnt,r0
465 td(1) = coefsd(0,0,0,0)
467 tderr(0) = coefsderr(0)
470 cd = coefsd(nsum,0,0,0)
472 do nu=rts(nsum-1)+1,rts(nsum)
484 cd = coefsduv(nsum,0,0,0)
486 do nu=rts(nsum-1)+1,rts(nsum)
496 indscoef = (/ 1,0,0 /)
497 momten(2:5) = momvec(0:3,1)
500 indscoef = (/ 0,1,0 /)
501 momten(2:5) = momvec(0:3,2)
504 indscoef = (/ 0,0,1 /)
505 momten(2:5) = momvec(0:3,3)
508 mommax = maxval(abs(momvec))
510 tderr(r0) = coefsderr(r0)*mommax**r0
526 integer,
intent(in) :: r
527 integer,
intent(inout) :: indscoef(3)
528 double complex,
intent(in) :: momtenrec(rts(r))
529 double complex :: momten(rts(r+1)), cd, pmu
530 integer :: mu1,mu2,nsum,mu,nu,i,a,cnt
532 cd = coefsd(0,indscoef(1),indscoef(2),indscoef(3))
537 td(mu1:mu2) = td(mu1:mu2) + cd*momtenrec(mu1:mu2)
540 cd = coefsd(nsum,indscoef(1),indscoef(2),indscoef(3))
542 do nu=rts(nsum-1)+1,rts(nsum)
557 cd = coefsduv(nsum,indscoef(1),indscoef(2),indscoef(3))
559 do nu=rts(nsum-1)+1,rts(nsum)
562 + cd*momtenrec(mu)*
cftab(mu,nu)
573 indscoef(i) = indscoef(i)+1
578 do a = mu2-binomtable(r,r+3-mu)+1,mu2
579 momten(cnt)=momtenrec(a)*pmu
586 indscoef(i) = indscoef(i)-1
604 subroutine calctensord(TD,TDuv,TDerr,CoefsD,CoefsDuv,CoefsDerr,MomVec,rmax)
606 integer,
intent(in) :: rmax
607 double complex,
intent(in) :: MomVec(0:3,3)
608 double complex,
intent(in) :: CoefsD(0:rmax/2,0:rmax,0:rmax,0:rmax)
609 double complex,
intent(in) :: CoefsDuv(0:rmax/2,0:rmax,0:rmax,0:rmax)
610 double precision,
intent(in) :: CoefsDerr(0:rmax)
611 double complex,
intent(out) :: TD(0:rmax,0:rmax,0:rmax,0:rmax)
612 double complex,
intent(out) :: TDuv(0:rmax,0:rmax,0:rmax,0:rmax)
613 double precision,
intent(out) :: TDerr(0:rmax)
614 double complex :: TD_aux(RtS(rmax)), TDuv_aux(RtS(rmax))
617 call calctensord_list(td_aux,tduv_aux,tderr,coefsd,coefsduv,coefsderr,momvec,rmax)
642 subroutine calctensore_list(TE,TEuv,TEerr,CoefsE,CoefsEuv,CoefsEerr,MomVec,rmax)
644 integer,
intent(in) :: rmax
645 double complex,
intent(in) :: MomVec(0:3,4)
646 double complex,
intent(in) :: CoefsE(0:rmax/2,0:rmax,0:rmax,0:rmax,0:rmax)
647 double complex,
intent(in) :: CoefsEuv(0:rmax/2,0:rmax,0:rmax,0:rmax,0:rmax)
648 double precision,
intent(in) :: CoefsEerr(0:rmax)
649 double complex,
intent(out) :: TE(RtS(rmax)), TEuv(RtS(rmax))
650 double precision,
intent(out) :: TEerr(0:rmax)
651 double complex :: MomTen(5), CE, Pmu
652 double precision :: MomMax
653 integer :: IndsCoef(4),mu1,mu2,nsum,mu,nu,i,a,cnt,r0
657 te(1) = coefse(0,0,0,0,0)
659 teerr(0) = coefseerr(0)
662 ce = coefse(nsum,0,0,0,0)
664 do nu=rts(nsum-1)+1,rts(nsum)
677 ce = coefseuv(nsum,0,0,0,0)
679 do nu=rts(nsum-1)+1,rts(nsum)
689 indscoef = (/ 1,0,0,0 /)
690 momten(2:5) = momvec(0:3,1)
693 indscoef = (/ 0,1,0,0 /)
694 momten(2:5) = momvec(0:3,2)
697 indscoef = (/ 0,0,1,0 /)
698 momten(2:5) = momvec(0:3,3)
701 indscoef = (/ 0,0,0,1 /)
702 momten(2:5) = momvec(0:3,4)
705 mommax = maxval(abs(momvec))
707 teerr(r0) = coefseerr(r0)*mommax**r0
723 integer,
intent(in) :: r
724 integer,
intent(inout) :: indscoef(4)
725 double complex,
intent(in) :: momtenrec(rts(r))
726 double complex :: momten(rts(r+1)), ce, pmu
727 double precision :: cemax
728 integer :: mu1,mu2,nsum,mu,nu,i,a,cnt
730 ce = coefse(0,indscoef(1),indscoef(2),indscoef(3),indscoef(4))
736 te(mu1:mu2) = te(mu1:mu2) + ce*momtenrec(mu1:mu2)
739 ce = coefse(nsum,indscoef(1),indscoef(2),indscoef(3),indscoef(4))
741 do nu=rts(nsum-1)+1,rts(nsum)
756 ce = coefseuv(nsum,indscoef(1),indscoef(2),indscoef(3),indscoef(4))
758 do nu=rts(nsum-1)+1,rts(nsum)
761 + ce*momtenrec(mu)*
cftab(mu,nu)
772 indscoef(i) = indscoef(i)+1
777 do a = mu2-binomtable(r,r+3-mu)+1,mu2
778 momten(cnt)=momtenrec(a)*pmu
785 indscoef(i) = indscoef(i)-1
803 subroutine calctensore(TE,TEuv,TEerr,CoefsE,CoefsEuv,CoefsEerr,MomVec,rmax)
805 integer,
intent(in) :: rmax
806 double complex,
intent(in) :: MomVec(0:3,4)
807 double complex,
intent(in) :: CoefsE(0:rmax/2,0:rmax,0:rmax,0:rmax,0:rmax)
808 double complex,
intent(in) :: CoefsEuv(0:rmax/2,0:rmax,0:rmax,0:rmax,0:rmax)
809 double precision,
intent(in) :: CoefsEerr(0:rmax)
810 double complex,
intent(out) :: TE(0:rmax,0:rmax,0:rmax,0:rmax)
811 double complex,
intent(out) :: TEuv(0:rmax,0:rmax,0:rmax,0:rmax)
812 double precision,
intent(out) :: TEerr(0:rmax)
813 double complex :: TE_aux(RtS(rmax)), TEuv_aux(RtS(rmax))
816 call calctensore_list(te_aux,teuv_aux,teerr,coefse,coefseuv,coefseerr,momvec,rmax)
842 subroutine calctensorf_list(TF,TFuv,TFerr,CoefsF,CoefsFuv,CoefsFerr,MomVec,rmax)
844 integer,
intent(in) :: rmax
845 double complex,
intent(in) :: MomVec(0:3,5)
846 double complex,
intent(in) :: CoefsF(0:rmax/2,0:rmax,0:rmax,0:rmax,0:rmax,0:rmax)
847 double complex,
intent(in) :: CoefsFuv(0:rmax/2,0:rmax,0:rmax,0:rmax,0:rmax,0:rmax)
848 double precision,
intent(in) :: CoefsFerr(0:rmax)
849 double complex,
intent(out) :: TF(RtS(rmax)), TFuv(RtS(rmax))
850 double precision,
intent(out) :: TFerr(0:rmax)
851 double precision :: MomMax
852 double complex :: MomTen(5), CF, Pmu
853 integer :: IndsCoef(5),mu1,mu2,nsum,mu,nu,i,a,cnt,r0
856 tf(1) = coefsf(0,0,0,0,0,0)
858 tferr(0) = coefsferr(0)
861 cf = coefsf(nsum,0,0,0,0,0)
863 do nu=rts(nsum-1)+1,rts(nsum)
875 cf = coefsfuv(nsum,0,0,0,0,0)
877 do nu=rts(nsum-1)+1,rts(nsum)
887 indscoef = (/ 1,0,0,0,0 /)
888 momten(2:5) = momvec(0:3,1)
891 indscoef = (/ 0,1,0,0,0 /)
892 momten(2:5) = momvec(0:3,2)
895 indscoef = (/ 0,0,1,0,0 /)
896 momten(2:5) = momvec(0:3,3)
899 indscoef = (/ 0,0,0,1,0 /)
900 momten(2:5) = momvec(0:3,4)
903 indscoef = (/ 0,0,0,0,1 /)
904 momten(2:5) = momvec(0:3,5)
907 mommax = maxval(abs(momvec))
909 tferr(r0) = coefsferr(r0)*mommax**r0
925 integer,
intent(in) :: r
926 integer,
intent(inout) :: indscoef(5)
927 double complex,
intent(in) :: momtenrec(rts(r))
928 double complex :: momten(rts(r+1)), cf, pmu
929 integer :: mu1,mu2,nsum,mu,nu,i,a,cnt
931 cf = coefsf(0,indscoef(1),indscoef(2),indscoef(3),indscoef(4),indscoef(5))
936 tf(mu1:mu2) = tf(mu1:mu2) + cf*momtenrec(mu1:mu2)
939 cf = coefsf(nsum,indscoef(1),indscoef(2),indscoef(3),indscoef(4),indscoef(5))
941 do nu=rts(nsum-1)+1,rts(nsum)
956 cf = coefsfuv(nsum,indscoef(1),indscoef(2),indscoef(3),indscoef(4),indscoef(5))
958 do nu=rts(nsum-1)+1,rts(nsum)
961 + cf*momtenrec(mu)*
cftab(mu,nu)
972 indscoef(i) = indscoef(i)+1
977 do a = mu2-binomtable(r,r+3-mu)+1,mu2
978 momten(cnt)=momtenrec(a)*pmu
985 indscoef(i) = indscoef(i)-1
1003 subroutine calctensorf(TF,TFuv,TFerr,CoefsF,CoefsFuv,CoefsFerr,MomVec,rmax)
1005 integer,
intent(in) :: rmax
1006 double complex,
intent(in) :: MomVec(0:3,5)
1007 double complex,
intent(in) :: CoefsF(0:rmax/2,0:rmax,0:rmax,0:rmax,0:rmax,0:rmax)
1008 double complex,
intent(in) :: CoefsFuv(0:rmax/2,0:rmax,0:rmax,0:rmax,0:rmax,0:rmax)
1009 double precision,
intent(in) :: CoefsFerr(0:rmax)
1010 double complex,
intent(out) :: TF(0:rmax,0:rmax,0:rmax,0:rmax)
1011 double complex,
intent(out) :: TFuv(0:rmax,0:rmax,0:rmax,0:rmax)
1012 double precision,
intent(out) :: TFerr(0:rmax)
1013 double complex :: TF_aux(RtS(rmax)), TFuv_aux(RtS(rmax))
1016 call calctensorf_list(tf_aux,tfuv_aux,tferr,coefsf,coefsfuv,coefsferr,momvec,rmax)
1043 integer,
intent(in) :: rmax
1044 double complex,
intent(in) :: MomVec(0:3,5)
1045 double complex,
intent(in) :: CoefsFuv(0:rmax/2,0:rmax,0:rmax,0:rmax,0:rmax,0:rmax)
1046 double complex,
intent(out) :: TFuv(RtS(rmax))
1047 double complex :: MomTen(5), CF, Pmu
1048 integer :: IndsCoef(5),mu1,mu2,nsum,mu,nu,i,a,cnt
1053 cf = coefsfuv(nsum,0,0,0,0,0)
1055 do nu=rts(nsum-1)+1,rts(nsum)
1063 indscoef = (/ 1,0,0,0,0 /)
1064 momten(2:5) = momvec(0:3,1)
1067 indscoef = (/ 0,1,0,0,0 /)
1068 momten(2:5) = momvec(0:3,2)
1071 indscoef = (/ 0,0,1,0,0 /)
1072 momten(2:5) = momvec(0:3,3)
1075 indscoef = (/ 0,0,0,1,0 /)
1076 momten(2:5) = momvec(0:3,4)
1079 indscoef = (/ 0,0,0,0,1 /)
1080 momten(2:5) = momvec(0:3,5)
1096 integer,
intent(in) :: r
1097 integer,
intent(inout) :: indscoef(5)
1098 double complex,
intent(in) :: momtenrec(rts(r))
1099 double complex :: momten(rts(r+1)), cf, pmu
1100 integer :: mu1,mu2,nsum,mu,nu,i,a,cnt
1105 do nsum=4,(rmax-r)/2
1106 cf = coefsfuv(nsum,indscoef(1),indscoef(2),indscoef(3),indscoef(4),indscoef(5))
1108 do nu=rts(nsum-1)+1,rts(nsum)
1111 + cf*momtenrec(mu)*
cftab(mu,nu)
1118 if (r.lt.rmax-8)
then
1121 indscoef(i) = indscoef(i)+1
1126 do a = mu2-binomtable(r,r+3-mu)+1,mu2
1127 momten(cnt)=momtenrec(a)*pmu
1134 indscoef(i) = indscoef(i)-1
1154 integer,
intent(in) :: rmax
1155 double complex,
intent(in) :: MomVec(0:3,5)
1156 double complex,
intent(in) :: CoefsFuv(0:rmax/2,0:rmax,0:rmax,0:rmax,0:rmax,0:rmax)
1157 double complex,
intent(out) :: TFuv(0:rmax,0:rmax,0:rmax,0:rmax)
1158 double complex :: TFuv_aux(RtS(rmax))
1177 subroutine calctensorg_list(TG,TGuv,TGerr,CoefsG,CoefsGuv,CoefsGerr,MomVec,rmax)
1179 integer,
intent(in) :: rmax
1180 double complex,
intent(in) :: MomVec(0:3,6)
1181 double complex,
intent(in) :: CoefsG(0:rmax/2,0:rmax,0:rmax,0:rmax,0:rmax,0:rmax,0:rmax)
1182 double complex,
intent(in) :: CoefsGuv(0:rmax/2,0:rmax,0:rmax,0:rmax,0:rmax,0:rmax,0:rmax)
1183 double precision,
intent(in) :: CoefsGerr(0:rmax)
1184 double complex,
intent(out) :: TG(RtS(rmax)), TGuv(RtS(rmax))
1185 double precision,
intent(out) :: TGerr(0:rmax)
1186 double complex :: MomTen(5), CG, Pmu
1187 double precision :: MomMax
1188 integer :: IndsCoef(6),mu1,mu2,nsum,mu,nu,i,a,cnt,r0
1192 tg(1) = coefsg(0,0,0,0,0,0,0)
1194 tgerr(0) = coefsgerr(0)
1197 cg = coefsg(nsum,0,0,0,0,0,0)
1199 do nu=rts(nsum-1)+1,rts(nsum)
1211 cg = coefsguv(nsum,0,0,0,0,0,0)
1213 do nu=rts(nsum-1)+1,rts(nsum)
1223 indscoef = (/ 1,0,0,0,0,0 /)
1224 momten(2:5) = momvec(0:3,1)
1227 indscoef = (/ 0,1,0,0,0,0 /)
1228 momten(2:5) = momvec(0:3,2)
1231 indscoef = (/ 0,0,1,0,0,0 /)
1232 momten(2:5) = momvec(0:3,3)
1235 indscoef = (/ 0,0,0,1,0,0 /)
1236 momten(2:5) = momvec(0:3,4)
1239 indscoef = (/ 0,0,0,0,1,0 /)
1240 momten(2:5) = momvec(0:3,5)
1243 indscoef = (/ 0,0,0,0,0,1 /)
1244 momten(2:5) = momvec(0:3,6)
1247 mommax = maxval(abs(momvec))
1249 tgerr(r0) = coefsgerr(r0)*mommax**r0
1263 recursive subroutine addtotensorg(MomTenRec,IndsCoef,r)
1266 integer,
intent(inout) :: indscoef(6)
1267 double complex,
intent(in) :: momtenrec(rts(r))
1268 double complex :: momten(rts(r+1)), cg, pmu
1269 integer :: mu1,mu2,nsum,mu,nu,i,a,cnt
1271 cg = coefsg(0,indscoef(1),indscoef(2),indscoef(3),indscoef(4),indscoef(5),indscoef(6))
1276 tg(mu1:mu2) = tg(mu1:mu2) + cg*momtenrec(mu1:mu2)
1278 do nsum=1,(rmax-r)/2
1279 cg = coefsg(nsum,indscoef(1),indscoef(2),indscoef(3),indscoef(4),indscoef(5),indscoef(6))
1281 do nu=rts(nsum-1)+1,rts(nsum)
1295 do nsum=5,(rmax-r)/2
1296 cg = coefsguv(nsum,indscoef(1),indscoef(2),indscoef(3),indscoef(4),indscoef(5),indscoef(6))
1298 do nu=rts(nsum-1)+1,rts(nsum)
1301 + cg*momtenrec(mu)*
cftab(mu,nu)
1312 indscoef(i) = indscoef(i)+1
1317 do a = mu2-binomtable(r,r+3-mu)+1,mu2
1318 momten(cnt)=momtenrec(a)*pmu
1325 indscoef(i) = indscoef(i)-1
1343 subroutine calctensorg(TG,TGuv,TGerr,CoefsG,CoefsGuv,CoefsGerr,MomVec,rmax)
1345 integer,
intent(in) :: rmax
1346 double complex,
intent(in) :: MomVec(0:3,6)
1347 double complex,
intent(in) :: CoefsG(0:rmax/2,0:rmax,0:rmax,0:rmax,0:rmax,0:rmax,0:rmax)
1348 double complex,
intent(in) :: CoefsGuv(0:rmax/2,0:rmax,0:rmax,0:rmax,0:rmax,0:rmax,0:rmax)
1349 double precision,
intent(in) :: CoefsGerr(0:rmax)
1350 double complex,
intent(out) :: TG(0:rmax,0:rmax,0:rmax,0:rmax)
1351 double complex,
intent(out) :: TGuv(0:rmax,0:rmax,0:rmax,0:rmax)
1352 double precision,
intent(out) :: TGerr(0:rmax)
1353 double complex :: TG_aux(RtS(rmax)), TGuv_aux(RtS(rmax))
1356 call calctensorg_list(tg_aux,tguv_aux,tgerr,coefsg,coefsguv,coefsgerr,momvec,rmax)
1382 subroutine calctensortn_list(TN,TNuv,TNerr,CoefsN,CoefsNuv,CoefsNerr,MomVec,N,rmax)
1384 integer,
intent(in) :: N,rmax
1385 double complex,
intent(in) :: MomVec(0:3,N-1)
1386 double complex,
intent(in) :: CoefsN(NCoefs(rmax,N)),CoefsNuv(NCoefs(rmax,N))
1387 double precision,
intent(in) :: CoefsNerr(0:rmax)
1388 double complex :: CoefsN_aux(BinomTable(rmax,max(N+rmax-2,0)),0:rmax/2,0:rmax)
1389 double complex :: CoefsNuv_aux(BinomTable(rmax,max(N+rmax-2,0)),0:rmax/2,0:rmax)
1390 double complex,
intent(out) :: TN(RtS(rmax)), TNuv(RtS(rmax))
1391 double precision,
intent(out) :: TNerr(0:rmax)
1392 double precision :: MomMax
1393 double complex :: MomTen(5), CN, Pmu
1394 integer :: IndsCoef(5),mu1,mu2,nsum,mu,nu,ind,a,cnt,r0,n0,i,r
1399 do i=1,binomtable(r-2*n0,max(n+r-2*n0-2,0))
1402 coefsn_aux(i,n0,r) = coefsn(cnt)
1403 coefsnuv_aux(i,n0,r) = coefsnuv(cnt)
1411 tn(1) = coefsn_aux(1,0,0)
1413 tnerr(0) = coefsnerr(0)
1416 cn = coefsn_aux(1,nsum,2*nsum)
1418 do nu=rts(nsum-1)+1,rts(nsum)
1429 do nsum=max(n-2,1),rmax/2
1430 cn = coefsnuv_aux(1,nsum,2*nsum)
1432 do nu=rts(nsum-1)+1,rts(nsum)
1443 momten(2:5) = momvec(0:3,ind)
1447 mommax = maxval(abs(momvec))
1449 tnerr(r0) = coefsnerr(r0)*mommax**r0
1464 integer,
intent(in) :: r,ind
1465 double complex,
intent(in) :: momtenrec(rts(r))
1466 double complex :: cn, pmu
1467 double complex,
allocatable :: momtenit(:)
1468 integer :: mu1,mu2,nsum,mu,nu,i,a,cnt,nind
1469 double precision :: cnmax
1471 cn = coefsn_aux(ind,0,r)
1476 tn(mu1:mu2) = tn(mu1:mu2) + cn*momtenrec(mu1:mu2)
1478 do nsum=1,(rmax-r)/2
1479 cn = coefsn_aux(ind,nsum,r+2*nsum)
1481 do nu=rts(nsum-1)+1,rts(nsum)
1492 cn = coefsnuv_aux(ind,0,r)
1493 tnuv(mu1:mu2) = tnuv(mu1:mu2) + cn*momtenrec(mu1:mu2)
1497 do nsum=max(n-2,1),(rmax-r)/2
1498 cn = coefsnuv_aux(ind,nsum,r+2*nsum)
1500 do nu=rts(nsum-1)+1,rts(nsum)
1503 + cn*momtenrec(mu)*
cftab(mu,nu)
1513 allocate(momtenit(rts(r+1)))
1520 do a = mu2-binomtable(r,r+3-mu)+1,mu2
1521 momtenit(cnt)=momtenrec(a)*pmu
1545 subroutine calctensortn(TN,TNuv,TNerr,CoefsN,CoefsNuv,CoefsNerr,MomVec,N,rmax)
1547 integer,
intent(in) :: N,rmax
1548 double complex,
intent(in) :: MomVec(0:3,N-1)
1549 double complex,
intent(in) :: CoefsN(NCoefs(rmax,N))
1550 double complex,
Intent(in) :: CoefsNuv(NCoefs(rmax,N))
1551 double precision,
intent(in) :: CoefsNerr(0:rmax)
1552 double complex,
intent(out) :: TN(0:rmax,0:rmax,0:rmax,0:rmax)
1553 double complex,
intent(out) :: TNuv(0:rmax,0:rmax,0:rmax,0:rmax)
1554 double precision,
intent(out) :: TNerr(0:rmax)
1555 double complex :: TN_aux(RtS(rmax)), TNuv_aux(RtS(rmax))
1556 double complex :: MomTen(5), CN, Pmu
1557 integer :: IndsCoef(5),mu1,mu2,nsum,mu,nu,ind,a,cnt
1559 call calctensortn_list(tn_aux,tnuv_aux,tnerr,coefsn,coefsnuv,coefsnerr,momvec,n,rmax)
1587 integer,
intent(in) :: N,rmax
1588 double complex,
intent(in) :: MomVec(0:3,N-1)
1589 double complex,
intent(in) :: CoefsNuv(BinomTable(rmax-2*N+4,max(rmax-N+2,0)),N-2:rmax/2,2*N-4:rmax)
1590 double complex,
intent(out) :: TNuv(RtS(rmax))
1591 double complex :: MomTen(5), CN, Pmu
1592 integer :: IndsCoef(5),mu1,mu2,nsum,mu,nu,ind,a,cnt,r,n0,i
1596 tnuv(rts(2*n-5)+1) = coefsnuv(1,n-2,2*n-4)
1598 do nsum=max(n-2,1),rmax/2
1599 cn = coefsnuv(1,nsum,2*nsum)
1601 do nu=rts(nsum-1)+1,rts(nsum)
1607 if (rmax.gt.2*n-4)
then
1610 momten(2:5) = momvec(0:3,ind)
1627 integer,
intent(in) :: r,ind
1628 double complex,
intent(in) :: momtenrec(rts(r))
1629 double complex :: momten(rts(r+1)), cn, pmu
1630 integer :: mu1,mu2,nsum,mu,nu,i,a,cnt,nind
1631 double precision :: cnmax
1637 cn = coefsnuv(ind,0,r)
1638 tnuv(mu1:mu2) = tnuv(mu1:mu2) + cn*momtenrec(mu1:mu2)
1641 do nsum=max(n-2,1),(rmax-r)/2
1642 cn = coefsnuv(ind,nsum,r+2*nsum)
1644 do nu=rts(nsum-1)+1,rts(nsum)
1647 + cn*momtenrec(mu)*
cftab(mu,nu)
1654 if (r.lt.rmax-2*n+4)
then
1662 do a = mu2-binomtable(r,r+3-mu)+1,mu2
1663 momten(cnt)=momtenrec(a)*pmu