flexiblesusy is hosted by Hepforge, IPPP Durham
FlexibleSUSY
libcollier_wrapper.cpp
Go to the documentation of this file.
1! ====================================================================
2! This file is part of FlexibleSUSY.
3!
4! FlexibleSUSY is free software: you can redistribute it and/or modify
5! it under the terms of the GNU General Public License as published
6! by the Free Software Foundation, either version 3 of the License,
7! or (at your option) any later version.
8!
9! FlexibleSUSY is distributed in the hope that it will be useful, but
10! WITHOUT ANY WARRANTY; without even the implied warranty of
11! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12! General Public License for more details.
13!
14! You should have received a copy of the GNU General Public License
15! along with FlexibleSUSY. If not, see
16! <http://www.gnu.org/licenses/>.
17! ====================================================================
18
19#define DUMMY(a) a ## _dummy
20#define STR(a) #a
21#define IMPL(a) STR(a ## _impl)
22
23#define two_point(NAME,N1,N2) \
24@subroutine DUMMY(NAME)(res, p10, m02, m12) bind(C, name=IMPL(NAME))\
25@ complex(C_DOUBLE_COMPLEX), intent(in) :: p10 \
26@ complex(C_DOUBLE_COMPLEX), intent(in) :: m02, m12 \
27@ complex(C_DOUBLE_COMPLEX), intent(out) :: res \
28@ complex(REAL64), allocatable :: Bcoeff(:,:), Bcoeffuv(:,:) \
29@\
30@ allocate(Bcoeff(0:1, 0:2)) \
31@ allocate(Bcoeffuv(0:1, 0:2)) \
32@ call B_cll(Bcoeff, Bcoeffuv, p10, m02, m12, 2) \
33@\
34@ res = Bcoeff(N1,N2) \
35@\
36@ deallocate(Bcoeff, Bcoeffuv) \
37@end
38
39#define three_point(NAME,N1,N2,N3) \
40@subroutine DUMMY(NAME)(res, p10, p21, p20, m02, m12, m22) bind(C, name=IMPL(NAME)) \
41@ complex(C_DOUBLE_COMPLEX), intent(in) :: p10, p21, p20 \
42@ complex(C_DOUBLE_COMPLEX), intent(in) :: m02, m12, m22 \
43@ complex(C_DOUBLE_COMPLEX), intent(out) :: res \
44@ complex(REAL64), allocatable :: Ccoeff(:,:,:), Ccoeffuv(:,:,:) \
45@\
46@ allocate(Ccoeff(0:1, 0:2, 0:2)) \
47@ allocate(Ccoeffuv(0:1, 0:2, 0:2)) \
48@ call C_cll(Ccoeff, Ccoeffuv, p10, p21, p20, m02, m12, m22, 2) \
49@\
50@ res = Ccoeff(N1,N2,N3) \
51@\
52@ deallocate(Ccoeff, Ccoeffuv) \
53@end
54
55#define four_point(NAME,N1,N2,N3,N4) \
56@subroutine DUMMY(NAME)(res,p10,p21,p32,p30,p20,p31,m02,m12,m22,m32) bind(C, name=IMPL(NAME)) \
57@ complex(C_DOUBLE_COMPLEX), intent(in) :: p10, p21, p32, p30, p20, p31 \
58@ complex(C_DOUBLE_COMPLEX), intent(in) :: m02, m12, m22, m32 \
59@ complex(C_DOUBLE_COMPLEX), intent(out) :: res \
60@ complex(REAL64), allocatable :: Dcoeff(:,:,:,:), Dcoeffuv(:,:,:,:) \
61@\
62@ allocate(Dcoeff(0:1, 0:2, 0:2, 0:2)) \
63@ allocate(Dcoeffuv(0:1, 0:2, 0:2, 0:2)) \
64@ call D_cll(Dcoeff,Dcoeffuv,p10,p21,p32,p30,p20,p31,m02,m12,m22,m32,2) \
65@\
66@ res = Dcoeff(N1,N2,N3,N4) \
67@\
68@ deallocate(Dcoeff, Dcoeffuv) \
69@end
70
71module LibCollier_wrapper
72 use COLLIER
73 use, intrinsic :: iso_c_binding
74 use, intrinsic :: iso_fortran_env
75 implicit none
76
77contains
78 subroutine initialize_collier_dummy() bind(C, name='initialize_collier_impl')
79 call Init_cll(4,2,"")
80 call SetDeltaIR_cll(0d0, 0d0)
81 end
82
83 subroutine set_mu2_uv_dummy(scl2) bind(C, name='set_mu2_uv_impl')
84 real(C_DOUBLE), intent(in) :: scl2
85
86 call SetMuUV2_cll(scl2)
87 call SetMuIR2_cll(scl2)
88 end
89
90 subroutine A0_dummy(res, m02) bind(C, name='A0_impl')
91 complex(C_DOUBLE_COMPLEX), intent(in) :: m02
92 complex(C_DOUBLE_COMPLEX), intent(out) :: res
93
94 call A0_cll(res, m02)
95 end
96
97 subroutine B0_dummy(res, p10, m02, m12) bind(C, name='B0_impl')
98 complex(C_DOUBLE_COMPLEX), intent(in) :: p10
99 complex(C_DOUBLE_COMPLEX), intent(in) :: m02, m12
100 complex(C_DOUBLE_COMPLEX), intent(out) :: res
101
102 call B0_cll(res, p10, m02, m12)
103 end
104
105 two_point(B1,0,1)
106 two_point(B00,1,0)
107
108 three_point(C0,0,0,0)
109 three_point(C00,1,0,0)
110 three_point(C1,0,1,0)
111 three_point(C11,0,2,0)
112 three_point(C12,0,1,1)
113 three_point(C2,0,0,1)
114 three_point(C22,0,0,2)
115
116 four_point(D0,0,0,0,0)
117 four_point(D00,1,0,0,0)
118 four_point(D1,0,1,0,0)
119 four_point(D11,0,2,0,0)
120 four_point(D12,0,1,1,0)
121 four_point(D13,0,1,0,1)
122 four_point(D2,0,0,1,0)
123 four_point(D22,0,0,2,0)
124 four_point(D23,0,0,1,1)
125 four_point(D3,0,0,0,1)
126 four_point(D33,0,0,0,2)
127
128 subroutine get_T1_dummy(a,m02) bind(C, name='get_A_impl')
129 complex(C_DOUBLE_COMPLEX), intent(in) :: m02
130 complex(C_DOUBLE_COMPLEX), intent(out), dimension(1) :: a
131 complex(REAL64), allocatable :: Acoeff(:), Acoeffuv(:)
132
133 allocate(Acoeff(0:0))
134 allocate(Acoeffuv(0:0))
135
136 call A_cll(Acoeff,Acoeffuv,m02,0)
137 a(1) = Acoeff(0)
138
139 deallocate(Acoeff,Acoeffuv)
140 end
141
142 subroutine get_T2_dummy(b,p10,m02,m12) bind(C, name='get_B_impl')
143 complex(C_DOUBLE_COMPLEX), intent(in) :: p10
144 complex(C_DOUBLE_COMPLEX), intent(in) :: m02, m12
145 complex(C_DOUBLE_COMPLEX), intent(out), dimension(3) :: b
146 complex(REAL64), allocatable :: Bcoeff(:,:), Bcoeffuv(:,:)
147
148 allocate(Bcoeff(0:1,0:2))
149 allocate(Bcoeffuv(0:1,0:2))
150 call B_cll(Bcoeff, Bcoeffuv, p10, m02, m12, 2)
151 b(1) = Bcoeff(0,0)
152 b(2) = Bcoeff(0,1)
153 b(3) = Bcoeff(1,0)
154
155 deallocate(Bcoeff,Bcoeffuv)
156 end
157
158 subroutine get_T3_dummy(c,p10,p21,p20,m02,m12,m22) bind(C, name='get_C_impl')
159 complex(C_DOUBLE_COMPLEX), intent(in) :: p10, p21, p20
160 complex(C_DOUBLE_COMPLEX), intent(in) :: m02, m12, m22
161 complex(C_DOUBLE_COMPLEX), intent(out), dimension(7) :: c
162 complex(REAL64), allocatable :: Ccoeff(:,:,:), Ccoeffuv(:,:,:)
163
164 allocate(Ccoeff(0:1,0:2,0:2))
165 allocate(Ccoeffuv(0:1,0:2,0:2))
166 call C_cll(Ccoeff, Ccoeffuv, p10, p21, p20, m02, m12, m22, 2)
167 c(1) = Ccoeff(0,0,0)
168 c(2) = Ccoeff(0,1,0)
169 c(3) = Ccoeff(0,0,1)
170 c(4) = Ccoeff(1,0,0)
171 c(5) = Ccoeff(0,2,0)
172 c(6) = Ccoeff(0,1,1)
173 c(7) = Ccoeff(0,0,2)
174
175 deallocate(Ccoeff,Ccoeffuv)
176 end
177
178 subroutine get_T4_dummy(d,p10,p21,p32,p30,p20,p31,m02,m12,m22,m32) bind(C, name='get_D_impl')
179 complex(C_DOUBLE_COMPLEX), intent(in) :: p10, p21, p32, p30, p20, p31
180 complex(C_DOUBLE_COMPLEX), intent(in) :: m02, m12, m22, m32
181 complex(C_DOUBLE_COMPLEX), intent(out), dimension(11) :: d
182 complex(REAL64), allocatable :: TNcoeff(:),TNcoeffuv(:)
183 integer :: i
184 allocate(TNcoeff(11))
185 allocate(TNcoeffuv(11))
186
187 call TN_cll(TNcoeff,TNcoeffuv,[ p10,p21,p32,p30,p20,p31 ],[ m02,m12,m22,m32 ],4,2)
188 do i = 1, 11
189 d(i) = TNcoeff(i)
190 end do
191
192 deallocate(TNcoeff,TNcoeffuv)
193 end
194
195end module
#define Acoeff
Definition: externals.h:7
#define three_point(NAME, N1, N2, N3)
either version of the License
#define four_point(NAME, N1, N2, N3, N4)
#define two_point(NAME, N1, N2)
without even the implied warranty of !MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU !General Public License for more details !You should have received a copy of the GNU General Public License !along with FlexibleSUSY If not
either version of the but !WITHOUT ANY WARRANTY
void initialize_collier_impl()
void get_A_impl(const std::complex< double >[BOOST_PP_SEQ_SIZE((0))], BOOST_PP_REPEAT(BOOST_PP_SUB(BOOST_PP_SEQ_SIZE((m02_in)), 1), COLLIER_TYPE,) const std::complex< double > *)
void get_C_impl(const std::complex< double >[BOOST_PP_SEQ_SIZE((0)(1)(2)(00)(11)(12)(22))], BOOST_PP_REPEAT(BOOST_PP_SUB(BOOST_PP_SEQ_SIZE((p10_in)(p21_in)(p20_in)(m02_in)(m12_in)(m22_in)), 1), COLLIER_TYPE,) const std::complex< double > *)
void set_mu2_uv_impl(double *)
void get_B_impl(const std::complex< double >[BOOST_PP_SEQ_SIZE((0)(1)(00))], BOOST_PP_REPEAT(BOOST_PP_SUB(BOOST_PP_SEQ_SIZE((p10_in)(m02_in)(m12_in)), 1), COLLIER_TYPE,) const std::complex< double > *)
void get_D_impl(const std::complex< double >[BOOST_PP_SEQ_SIZE((0)(1)(2)(3)(00)(11)(12)(13)(22)(23)(33))], BOOST_PP_REPEAT(BOOST_PP_SUB(BOOST_PP_SEQ_SIZE((p10_in)(p21_in)(p32_in)(p30_in)(p20_in)(p31_in)(m02_in)(m12_in)(m22_in)(m32_in)), 1), COLLIER_TYPE,) const std::complex< double > *)
void() C(cc)) coeff_t &arr
void() A(aa)) coeff_t &arr
double C0(double m1, double m2, double m3) noexcept
(arguments are interpreted as unsquared)
double D0(double m1, double m2, double m3, double m4) noexcept
(arguments are interpreted as unsquared)
double * end(GSL_vector &v)
iterator to end of GSL_vector
Definition: gsl_vector.cpp:254
subroutine set_mu2_uv_dummy(scl2)
subroutine initialize_collier_dummy()
double d0(double m1, double m2, double m3, double m4) noexcept
Definition: numerics.cpp:322
If[spec=!=$Failed, Pole[M[hh]]/.(HSSUSY/. spec), 0]
Definition: scan_HSSUSY.m:41