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