/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/physics/regulators.hh Source File#

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