DiFfRG
Loading...
Searching...
No Matches
regulators.hh
Go to the documentation of this file.
1#pragma once
2
3// standard library
4#include <cmath>
5
6// DiFfRG
9
10namespace DiFfRG
11{
24 template <class Dummy = void> struct LitimRegulator {
25 template <typename NT1, typename NT2> static __forceinline__ __device__ __host__ auto RB(const NT1 k2, const NT2 q2)
26 {
27 return (k2 - q2) * (k2 > q2);
28 }
29
30 template <typename NT1, typename NT2>
31 static __forceinline__ __device__ __host__ auto RBdot(const NT1 k2, const NT2 q2)
32 {
33 return 2. * k2 * (k2 > q2);
34 }
35
36 template <typename NT1, typename NT2> static __forceinline__ __device__ __host__ auto RF(const NT1 k2, const NT2 q2)
37 {
38 using std::sqrt;
39 return sqrt(RB(k2, q2) + q2) - sqrt(q2);
40 }
41
42 template <typename NT1, typename NT2>
43 static __forceinline__ __device__ __host__ auto RFdot(const NT1 k2, const NT2 q2)
44 {
45 using std::sqrt;
46 return 0.5 * RBdot(k2, q2) / sqrt(RB(k2, q2) + q2);
47 }
48
49 // Give an explicit compile error if a call to dq2RB is made
50 template <typename NT1, typename NT2> static void dq2RB(const NT1, const NT2) = delete;
51 };
52
54 static constexpr double b = 2.;
55 };
72 template <class OPTS = BosonicRegulatorOpts> struct BosonicRegulator {
73 static constexpr double b = OPTS::b;
74
75 template <typename NT1, typename NT2> static __forceinline__ __device__ __host__ auto RB(const NT1 k2, const NT2 q2)
76 {
77 using std::expm1;
78 return q2 * powr<b - 1>(q2 / k2) / expm1(powr<b>(q2 / k2));
79 }
80
81 template <typename NT1, typename NT2>
82 static __forceinline__ __device__ __host__ auto dq2RB(const NT1 k2, const NT2 q2)
83 {
84 using std::exp;
85 using std::expm1;
86 const auto xb = powr<b>(q2 / k2);
87 const auto mexp = exp(xb);
88 const auto mexpm1 = expm1(xb);
89 return b * mexp * powr<b - 1>(q2 / k2) * (xb - mexpm1) / powr<2>(mexpm1);
90 }
91
92 template <typename NT1, typename NT2>
93 static __forceinline__ __device__ __host__ auto RBdot(const NT1 k2, const NT2 q2)
94 {
95 using std::exp;
96 using std::expm1;
97 const auto xb = powr<b>(q2 / k2);
98 const auto mexp = exp(xb);
99 const auto mexpm1 = expm1(xb);
100 return 2. * k2 * xb * (mexpm1 * (1. - b) + b * mexp * xb) / powr<2>(mexpm1);
101 }
102
103 template <typename NT1, typename NT2> static __forceinline__ __device__ __host__ auto RF(const NT1 k2, const NT2 q2)
104 {
105 using std::sqrt;
106 return sqrt(RB(k2, q2) + q2) - sqrt(q2);
107 }
108
109 template <typename NT1, typename NT2>
110 static __forceinline__ __device__ __host__ auto dq2RF(const NT1 k2, const NT2 q2)
111 {
112 using std::sqrt;
113 const auto q = sqrt(q2);
114 return (-1. + q * (1. + dq2RB(k2, q2)) / (q + RF(k2, q2))) / (2. * q);
115 }
116
117 template <typename NT1, typename NT2>
118 static __forceinline__ __device__ __host__ auto RFdot(const NT1 k2, const NT2 q2)
119 {
120 using std::sqrt;
121 return 0.5 * RBdot(k2, q2) / sqrt(RB(k2, q2) + q2);
122 }
123 };
124
126 static constexpr double b = 2.;
127 };
144 template <class OPTS = ExponentialRegulatorOpts> struct ExponentialRegulator {
145 static constexpr double b = OPTS::b;
146
147 template <typename NT1, typename NT2> static __forceinline__ __device__ __host__ auto RB(const NT1 k2, const NT2 q2)
148 {
149 using std::exp;
150 const auto xb = powr<b>(q2 / k2);
151 return k2 * exp(-xb);
152 }
153
154 template <typename NT1, typename NT2>
155 static __forceinline__ __device__ __host__ auto dq2RB(const NT1 k2, const NT2 q2)
156 {
157 using std::exp;
158 const auto xbm1 = powr<b - 1>(q2 / k2);
159 const auto xb = xbm1 * (q2 / k2);
160 return -b * xbm1 * exp(-xb);
161 }
162
163 template <typename NT1, typename NT2>
164 static __forceinline__ __device__ __host__ auto RBdot(const NT1 k2, const NT2 q2)
165 {
166 using std::exp;
167 const auto xb = powr<b>(q2 / k2);
168 return 2. * exp(-xb) * k2 * (1. + b * xb);
169 }
170
171 template <typename NT1, typename NT2> static __forceinline__ __device__ __host__ auto RF(const NT1 k2, const NT2 q2)
172 {
173 using std::sqrt;
174 return sqrt(RB(k2, q2) + q2) - sqrt(q2);
175 }
176
177 template <typename NT1, typename NT2>
178 static __forceinline__ __device__ __host__ auto dq2RF(const NT1 k2, const NT2 q2)
179 {
180 using std::sqrt;
181 const auto q = sqrt(q2);
182 return (-1. + q * (1. + dq2RB(k2, q2)) / (q + RF(k2, q2))) / (2. * q);
183 }
184
185 template <typename NT1, typename NT2>
186 static __forceinline__ __device__ __host__ auto RFdot(const NT1 k2, const NT2 q2)
187 {
188 using std::sqrt;
189 return 0.5 * RBdot(k2, q2) / sqrt(RB(k2, q2) + q2);
190 }
191 };
192
194 static constexpr double alpha = 2e-3;
195 };
212 template <class OPTS = SmoothedLitimRegulatorOpts> struct SmoothedLitimRegulator {
213 static constexpr double alpha = OPTS::alpha;
214
215 template <typename NT1, typename NT2> static __forceinline__ __device__ __host__ auto RB(const NT1 k2, const NT2 q2)
216 {
217 using std::exp;
218 return (k2 - q2) / (1. + exp((q2 / k2 - 1.) / alpha));
219 }
220
221 template <typename NT1, typename NT2>
222 static __forceinline__ __device__ __host__ auto RBdot(const NT1 k2, const NT2 q2)
223 {
224 using std::exp;
225 const auto x = q2 / k2;
226 const auto mexp = exp((x - 1.) / alpha);
227 return mexp > 1e50 ? 0. : 2. * k2 * (1. + mexp * (x - powr<2>(x) + alpha) / alpha) / powr<2>(1. + mexp);
228 }
229
230 template <typename NT1, typename NT2> static __forceinline__ __device__ __host__ auto RF(const NT1 k2, const NT2 q2)
231 {
232 using std::sqrt;
233 return sqrt(RB(k2, q2) + q2) - sqrt(q2);
234 }
235
236 template <typename NT1, typename NT2>
237 static __forceinline__ __device__ __host__ auto RFdot(const NT1 k2, const NT2 q2)
238 {
239 using std::sqrt;
240 return 0.5 * RBdot(k2, q2) / sqrt(RB(k2, q2) + q2);
241 }
242 };
243
245 static constexpr int order = 8;
246 constexpr static double c = 2;
247 constexpr static double b0 = 0.;
248 };
264 template <class OPTS = RationalExpRegulatorOpts> struct RationalExpRegulator {
265 static constexpr int order = OPTS::order;
266 static_assert(order > 0, "RationalExpRegulator : Regulator order must be positive!");
267 // These are magic numbers. c controls the tail, which is of shape exp(-c q^2/k^2), whereas b0 controls how strong
268 // the litim-like part gets cut off into the tail, see also the ConvexRegulators.nb Mathematica notebook
269 constexpr static double c = OPTS::c;
270 constexpr static double b0 = OPTS::b0;
271
272 static __forceinline__ __device__ __host__ auto get_f(const auto x)
273 {
274 constexpr double b0 = OPTS::b0;
275 if constexpr (order == 1) return x;
276 if constexpr (order == 2)
277 return x * (-2. + c * (2. + x + 2. * b0 * x)) * powr<-1>(-2. + x + 2. * c * (1. + b0 * x));
278 if constexpr (order == 3)
279 return x * (-3. * (2. + x + 2. * b0 * x) + c * (6. + (3. + 6. * b0) * x + (2. + 3. * b0) * powr<2>(x))) *
280 powr<-1>(3. * b0 * (-2. + x) * x + 6. * c * (1. + b0 * x) + 2. * (-3. + powr<2>(x)));
281 if constexpr (order == 4)
282 return 0.08333333333333333 * x *
283 (12. + 6. * x + 4. * (1. + 3. * b0) * powr<2>(x) +
284 3. * (c + 2. * b0 * c) * powr<-1>(-1. + c) * powr<3>(x)) *
285 powr<-1>(1. + b0 * powr<2>(x) + 0.25 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<3>(x));
286 if constexpr (order == 5)
287 return 0.016666666666666666 * x *
288 (60. + 30. * x + 20. * (1. + 3. * b0) * powr<2>(x) + 15. * (1. + 2. * b0) * powr<3>(x) +
289 4. * (3. + 5. * b0) * c * powr<-1>(-1. + c) * powr<4>(x)) *
290 powr<-1>(1. + b0 * powr<2>(x) + 0.06666666666666667 * (3. + 5. * b0) * powr<-1>(-1. + c) * powr<4>(x));
291 if constexpr (order == 6)
292 return 0.016666666666666666 * x *
293 (60. + 30. * x + 20. * powr<2>(x) + 15. * (1. + 4. * b0) * powr<3>(x) +
294 6. * (2. + 5. * b0) * powr<4>(x) + 10. * (c + 2. * b0 * c) * powr<-1>(-1. + c) * powr<5>(x)) *
295 powr<-1>(1. + b0 * powr<3>(x) + 0.16666666666666666 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<5>(x));
296 if constexpr (order == 7)
297 return (x + 0.5 * powr<2>(x) + 0.3333333333333333 * powr<3>(x) + (0.25 + b0) * powr<4>(x) +
298 0.1 * (2. + 5. * b0) * powr<5>(x) + 0.16666666666666666 * (1. + 2. * b0) * powr<6>(x) +
299 0.03571428571428571 * (4. + 7. * b0) * c * powr<-1>(-1. + c) * powr<7>(x)) *
300 powr<-1>(1. + b0 * powr<3>(x) + 0.03571428571428571 * (4. + 7. * b0) * powr<-1>(-1. + c) * powr<6>(x));
301 if constexpr (order == 8)
302 return (x + 0.5 * powr<2>(x) + 0.3333333333333333 * powr<3>(x) + 0.25 * powr<4>(x) + (0.2 + b0) * powr<5>(x) +
303 0.16666666666666666 * (1. + 3. * b0) * powr<6>(x) + 0.047619047619047616 * (3. + 7. * b0) * powr<7>(x) +
304 0.125 * (1. + 2. * b0) * c * powr<-1>(-1. + c) * powr<8>(x)) *
305 powr<-1>(1. + b0 * powr<4>(x) + 0.125 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<7>(x));
306 if constexpr (order == 9)
307 return (x + 0.5 * powr<2>(x) + 0.3333333333333333 * powr<3>(x) + 0.25 * powr<4>(x) + (0.2 + b0) * powr<5>(x) +
308 0.16666666666666666 * (1. + 3. * b0) * powr<6>(x) + 0.047619047619047616 * (3. + 7. * b0) * powr<7>(x) +
309 0.125 * (1. + 2. * b0) * powr<8>(x) +
310 0.022222222222222223 * (5. + 9. * b0) * c * powr<-1>(-1. + c) * powr<9>(x)) *
311 powr<-1>(1. + b0 * powr<4>(x) + 0.022222222222222223 * (5. + 9. * b0) * powr<-1>(-1. + c) * powr<8>(x));
312 if constexpr (order == 10)
313 return (x + 0.5 * powr<2>(x) + 0.3333333333333333 * powr<3>(x) + 0.25 * powr<4>(x) + 0.2 * powr<5>(x) +
314 (0.16666666666666666 + b0) * powr<6>(x) + 0.07142857142857142 * (2. + 7. * b0) * powr<7>(x) +
315 0.041666666666666664 * (3. + 8. * b0) * powr<8>(x) +
316 0.027777777777777776 * (4. + 9. * b0) * powr<9>(x) +
317 0.1 * (1. + 2. * b0) * c * powr<-1>(-1. + c) * powr<10>(x)) *
318 powr<-1>(1. + b0 * powr<5>(x) + 0.1 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<9>(x));
319 if constexpr (order == 11)
320 return (x + 0.5 * powr<2>(x) + 0.3333333333333333 * powr<3>(x) + 0.25 * powr<4>(x) + 0.2 * powr<5>(x) +
321 (0.16666666666666666 + b0) * powr<6>(x) + 0.07142857142857142 * (2. + 7. * b0) * powr<7>(x) +
322 0.041666666666666664 * (3. + 8. * b0) * powr<8>(x) +
323 0.027777777777777776 * (4. + 9. * b0) * powr<9>(x) + 0.1 * (1. + 2. * b0) * powr<10>(x) +
324 0.015151515151515152 * (6. + 11. * b0) * c * powr<-1>(-1. + c) * powr<11>(x)) *
325 powr<-1>(1. + b0 * powr<5>(x) +
326 0.015151515151515152 * (6. + 11. * b0) * powr<-1>(-1. + c) * powr<10>(x));
327 if constexpr (order == 12)
328 return (x + 0.5 * powr<2>(x) + 0.3333333333333333 * powr<3>(x) + 0.25 * powr<4>(x) + 0.2 * powr<5>(x) +
329 0.16666666666666666 * powr<6>(x) + (0.14285714285714285 + b0) * powr<7>(x) +
330 0.125 * (1. + 4. * b0) * powr<8>(x) + 0.1111111111111111 * (1. + 3. * b0) * powr<9>(x) +
331 0.05 * (2. + 5. * b0) * powr<10>(x) + 0.01818181818181818 * (5. + 11. * b0) * powr<11>(x) +
332 0.08333333333333333 * (1. + 2. * b0) * c * powr<-1>(-1. + c) * powr<12>(x)) *
333 powr<-1>(1. + b0 * powr<6>(x) + 0.08333333333333333 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<11>(x));
334 if constexpr (order == 13)
335 return (x + 0.5 * powr<2>(x) + 0.3333333333333333 * powr<3>(x) + 0.25 * powr<4>(x) + 0.2 * powr<5>(x) +
336 0.16666666666666666 * powr<6>(x) + (0.14285714285714285 + b0) * powr<7>(x) +
337 0.125 * (1. + 4. * b0) * powr<8>(x) + 0.1111111111111111 * (1. + 3. * b0) * powr<9>(x) +
338 0.05 * (2. + 5. * b0) * powr<10>(x) + 0.01818181818181818 * (5. + 11. * b0) * powr<11>(x) +
339 0.08333333333333333 * (1. + 2. * b0) * powr<12>(x) +
340 0.01098901098901099 * (7. + 13. * b0) * c * powr<-1>(-1. + c) * powr<13>(x)) *
341 powr<-1>(1. + b0 * powr<6>(x) + 0.01098901098901099 * (7. + 13. * b0) * powr<-1>(-1. + c) * powr<12>(x));
342 if constexpr (order == 14)
343 return (x + 0.5 * powr<2>(x) + 0.3333333333333333 * powr<3>(x) + 0.25 * powr<4>(x) + 0.2 * powr<5>(x) +
344 0.16666666666666666 * powr<6>(x) + 0.14285714285714285 * powr<7>(x) + (0.125 + b0) * powr<8>(x) +
345 0.05555555555555555 * (2. + 9. * b0) * powr<9>(x) +
346 0.03333333333333333 * (3. + 10. * b0) * powr<10>(x) +
347 0.022727272727272728 * (4. + 11. * b0) * powr<11>(x) +
348 0.016666666666666666 * (5. + 12. * b0) * powr<12>(x) +
349 0.01282051282051282 * (6. + 13. * b0) * powr<13>(x) +
350 0.07142857142857142 * (1. + 2. * b0) * c * powr<-1>(-1. + c) * powr<14>(x)) *
351 powr<-1>(1. + b0 * powr<7>(x) + 0.07142857142857142 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<13>(x));
352 if constexpr (order == 15)
353 return (x + 0.5 * powr<2>(x) + 0.3333333333333333 * powr<3>(x) + 0.25 * powr<4>(x) + 0.2 * powr<5>(x) +
354 0.16666666666666666 * powr<6>(x) + 0.14285714285714285 * powr<7>(x) + (0.125 + b0) * powr<8>(x) +
355 0.05555555555555555 * (2. + 9. * b0) * powr<9>(x) +
356 0.03333333333333333 * (3. + 10. * b0) * powr<10>(x) +
357 0.022727272727272728 * (4. + 11. * b0) * powr<11>(x) +
358 0.016666666666666666 * (5. + 12. * b0) * powr<12>(x) +
359 0.01282051282051282 * (6. + 13. * b0) * powr<13>(x) +
360 0.07142857142857142 * (1. + 2. * b0) * powr<14>(x) +
361 0.008333333333333333 * (8. + 15. * b0) * c * powr<-1>(-1. + c) * powr<15>(x)) *
362 powr<-1>(1. + b0 * powr<7>(x) +
363 0.008333333333333333 * (8. + 15. * b0) * powr<-1>(-1. + c) * powr<14>(x));
364 if constexpr (order == 16)
365 return (x + 0.5 * powr<2>(x) + 0.3333333333333333 * powr<3>(x) + 0.25 * powr<4>(x) + 0.2 * powr<5>(x) +
366 0.16666666666666666 * powr<6>(x) + 0.14285714285714285 * powr<7>(x) + 0.125 * powr<8>(x) +
367 (0.1111111111111111 + b0) * powr<9>(x) + 0.1 * (1. + 5. * b0) * powr<10>(x) +
368 0.030303030303030304 * (3. + 11. * b0) * powr<11>(x) +
369 0.08333333333333333 * (1. + 3. * b0) * powr<12>(x) +
370 0.015384615384615385 * (5. + 13. * b0) * powr<13>(x) +
371 0.023809523809523808 * (3. + 7. * b0) * powr<14>(x) +
372 (0.06666666666666667 + 0.14285714285714285 * b0) * powr<15>(x) +
373 0.0625 * (1. + 2. * b0) * c * powr<-1>(-1. + c) * powr<16>(x)) *
374 powr<-1>(1. + b0 * powr<8>(x) + 0.0625 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<15>(x));
375 static_assert(order <= 16, "Rational regulator of order > 16 not implemented");
376 }
377 static __forceinline__ __device__ __host__ auto get_df(const auto x)
378 {
379 constexpr double b0 = OPTS::b0;
380 if constexpr (order == 1) return 1.;
381 if constexpr (order == 2)
382 return (4. + c * (-8. - 4. * (1. + 2. * b0) * x + (1. + 2. * b0) * powr<2>(x)) +
383 2. * powr<2>(c) * (2. + (2. + 4. * b0) * x + b0 * (1. + 2. * b0) * powr<2>(x))) *
384 powr<-2>(-2. + x + 2. * c * (1. + b0 * x));
385 if constexpr (order == 3)
386 return (1. + x + 2. * b0 * x +
387 0.3333333333333333 * (-1. + 3. * c + b0 * (-3. + 6. * c) + 3. * (-1. + c) * powr<2>(b0)) *
388 powr<-1>(-1. + c) * powr<2>(x) +
389 0.3333333333333333 * b0 * (2. + 3. * b0) * c * powr<-1>(-1. + c) * powr<3>(x) +
390 0.027777777777777776 * c * powr<2>(2. + 3. * b0) * powr<-2>(-1. + c) * powr<4>(x)) *
391 powr<-2>(1. + b0 * x + 0.16666666666666666 * (2. + 3. * b0) * powr<-1>(-1. + c) * powr<2>(x));
392 if constexpr (order == 4)
393 return (1. + x + (1. + 2. * b0) * powr<2>(x) +
394 0.5 * (1. + 2. * b0) * (-1. + 2. * c) * powr<-1>(-1. + c) * powr<3>(x) +
395 0.041666666666666664 * (-3. + 2. * b0 * (-7. + 4. * c) + 24. * (-1. + c) * powr<2>(b0)) *
396 powr<-1>(-1. + c) * powr<4>(x) +
397 0.5 * b0 * (1. + 2. * b0) * c * powr<-1>(-1. + c) * powr<5>(x) +
398 0.0625 * c * powr<2>(1. + 2. * b0) * powr<-2>(-1. + c) * powr<6>(x)) *
399 powr<-2>(1. + b0 * powr<2>(x) + 0.25 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<3>(x));
400 if constexpr (order == 5)
401 return ((1. + b0 * powr<2>(x) + 0.06666666666666667 * (3. + 5. * b0) * powr<-1>(-1. + c) * powr<4>(x)) *
402 (1. + x + (1. + 3. * b0) * powr<2>(x) + (1. + 2. * b0) * powr<3>(x) +
403 0.3333333333333333 * (3. + 5. * b0) * c * powr<-1>(-1. + c) * powr<4>(x)) -
404 0.016666666666666666 * x *
405 (2. * b0 * x + 0.26666666666666666 * (3. + 5. * b0) * powr<-1>(-1. + c) * powr<3>(x)) *
406 (60. + 30. * x + 20. * (1. + 3. * b0) * powr<2>(x) + 15. * (1. + 2. * b0) * powr<3>(x) +
407 4. * (3. + 5. * b0) * c * powr<-1>(-1. + c) * powr<4>(x))) *
408 powr<-2>(1. + b0 * powr<2>(x) + 0.06666666666666667 * (3. + 5. * b0) * powr<-1>(-1. + c) * powr<4>(x));
409 if constexpr (order == 6)
410 return ((1. + b0 * powr<3>(x) + 0.16666666666666666 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<5>(x)) *
411 (1. + x + powr<2>(x) + (1. + 4. * b0) * powr<3>(x) + (1. + 2.5 * b0) * powr<4>(x) +
412 (c + 2. * b0 * c) * powr<-1>(-1. + c) * powr<5>(x)) -
413 0.016666666666666666 * x *
414 (3. * b0 * powr<2>(x) + 0.8333333333333334 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<4>(x)) *
415 (60. + 30. * x + 20. * powr<2>(x) + 15. * (1. + 4. * b0) * powr<3>(x) +
416 6. * (2. + 5. * b0) * powr<4>(x) + 10. * (c + 2. * b0 * c) * powr<-1>(-1. + c) * powr<5>(x))) *
417 powr<-2>(1. + b0 * powr<3>(x) + 0.16666666666666666 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<5>(x));
418 if constexpr (order == 7)
419 return ((1. + b0 * powr<3>(x) + 0.03571428571428571 * (4. + 7. * b0) * powr<-1>(-1. + c) * powr<6>(x)) *
420 (1. + x + powr<2>(x) + (1. + 4. * b0) * powr<3>(x) + (1. + 2.5 * b0) * powr<4>(x) +
421 (1. + 2. * b0) * powr<5>(x) + 0.25 * (4. + 7. * b0) * c * powr<-1>(-1. + c) * powr<6>(x)) -
422 1. * (3. * b0 * powr<2>(x) + 0.21428571428571427 * (4. + 7. * b0) * powr<-1>(-1. + c) * powr<5>(x)) *
423 (x + 0.5 * powr<2>(x) + 0.3333333333333333 * powr<3>(x) + (0.25 + b0) * powr<4>(x) +
424 0.1 * (2. + 5. * b0) * powr<5>(x) + 0.16666666666666666 * (1. + 2. * b0) * powr<6>(x) +
425 0.03571428571428571 * (4. + 7. * b0) * c * powr<-1>(-1. + c) * powr<7>(x))) *
426 powr<-2>(1. + b0 * powr<3>(x) + 0.03571428571428571 * (4. + 7. * b0) * powr<-1>(-1. + c) * powr<6>(x));
427 if constexpr (order == 8)
428 return ((1. + b0 * powr<4>(x) + 0.125 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<7>(x)) *
429 (1. + x + powr<2>(x) + powr<3>(x) + (1. + 5. * b0) * powr<4>(x) + (1. + 3. * b0) * powr<5>(x) +
430 (1. + 2.3333333333333335 * b0) * powr<6>(x) + (c + 2. * b0 * c) * powr<-1>(-1. + c) * powr<7>(x)) -
431 1. * (4. * b0 * powr<3>(x) + 0.875 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<6>(x)) *
432 (x + 0.5 * powr<2>(x) + 0.3333333333333333 * powr<3>(x) + 0.25 * powr<4>(x) +
433 (0.2 + b0) * powr<5>(x) + 0.16666666666666666 * (1. + 3. * b0) * powr<6>(x) +
434 0.047619047619047616 * (3. + 7. * b0) * powr<7>(x) +
435 0.125 * (1. + 2. * b0) * c * powr<-1>(-1. + c) * powr<8>(x))) *
436 powr<-2>(1. + b0 * powr<4>(x) + 0.125 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<7>(x));
437 if constexpr (order == 9)
438 return ((1. + b0 * powr<4>(x) + 0.022222222222222223 * (5. + 9. * b0) * powr<-1>(-1. + c) * powr<8>(x)) *
439 (1. + x + powr<2>(x) + powr<3>(x) + (1. + 5. * b0) * powr<4>(x) + (1. + 3. * b0) * powr<5>(x) +
440 (1. + 2.3333333333333335 * b0) * powr<6>(x) + (1. + 2. * b0) * powr<7>(x) +
441 0.2 * (5. + 9. * b0) * c * powr<-1>(-1. + c) * powr<8>(x)) -
442 1. * (4. * b0 * powr<3>(x) + 0.17777777777777778 * (5. + 9. * b0) * powr<-1>(-1. + c) * powr<7>(x)) *
443 (x + 0.5 * powr<2>(x) + 0.3333333333333333 * powr<3>(x) + 0.25 * powr<4>(x) +
444 (0.2 + b0) * powr<5>(x) + 0.16666666666666666 * (1. + 3. * b0) * powr<6>(x) +
445 0.047619047619047616 * (3. + 7. * b0) * powr<7>(x) + 0.125 * (1. + 2. * b0) * powr<8>(x) +
446 0.022222222222222223 * (5. + 9. * b0) * c * powr<-1>(-1. + c) * powr<9>(x))) *
447 powr<-2>(1. + b0 * powr<4>(x) + 0.022222222222222223 * (5. + 9. * b0) * powr<-1>(-1. + c) * powr<8>(x));
448 if constexpr (order == 10)
449 return ((1. + b0 * powr<5>(x) + 0.1 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<9>(x)) *
450 (1. + x + powr<2>(x) + powr<3>(x) + powr<4>(x) + (1. + 6. * b0) * powr<5>(x) +
451 (1. + 3.5 * b0) * powr<6>(x) + (1. + 2.6666666666666665 * b0) * powr<7>(x) +
452 (1. + 2.25 * b0) * powr<8>(x) + (c + 2. * b0 * c) * powr<-1>(-1. + c) * powr<9>(x)) -
453 1. * (5. * b0 * powr<4>(x) + 0.9 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<8>(x)) *
454 (x + 0.5 * powr<2>(x) + 0.3333333333333333 * powr<3>(x) + 0.25 * powr<4>(x) + 0.2 * powr<5>(x) +
455 (0.16666666666666666 + b0) * powr<6>(x) + 0.07142857142857142 * (2. + 7. * b0) * powr<7>(x) +
456 0.041666666666666664 * (3. + 8. * b0) * powr<8>(x) +
457 0.027777777777777776 * (4. + 9. * b0) * powr<9>(x) +
458 0.1 * (1. + 2. * b0) * c * powr<-1>(-1. + c) * powr<10>(x))) *
459 powr<-2>(1. + b0 * powr<5>(x) + 0.1 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<9>(x));
460 if constexpr (order == 11)
461 return ((1. + b0 * powr<5>(x) + 0.015151515151515152 * (6. + 11. * b0) * powr<-1>(-1. + c) * powr<10>(x)) *
462 (1. + x + powr<2>(x) + powr<3>(x) + powr<4>(x) + (1. + 6. * b0) * powr<5>(x) +
463 (1. + 3.5 * b0) * powr<6>(x) + (1. + 2.6666666666666665 * b0) * powr<7>(x) +
464 (1. + 2.25 * b0) * powr<8>(x) + (1. + 2. * b0) * powr<9>(x) +
465 0.16666666666666666 * (6. + 11. * b0) * c * powr<-1>(-1. + c) * powr<10>(x)) -
466 1. * (5. * b0 * powr<4>(x) + 0.15151515151515152 * (6. + 11. * b0) * powr<-1>(-1. + c) * powr<9>(x)) *
467 (x + 0.5 * powr<2>(x) + 0.3333333333333333 * powr<3>(x) + 0.25 * powr<4>(x) + 0.2 * powr<5>(x) +
468 (0.16666666666666666 + b0) * powr<6>(x) + 0.07142857142857142 * (2. + 7. * b0) * powr<7>(x) +
469 0.041666666666666664 * (3. + 8. * b0) * powr<8>(x) +
470 0.027777777777777776 * (4. + 9. * b0) * powr<9>(x) + 0.1 * (1. + 2. * b0) * powr<10>(x) +
471 0.015151515151515152 * (6. + 11. * b0) * c * powr<-1>(-1. + c) * powr<11>(x))) *
472 powr<-2>(1. + b0 * powr<5>(x) +
473 0.015151515151515152 * (6. + 11. * b0) * powr<-1>(-1. + c) * powr<10>(x));
474 if constexpr (order == 12)
475 return ((1. + b0 * powr<6>(x) + 0.08333333333333333 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<11>(x)) *
476 (1. + x + powr<2>(x) + powr<3>(x) + powr<4>(x) + powr<5>(x) + (1. + 7. * b0) * powr<6>(x) +
477 (1. + 4. * b0) * powr<7>(x) + (1. + 3. * b0) * powr<8>(x) + (1. + 2.5 * b0) * powr<9>(x) +
478 (1. + 2.2 * b0) * powr<10>(x) + (c + 2. * b0 * c) * powr<-1>(-1. + c) * powr<11>(x)) -
479 1. * (6. * b0 * powr<5>(x) + 0.9166666666666666 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<10>(x)) *
480 (x + 0.5 * powr<2>(x) + 0.3333333333333333 * powr<3>(x) + 0.25 * powr<4>(x) + 0.2 * powr<5>(x) +
481 0.16666666666666666 * powr<6>(x) + (0.14285714285714285 + b0) * powr<7>(x) +
482 0.125 * (1. + 4. * b0) * powr<8>(x) + 0.1111111111111111 * (1. + 3. * b0) * powr<9>(x) +
483 0.05 * (2. + 5. * b0) * powr<10>(x) + 0.01818181818181818 * (5. + 11. * b0) * powr<11>(x) +
484 0.08333333333333333 * (1. + 2. * b0) * c * powr<-1>(-1. + c) * powr<12>(x))) *
485 powr<-2>(1. + b0 * powr<6>(x) + 0.08333333333333333 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<11>(x));
486 if constexpr (order == 13)
487 return ((1. + b0 * powr<6>(x) + 0.01098901098901099 * (7. + 13. * b0) * powr<-1>(-1. + c) * powr<12>(x)) *
488 (1. + x + powr<2>(x) + powr<3>(x) + powr<4>(x) + powr<5>(x) + (1. + 7. * b0) * powr<6>(x) +
489 (1. + 4. * b0) * powr<7>(x) + (1. + 3. * b0) * powr<8>(x) + (1. + 2.5 * b0) * powr<9>(x) +
490 (1. + 2.2 * b0) * powr<10>(x) + (1. + 2. * b0) * powr<11>(x) +
491 0.14285714285714285 * (7. + 13. * b0) * c * powr<-1>(-1. + c) * powr<12>(x)) -
492 1. * (6. * b0 * powr<5>(x) + 0.13186813186813187 * (7. + 13. * b0) * powr<-1>(-1. + c) * powr<11>(x)) *
493 (x + 0.5 * powr<2>(x) + 0.3333333333333333 * powr<3>(x) + 0.25 * powr<4>(x) + 0.2 * powr<5>(x) +
494 0.16666666666666666 * powr<6>(x) + (0.14285714285714285 + b0) * powr<7>(x) +
495 0.125 * (1. + 4. * b0) * powr<8>(x) + 0.1111111111111111 * (1. + 3. * b0) * powr<9>(x) +
496 0.05 * (2. + 5. * b0) * powr<10>(x) + 0.01818181818181818 * (5. + 11. * b0) * powr<11>(x) +
497 0.08333333333333333 * (1. + 2. * b0) * powr<12>(x) +
498 0.01098901098901099 * (7. + 13. * b0) * c * powr<-1>(-1. + c) * powr<13>(x))) *
499 powr<-2>(1. + b0 * powr<6>(x) + 0.01098901098901099 * (7. + 13. * b0) * powr<-1>(-1. + c) * powr<12>(x));
500 if constexpr (order == 14)
501 return ((1. + b0 * powr<7>(x) + 0.07142857142857142 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<13>(x)) *
502 (1. + x + powr<2>(x) + powr<3>(x) + powr<4>(x) + powr<5>(x) + powr<6>(x) +
503 (1. + 8. * b0) * powr<7>(x) + (1. + 4.5 * b0) * powr<8>(x) +
504 (1. + 3.3333333333333335 * b0) * powr<9>(x) + (1. + 2.75 * b0) * powr<10>(x) +
505 (1. + 2.4 * b0) * powr<11>(x) + (1. + 2.1666666666666665 * b0) * powr<12>(x) +
506 (c + 2. * b0 * c) * powr<-1>(-1. + c) * powr<13>(x)) -
507 1. * (7. * b0 * powr<6>(x) + 0.9285714285714286 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<12>(x)) *
508 (x + 0.5 * powr<2>(x) + 0.3333333333333333 * powr<3>(x) + 0.25 * powr<4>(x) + 0.2 * powr<5>(x) +
509 0.16666666666666666 * powr<6>(x) + 0.14285714285714285 * powr<7>(x) + (0.125 + b0) * powr<8>(x) +
510 0.05555555555555555 * (2. + 9. * b0) * powr<9>(x) +
511 0.03333333333333333 * (3. + 10. * b0) * powr<10>(x) +
512 0.022727272727272728 * (4. + 11. * b0) * powr<11>(x) +
513 0.016666666666666666 * (5. + 12. * b0) * powr<12>(x) +
514 0.01282051282051282 * (6. + 13. * b0) * powr<13>(x) +
515 0.07142857142857142 * (1. + 2. * b0) * c * powr<-1>(-1. + c) * powr<14>(x))) *
516 powr<-2>(1. + b0 * powr<7>(x) + 0.07142857142857142 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<13>(x));
517 if constexpr (order == 15)
518 return ((1. + b0 * powr<7>(x) + 0.008333333333333333 * (8. + 15. * b0) * powr<-1>(-1. + c) * powr<14>(x)) *
519 (1. + x + powr<2>(x) + powr<3>(x) + powr<4>(x) + powr<5>(x) + powr<6>(x) +
520 (1. + 8. * b0) * powr<7>(x) + (1. + 4.5 * b0) * powr<8>(x) +
521 (1. + 3.3333333333333335 * b0) * powr<9>(x) + (1. + 2.75 * b0) * powr<10>(x) +
522 (1. + 2.4 * b0) * powr<11>(x) + (1. + 2.1666666666666665 * b0) * powr<12>(x) +
523 (1. + 2. * b0) * powr<13>(x) + 0.125 * (8. + 15. * b0) * c * powr<-1>(-1. + c) * powr<14>(x)) -
524 1. * (7. * b0 * powr<6>(x) + 0.11666666666666667 * (8. + 15. * b0) * powr<-1>(-1. + c) * powr<13>(x)) *
525 (x + 0.5 * powr<2>(x) + 0.3333333333333333 * powr<3>(x) + 0.25 * powr<4>(x) + 0.2 * powr<5>(x) +
526 0.16666666666666666 * powr<6>(x) + 0.14285714285714285 * powr<7>(x) + (0.125 + b0) * powr<8>(x) +
527 0.05555555555555555 * (2. + 9. * b0) * powr<9>(x) +
528 0.03333333333333333 * (3. + 10. * b0) * powr<10>(x) +
529 0.022727272727272728 * (4. + 11. * b0) * powr<11>(x) +
530 0.016666666666666666 * (5. + 12. * b0) * powr<12>(x) +
531 0.01282051282051282 * (6. + 13. * b0) * powr<13>(x) +
532 0.07142857142857142 * (1. + 2. * b0) * powr<14>(x) +
533 0.008333333333333333 * (8. + 15. * b0) * c * powr<-1>(-1. + c) * powr<15>(x))) *
534 powr<-2>(1. + b0 * powr<7>(x) +
535 0.008333333333333333 * (8. + 15. * b0) * powr<-1>(-1. + c) * powr<14>(x));
536 if constexpr (order == 16)
537 return ((1. + b0 * powr<8>(x) + 0.0625 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<15>(x)) *
538 (1. + x + powr<2>(x) + powr<3>(x) + powr<4>(x) + powr<5>(x) + powr<6>(x) + powr<7>(x) +
539 (1. + 9. * b0) * powr<8>(x) + (1. + 5. * b0) * powr<9>(x) +
540 (1. + 3.6666666666666665 * b0) * powr<10>(x) + (1. + 3. * b0) * powr<11>(x) +
541 (1. + 2.6 * b0) * powr<12>(x) + (1. + 2.3333333333333335 * b0) * powr<13>(x) +
542 (1. + 2.142857142857143 * b0) * powr<14>(x) +
543 (c + 2. * b0 * c) * powr<-1>(-1. + c) * powr<15>(x)) -
544 1. * (8. * b0 * powr<7>(x) + 0.9375 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<14>(x)) *
545 (x + 0.5 * powr<2>(x) + 0.3333333333333333 * powr<3>(x) + 0.25 * powr<4>(x) + 0.2 * powr<5>(x) +
546 0.16666666666666666 * powr<6>(x) + 0.14285714285714285 * powr<7>(x) + 0.125 * powr<8>(x) +
547 (0.1111111111111111 + b0) * powr<9>(x) + 0.1 * (1. + 5. * b0) * powr<10>(x) +
548 0.030303030303030304 * (3. + 11. * b0) * powr<11>(x) +
549 0.08333333333333333 * (1. + 3. * b0) * powr<12>(x) +
550 0.015384615384615385 * (5. + 13. * b0) * powr<13>(x) +
551 0.023809523809523808 * (3. + 7. * b0) * powr<14>(x) +
552 (0.06666666666666667 + 0.14285714285714285 * b0) * powr<15>(x) +
553 0.0625 * (1. + 2. * b0) * c * powr<-1>(-1. + c) * powr<16>(x))) *
554 powr<-2>(1. + b0 * powr<8>(x) + 0.0625 * (1. + 2. * b0) * powr<-1>(-1. + c) * powr<15>(x));
555 static_assert(order <= 16, "Rational regulator of order > 16 not implemented");
556 }
557
558 template <typename NT1, typename NT2> static __forceinline__ __device__ __host__ auto RB(const NT1 k2, const NT2 q2)
559 {
560 using std::exp;
561 const auto x = q2 / k2;
562 const auto f = get_f(x);
563 return k2 * exp(-f);
564 }
565
566 template <typename NT1, typename NT2>
567 static __forceinline__ __device__ __host__ auto RBdot(const NT1 k2, const NT2 q2)
568 {
569 using std::exp;
570 const auto x = q2 / k2;
571 const auto f = get_f(x);
572 const auto df = get_df(x);
573 return 2. * k2 * exp(-f) * (1. + df * x);
574 }
575
576 template <typename NT1, typename NT2>
577 static __forceinline__ __device__ __host__ auto dq2RB(const NT1 k2, const NT2 q2)
578 {
579 using std::exp;
580 const auto x = q2 / k2;
581 const auto f = get_f(x);
582 const auto df = get_df(x);
583 return -exp(-f) * df;
584 }
585
586 template <typename NT1, typename NT2> static __forceinline__ __device__ __host__ auto RF(const NT1 k2, const NT2 q2)
587 {
588 using std::sqrt;
589 return sqrt(RB(k2, q2) + q2) - sqrt(q2);
590 }
591
592 template <typename NT1, typename NT2>
593 static __forceinline__ __device__ __host__ auto RFdot(const NT1 k2, const NT2 q2)
594 {
595 using std::sqrt;
596 return 0.5 * RBdot(k2, q2) / sqrt(RB(k2, q2) + q2);
597 }
598
599 template <typename NT1, typename NT2>
600 static __forceinline__ __device__ __host__ auto dq2RF(const NT1 k2, const NT2 q2)
601 {
602 using std::sqrt;
603 const auto q = sqrt(q2);
604 return (-1. + q * (1. + dq2RB(k2, q2)) / (q + RF(k2, q2))) / (2. * q);
605 }
606 };
607
609 static constexpr int order = 8;
610 };
625 template <class OPTS = PolynomialExpRegulatorOpts> struct PolynomialExpRegulator {
626 static constexpr int order = OPTS::order;
627 static_assert(order > 0, "PolynomialExpRegulator: order must be > 0 !");
628
629 template <int c0, int... c>
630 static __forceinline__ __device__ __host__ auto get_f(std::integer_sequence<int, c0, c...>, const auto x)
631 {
632 using T = decltype(x);
633 if constexpr (sizeof...(c) == 0)
634 return powr<c0 + 1>(x) / T(c0 + 1);
635 else
636 return powr<c0 + 1>(x) / T(c0 + 1) + get_f(std::integer_sequence<int, c...>{}, x);
637 }
638 template <int c0, int... c>
639 static __forceinline__ __device__ __host__ auto get_df(std::integer_sequence<int, c0, c...>, const auto x)
640 {
641 if constexpr (sizeof...(c) == 0)
642 return powr<c0>(x);
643 else
644 return powr<c0>(x) + get_df(std::integer_sequence<int, c...>{}, x);
645 }
646 template <typename NT1, typename NT2> static __forceinline__ __device__ __host__ auto RB(const NT1 k2, const NT2 q2)
647 {
648 using std::exp;
649 const auto x = q2 / k2;
650 const auto f = get_f(std::make_integer_sequence<int, order>{}, x);
651 return k2 * exp(-f);
652 }
653
654 template <typename NT1, typename NT2>
655 static __forceinline__ __device__ __host__ auto RBdot(const NT1 k2, const NT2 q2)
656 {
657 using std::exp;
658 const auto x = q2 / k2;
659 const auto f = get_f(std::make_integer_sequence<int, order>{}, x);
660 const auto df = get_df(std::make_integer_sequence<int, order>{}, x);
661 return 2 * k2 * exp(-f) * (1 + df * x);
662 }
663
664 template <typename NT1, typename NT2>
665 static __forceinline__ __device__ __host__ auto dq2RB(const NT1 k2, const NT2 q2)
666 {
667 using std::exp;
668 const auto x = q2 / k2;
669 const auto f = get_f(std::make_integer_sequence<int, order>{}, x);
670 const auto df = get_df(std::make_integer_sequence<int, order>{}, x);
671 return -exp(-f) * df;
672 }
673
674 template <typename NT1, typename NT2> static __forceinline__ __device__ __host__ auto RF(const NT1 k2, const NT2 q2)
675 {
676 using std::sqrt;
677 return sqrt(RB(k2, q2) + q2) - sqrt(q2);
678 }
679
680 template <typename NT1, typename NT2>
681 static __forceinline__ __device__ __host__ auto RFdot(const NT1 k2, const NT2 q2)
682 {
683 using std::sqrt;
684 using T = decltype(k2 * q2);
685 return T(0.5) * RBdot(k2, q2) / sqrt(RB(k2, q2) + q2);
686 }
687
688 template <typename NT1, typename NT2>
689 static __forceinline__ __device__ __host__ auto dq2RF(const NT1 k2, const NT2 q2)
690 {
691 using std::sqrt;
692 const auto q = sqrt(q2);
693 return (-1 + q * (1 + dq2RB(k2, q2)) / (q + RF(k2, q2))) / (2 * q);
694 }
695 };
696} // namespace DiFfRG
Definition complex_math.hh:14
constexpr __forceinline__ __host__ __device__ NumberType powr(const NumberType x)
A compile-time evaluatable power function for whole number exponents.
Definition math.hh:45
Definition regulators.hh:53
static constexpr double b
Definition regulators.hh:54
Implements one of the standard exponential regulators, i.e.
Definition regulators.hh:72
static __forceinline__ __device__ __host__ auto RF(const NT1 k2, const NT2 q2)
Definition regulators.hh:103
static __forceinline__ __device__ __host__ auto RFdot(const NT1 k2, const NT2 q2)
Definition regulators.hh:118
static constexpr double b
Definition regulators.hh:73
static __forceinline__ __device__ __host__ auto dq2RF(const NT1 k2, const NT2 q2)
Definition regulators.hh:110
static __forceinline__ __device__ __host__ auto dq2RB(const NT1 k2, const NT2 q2)
Definition regulators.hh:82
static __forceinline__ __device__ __host__ auto RBdot(const NT1 k2, const NT2 q2)
Definition regulators.hh:93
static __forceinline__ __device__ __host__ auto RB(const NT1 k2, const NT2 q2)
Definition regulators.hh:75
Definition regulators.hh:125
static constexpr double b
Definition regulators.hh:126
Implements one of the standard exponential regulators, i.e.
Definition regulators.hh:144
static __forceinline__ __device__ __host__ auto RF(const NT1 k2, const NT2 q2)
Definition regulators.hh:171
static __forceinline__ __device__ __host__ auto RB(const NT1 k2, const NT2 q2)
Definition regulators.hh:147
static constexpr double b
Definition regulators.hh:145
static __forceinline__ __device__ __host__ auto RBdot(const NT1 k2, const NT2 q2)
Definition regulators.hh:164
static __forceinline__ __device__ __host__ auto dq2RB(const NT1 k2, const NT2 q2)
Definition regulators.hh:155
static __forceinline__ __device__ __host__ auto dq2RF(const NT1 k2, const NT2 q2)
Definition regulators.hh:178
static __forceinline__ __device__ __host__ auto RFdot(const NT1 k2, const NT2 q2)
Definition regulators.hh:186
Implements the Litim regulator, i.e.
Definition regulators.hh:24
static __forceinline__ __device__ __host__ auto RBdot(const NT1 k2, const NT2 q2)
Definition regulators.hh:31
static __forceinline__ __device__ __host__ auto RFdot(const NT1 k2, const NT2 q2)
Definition regulators.hh:43
static __forceinline__ __device__ __host__ auto RB(const NT1 k2, const NT2 q2)
Definition regulators.hh:25
static void dq2RB(const NT1, const NT2)=delete
static __forceinline__ __device__ __host__ auto RF(const NT1 k2, const NT2 q2)
Definition regulators.hh:36
Definition regulators.hh:608
static constexpr int order
Definition regulators.hh:609
Implements a regulator given by.
Definition regulators.hh:625
static __forceinline__ __device__ __host__ auto get_df(std::integer_sequence< int, c0, c... >, const auto x)
Definition regulators.hh:639
static __forceinline__ __device__ __host__ auto dq2RF(const NT1 k2, const NT2 q2)
Definition regulators.hh:689
static __forceinline__ __device__ __host__ auto RF(const NT1 k2, const NT2 q2)
Definition regulators.hh:674
static __forceinline__ __device__ __host__ auto dq2RB(const NT1 k2, const NT2 q2)
Definition regulators.hh:665
static __forceinline__ __device__ __host__ auto RBdot(const NT1 k2, const NT2 q2)
Definition regulators.hh:655
static __forceinline__ __device__ __host__ auto RB(const NT1 k2, const NT2 q2)
Definition regulators.hh:646
static __forceinline__ __device__ __host__ auto RFdot(const NT1 k2, const NT2 q2)
Definition regulators.hh:681
static constexpr int order
Definition regulators.hh:626
static __forceinline__ __device__ __host__ auto get_f(std::integer_sequence< int, c0, c... >, const auto x)
Definition regulators.hh:630
Definition regulators.hh:244
static constexpr double b0
Definition regulators.hh:247
static constexpr double c
Definition regulators.hh:246
static constexpr int order
Definition regulators.hh:245
Implements a regulator given by.
Definition regulators.hh:264
static __forceinline__ __device__ __host__ auto dq2RF(const NT1 k2, const NT2 q2)
Definition regulators.hh:600
static __forceinline__ __device__ __host__ auto get_f(const auto x)
Definition regulators.hh:272
static __forceinline__ __device__ __host__ auto RF(const NT1 k2, const NT2 q2)
Definition regulators.hh:586
static __forceinline__ __device__ __host__ auto dq2RB(const NT1 k2, const NT2 q2)
Definition regulators.hh:577
static __forceinline__ __device__ __host__ auto RBdot(const NT1 k2, const NT2 q2)
Definition regulators.hh:567
static constexpr double b0
Definition regulators.hh:270
static __forceinline__ __device__ __host__ auto RB(const NT1 k2, const NT2 q2)
Definition regulators.hh:558
static constexpr double c
Definition regulators.hh:269
static __forceinline__ __device__ __host__ auto RFdot(const NT1 k2, const NT2 q2)
Definition regulators.hh:593
static constexpr int order
Definition regulators.hh:265
static __forceinline__ __device__ __host__ auto get_df(const auto x)
Definition regulators.hh:377
Definition regulators.hh:193
static constexpr double alpha
Definition regulators.hh:194
Implements one of the standard exponential regulators, i.e.
Definition regulators.hh:212
static __forceinline__ __device__ __host__ auto RF(const NT1 k2, const NT2 q2)
Definition regulators.hh:230
static __forceinline__ __device__ __host__ auto RFdot(const NT1 k2, const NT2 q2)
Definition regulators.hh:237
static __forceinline__ __device__ __host__ auto RBdot(const NT1 k2, const NT2 q2)
Definition regulators.hh:222
static __forceinline__ __device__ __host__ auto RB(const NT1 k2, const NT2 q2)
Definition regulators.hh:215
static constexpr double alpha
Definition regulators.hh:213