ImpactX
Loading...
Searching...
No Matches
ExactQuad.H
Go to the documentation of this file.
1/* Copyright 2022-2023 The Regents of the University of California, through Lawrence
2 * Berkeley National Laboratory (subject to receipt of any required
3 * approvals from the U.S. Dept. of Energy). All rights reserved.
4 *
5 * This file is part of ImpactX.
6 *
7 * Authors: Chad Mitchell, Axel Huebl
8 * License: BSD-3-Clause-LBNL
9 */
10#ifndef IMPACTX_EXACTQUAD_H
11#define IMPACTX_EXACTQUAD_H
12
15#include "mixin/alignment.H"
16#include "mixin/pipeaperture.H"
17#include "mixin/beamoptic.H"
18#include "mixin/thick.H"
19#include "mixin/named.H"
20#include "mixin/nofinalize.H"
22#include "mixin/spintransport.H"
23
24#include <AMReX_Extension.H>
25#include <AMReX_Math.H>
26#include <AMReX_REAL.H>
27#include <AMReX_SIMD.H>
28
29#include <cmath>
30#include <stdexcept>
31
32
33namespace impactx::elements
34{
35 struct ExactQuad
36 : public mixin::Named,
37 public mixin::BeamOptic<ExactQuad>,
38 public mixin::LinearTransport<ExactQuad>,
39 public mixin::Thick,
40 public mixin::Alignment,
43 public mixin::NoFinalize,
44 public amrex::simd::Vectorized<amrex::simd::native_simd_size_particlereal>
45 {
46 static constexpr auto type = "ExactQuad";
48
78 int unit,
81 amrex::ParticleReal rotation_degree = 0,
84 int int_order = 2,
85 int mapsteps = 5,
86 int nslice = 1,
87 std::optional<std::string> name = std::nullopt
88 )
89 : Named(std::move(name)),
90 Thick(ds, nslice),
91 Alignment(dx, dy, rotation_degree),
93 m_k(k),m_unit(unit),m_int_order(int_order),m_mapsteps(mapsteps)
94 {
95 }
96
98 void reverse () { Thick::reverse(); }
99
101 using BeamOptic::operator();
102
110 void compute_constants (RefPart const & refpart)
111 {
112 using namespace amrex::literals; // for _rt and _prt
113 using amrex::Math::powi;
114
115 Alignment::compute_constants(refpart);
116
117 // length of the current slice
118 m_slice_ds = m_ds / nslice();
119
120 // find beta*gamma^2
121 amrex::ParticleReal const pt_ref = refpart.pt;
122 m_betgam2 = powi<2>(pt_ref) - 1.0_prt;
123 m_ibetgam2 = 1_prt / m_betgam2;
124 m_beta = refpart.beta();
125 m_ibeta = 1_prt / m_beta;
126
127 // normalize quad units to MAD-X convention if needed
128 m_g = m_unit == 1 ? m_k / refpart.rigidity_Tm() : m_k;
129
130 // compute phase advance per unit length in s (in rad/m)
131 m_omega = std::sqrt(std::abs(m_g));
132 }
133
147 template<typename T_Real=amrex::ParticleReal, typename T_IdCpu=uint64_t>
150 T_Real & AMREX_RESTRICT x,
151 T_Real & AMREX_RESTRICT y,
152 T_Real & AMREX_RESTRICT t,
153 T_Real & AMREX_RESTRICT px,
154 T_Real & AMREX_RESTRICT py,
155 T_Real & AMREX_RESTRICT pt,
156 [[maybe_unused]] T_IdCpu const & AMREX_RESTRICT idcpu,
157 RefPart const & AMREX_RESTRICT refpart
158 ) const
159 {
160 using namespace amrex::literals; // for _rt and _prt
161
162 // numerical integration parameters
163 amrex::ParticleReal const zin = 0_prt;
164 amrex::ParticleReal const zout = m_slice_ds;
165 int const nsteps = m_mapsteps;
166
167 // initialize phase space 6-vector
169 x, px, y, py, t, pt
170 };
171
172 // call integrator to advance through slice (int_order = 2 or 4, otherwise default 2)
173 if (m_int_order == 2) {
174 integrators::symp2_integrate_particle(particle,zin,zout,nsteps,refpart,*this);
175 } else if (m_int_order == 4) {
176 integrators::symp4_integrate_particle(particle,zin,zout,nsteps,refpart,*this);
177 } else if (m_int_order == 6) {
178 integrators::symp6_integrate_particle(particle,zin,zout,nsteps,refpart,*this);
179 } else {
180 integrators::symp2_integrate_particle(particle,zin,zout,nsteps,refpart,*this);
181 }
182
183 // assign updated values
184 x = particle(1);
185 px = particle(2);
186 y = particle(3);
187 py = particle(4);
188 t = particle(5);
189 pt = particle(6);
190 }
191
202 template<typename T_Real>
204 void map1 (amrex::ParticleReal const tau,
206 amrex::ParticleReal & zeval,
207 [[maybe_unused]] RefPart const & AMREX_RESTRICT refpart) const
208 {
209 using namespace amrex::literals; // for _rt and _prt
210 using namespace std; // for cmath(float)
211
212 T_Real const x = particle(1);
213 T_Real const px = particle(2);
214 T_Real const y = particle(3);
215 T_Real const py = particle(4);
216 T_Real const t = particle(5);
217 T_Real const pt = particle(6);
218
219 T_Real xout = x;
220 T_Real pxout = px;
221 T_Real yout = y;
222 T_Real pyout = py;
223 T_Real tout = t;
224 T_Real ptout = pt;
225
226 amrex::ParticleReal const sin_omega_ds = sin(m_omega*tau);
227 amrex::ParticleReal const cos_omega_ds = cos(m_omega*tau);
228 amrex::ParticleReal const sinh_omega_ds = sinh(m_omega*tau);
229 amrex::ParticleReal const cosh_omega_ds = cosh(m_omega*tau);
230 amrex::ParticleReal const slice_bg = tau / m_betgam2;
231
232 if (m_g > 0.0_prt)
233 {
234 // advance position and momentum (focusing quad)
235 xout = cos_omega_ds*x + sin_omega_ds/m_omega*px;
236 pxout = -m_omega*sin_omega_ds*x + cos_omega_ds*px;
237
238 yout = cosh_omega_ds*y + sinh_omega_ds/m_omega*py;
239 pyout = m_omega*sinh_omega_ds*y + cosh_omega_ds*py;
240
241 tout = t + slice_bg*pt;
242 // ptout = pt;
243 } else if (m_g < 0.0_prt)
244 {
245 // advance position and momentum (defocusing quad)
246 xout = cosh_omega_ds*x + sinh_omega_ds/m_omega*px;
247 pxout = m_omega*sinh_omega_ds*x + cosh_omega_ds*px;
248
249 yout = cos_omega_ds*y + sin_omega_ds/m_omega*py;
250 pyout = -m_omega*sin_omega_ds*y + cos_omega_ds*py;
251
252 tout = t + slice_bg*pt;
253 // ptout = pt;
254 } else {
255 // advance position and momentum (zero strength = drift)
256 xout = x + tau * px;
257 // pxout = px;
258 yout = y + tau * py;
259 // pyout = py;
260 tout = t + slice_bg * pt;
261 // ptout = pt;
262 }
263
264 // push particle coordinates
265 particle(1) = xout;
266 particle(2) = pxout;
267 particle(3) = yout;
268 particle(4) = pyout;
269 particle(5) = tout;
270 particle(6) = ptout;
271
272 zeval += 0_prt;
273 }
274
284 template<typename T_Real>
286 void map2 (amrex::ParticleReal const tau,
288 amrex::ParticleReal & zeval,
289 [[maybe_unused]] RefPart const & AMREX_RESTRICT refpart) const
290 {
291 using namespace amrex::literals; // for _rt and _prt
292 using namespace std; // for cmath(float)
293 using amrex::Math::powi;
294
295 T_Real const x = particle(1);
296 T_Real const px = particle(2);
297 T_Real const y = particle(3);
298 T_Real const py = particle(4);
299 T_Real const t = particle(5);
300 T_Real const pt = particle(6);
301
302 // compute the radical in the denominator (= pz):
303 T_Real const inv_pzden = 1_prt / sqrt(
304 powi<2>(pt - m_ibeta) -
305 m_ibetgam2 -
306 powi<2>(px) -
307 powi<2>(py)
308 );
309
310 // The momenta are not affected.
311 particle(1) = x + tau * px * (-1_prt + inv_pzden);
312 particle(2) = px;
313 particle(3) = y + tau * py * (-1_prt + inv_pzden);
314 particle(4) = py;
315 particle(5) = t + tau * (-m_ibeta - m_ibetgam2*pt + inv_pzden*(1_prt - pt*m_beta)*m_ibeta);
316 particle(6) = pt;
317
318 zeval += tau;
319 }
320
330 template<typename T_Real>
332 void map3 (amrex::ParticleReal const tau,
334 amrex::SmallVector<T_Real, 3, 1> & particle_spin,
335 amrex::ParticleReal & zeval,
336 RefPart const & AMREX_RESTRICT refpart) const
337 {
338 using namespace amrex::literals; // for _rt and _prt
339 using namespace std; // for cmath(float)
340 using amrex::Math::powi;
341
342 // reference particle relativistic factors
343 amrex::ParticleReal const gamma_ref = refpart.gamma();
344 amrex::ParticleReal const gyro_anomaly = refpart.gyromagnetic_anomaly;
345
346 // initialize the three components of the axis-angle vector
347 T_Real lambdax = 0_prt;
348 T_Real lambday = 0_prt;
349 T_Real lambdaz = 0_prt;
350
351 T_Real const x = particle(1);
352 T_Real const px = particle(2);
353 T_Real const y = particle(3);
354 T_Real const py = particle(4);
355 //T_Real const t = particle(5); // not used
356 T_Real const pt = particle(6);
357 T_Real sx = particle_spin(1);
358 T_Real sy = particle_spin(2);
359 T_Real sz = particle_spin(3);
360
361 // Magnetic field normalized by q/mc:
362 T_Real const Bx = m_g * y * m_beta * gamma_ref;
363 T_Real const By = m_g * x * m_beta * gamma_ref;
364 T_Real const Bz = 0_prt;
365
366 // Electric field normalized by q/mc^2:
367 T_Real const Ex = 0.0_prt;
368 T_Real const Ey = 0.0_prt;
369 T_Real const Ez = 0.0_prt;
370
371 // Quantities required to evaluate the full Thomas-BMT precession vector.
372 T_Real const Pnorm = sqrt(1_prt - 2_prt * pt * m_ibeta + pt*pt);
373 T_Real const iPnorm = 1_prt/Pnorm;
374 T_Real const Ps = sqrt(Pnorm*Pnorm - px*px - py*py);
375 T_Real const gamma = gamma_ref * (1_prt - pt*m_beta);
376 T_Real const ux = px * iPnorm;
377 T_Real const uy = py * iPnorm;
378 T_Real const uz = Ps * iPnorm;
379
380 // Zero curvature in a quadrupole
381 amrex::ParticleReal const h = 0.0_prt;
382
383 // Evaluation of the full Thomas-BMT precession vector.
384 tbmt_precession_vector(x,ux,uy,uz,gamma,h,gyro_anomaly,Bx,By,Bz,Ex,Ey,Ez,lambdax,lambday,lambdaz);
385
386 // Generator of the spin rotation for a single step
387 lambdax *= tau;
388 lambday *= tau;
389 lambdaz *= tau;
390
391 // push the spin vector using the generator just determined
392 rotate_spin(lambdax,lambday,lambdaz,sx,sy,sz);
393
394 // update the spin variables
395 particle_spin(1) = sx;
396 particle_spin(2) = sy;
397 particle_spin(3) = sz;
398
399 // The coordinates and momenta are not affected.
400
401 zeval += 0_prt;
402 }
403
404
410 void operator() (RefPart & AMREX_RESTRICT refpart) const { // TODO: update as well, but needs more careful placement of calc_constants
411
412 using namespace amrex::literals; // for _rt and _prt
413 using amrex::Math::powi;
414
415 // assign input reference particle values
416 amrex::ParticleReal const x = refpart.x;
417 amrex::ParticleReal const px = refpart.px;
418 amrex::ParticleReal const y = refpart.y;
419 amrex::ParticleReal const py = refpart.py;
420 amrex::ParticleReal const z = refpart.z;
421 amrex::ParticleReal const pz = refpart.pz;
422 amrex::ParticleReal const t = refpart.t;
423 amrex::ParticleReal const pt = refpart.pt;
424 amrex::ParticleReal const s = refpart.s;
425
426 // length of the current slice
427 amrex::ParticleReal const slice_ds = m_ds / nslice();
428
429 // assign intermediate parameter
430 amrex::ParticleReal const step = slice_ds / std::sqrt(powi<2>(pt)-1.0_prt);
431
432 // advance position and momentum (straight element)
433 refpart.x = x + step*px;
434 refpart.y = y + step*py;
435 refpart.z = z + step*pz;
436 refpart.t = t - step*pt;
437
438 // advance integrated path length
439 refpart.s = s + slice_ds;
440 }
441
447 Map6x6
448 transport_map (RefPart const & AMREX_RESTRICT refpart) const // TODO: update as well, but needs more careful placement of calc_constants
449 {
450 using namespace amrex::literals; // for _rt and _prt
451 using amrex::Math::powi;
452
453 // length of the current slice
454 amrex::ParticleReal const slice_ds = m_ds / nslice();
455
456 // access reference particle values to find beta*gamma^2
457 amrex::ParticleReal const pt_ref = refpart.pt;
458 amrex::ParticleReal const betgam2 = powi<2>(pt_ref) - 1.0_prt;
459
460 // compute phase advance per unit length in s (in rad/m)
461 amrex::ParticleReal const omega = std::sqrt(std::abs(m_k));
462
463 // initialize linear map matrix elements
465
466 if (m_k > 0.0_prt) {
467 R(1,1) = std::cos(omega*slice_ds);
468 R(1,2) = std::sin(omega*slice_ds)/omega;
469 R(2,1) = -omega*std::sin(omega*slice_ds);
470 R(2,2) = std::cos(omega*slice_ds);
471 R(3,3) = std::cosh(omega*slice_ds);
472 R(3,4) = std::sinh(omega*slice_ds)/omega;
473 R(4,3) = omega*std::sinh(omega*slice_ds);
474 R(4,4) = std::cosh(omega*slice_ds);
475 R(5,6) = slice_ds/betgam2;
476 } else if (m_k < 0.0_prt) {
477 R(1,1) = std::cosh(omega*slice_ds);
478 R(1,2) = std::sinh(omega*slice_ds)/omega;
479 R(2,1) = omega*std::sinh(omega*slice_ds);
480 R(2,2) = std::cosh(omega*slice_ds);
481 R(3,3) = std::cos(omega*slice_ds);
482 R(3,4) = std::sin(omega*slice_ds)/omega;
483 R(4,3) = -omega*std::sin(omega*slice_ds);
484 R(4,4) = std::cos(omega*slice_ds);
485 R(5,6) = slice_ds/betgam2;
486 } else {
487 R(1,2) = m_slice_ds;
488 R(3,4) = m_slice_ds;
489 R(5,6) = m_slice_ds / betgam2;
490 }
491
492 // apply the transverse rotation (roll) alignment error
493 return rotate_aligned_map(R);
494 }
495
496
511 template<typename T_Real=amrex::ParticleReal, typename T_IdCpu=uint64_t>
514 T_Real & AMREX_RESTRICT x,
515 T_Real & AMREX_RESTRICT y,
516 T_Real & AMREX_RESTRICT t,
517 T_Real & AMREX_RESTRICT px,
518 T_Real & AMREX_RESTRICT py,
519 T_Real & AMREX_RESTRICT pt,
520 T_Real & AMREX_RESTRICT sx,
521 T_Real & AMREX_RESTRICT sy,
522 T_Real & AMREX_RESTRICT sz,
523 [[maybe_unused]] T_IdCpu const & AMREX_RESTRICT idcpu,
524 RefPart const & AMREX_RESTRICT refpart
525 ) const
526 {
527 using namespace amrex::literals; // for _rt and _prt
528
529 // numerical integration parameters
530 amrex::ParticleReal const zin = 0_prt;
531 amrex::ParticleReal const zout = m_slice_ds;
532 int const nsteps = m_mapsteps;
533
534 // initialize phase space 6-vector
536 x, px, y, py, t, pt
537 };
538
539 // initialize spin 3-vector
541 sx, sy, sz
542 };
543
544 // call integrator to advance through slice
545 integrators::symp_integrate_particle_spin(particle,particle_spin,zin,zout,nsteps,m_int_order,refpart,*this);
546
547 // assign updated values
548 x = particle(1);
549 px = particle(2);
550 y = particle(3);
551 py = particle(4);
552 t = particle(5);
553 pt = particle(6);
554 sx = particle_spin(1);
555 sy = particle_spin(2);
556 sz = particle_spin(3);
557 }
558
560 using LinearTransport::operator();
561
563 int m_unit;
566
567 private:
568 // constants that are independent of the individually tracked particle,
569 // see: compute_constants() to refresh
577 };
578
579} // namespace impactx
580
582
583#endif // IMPACTX_EXACTQUAD_H
#define AMREX_FORCE_INLINE
#define AMREX_RESTRICT
#define AMREX_GPU_HOST_DEVICE
#define AMREX_GPU_HOST
#define IMPACTX_PUSH_EXTERN_TEMPLATE(ElementType)
Definition PushAll.H:78
amrex_particle_real ParticleReal
constexpr T powi(T x) noexcept
SmallMatrix< T, N, 1, Order::F, StartIndex > SmallVector
__host__ __device__ GpuComplex< T > sqrt(const GpuComplex< T > &a_z) noexcept
Definition All.H:56
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void symp2_integrate_particle(amrex::SmallVector< T_Real, 6, 1 > &particle, amrex::ParticleReal const zin, amrex::ParticleReal const zout, int const nsteps, RefPart const &refpart, T_Element const &element)
Definition Integrators.H:182
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void symp4_integrate_particle(amrex::SmallVector< T_Real, 6, 1 > &particle, amrex::ParticleReal const zin, amrex::ParticleReal const zout, int const nsteps, RefPart const &refpart, T_Element const &element)
Definition Integrators.H:231
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void symp_integrate_particle_spin(amrex::SmallVector< T_Real, 6, 1 > &particle, amrex::SmallVector< T_Real, 3, 1 > &particle_spin, amrex::ParticleReal const zin, amrex::ParticleReal const zout, int const nsteps, int int_order, RefPart const &refpart, T_Element const &element)
Definition Integrators.H:493
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void symp6_integrate_particle(amrex::SmallVector< T_Real, 6, 1 > &particle, amrex::ParticleReal const zin, amrex::ParticleReal const zout, int const nsteps, RefPart const &refpart, T_Element const &element)
Definition Integrators.H:292
@ s
fixed s as the independent variable
Definition ImpactXParticleContainer.H:37
@ t
fixed t as the independent variable
Definition ImpactXParticleContainer.H:38
amrex::SmallMatrix< amrex::ParticleReal, 6, 6, amrex::Order::F, 1 > Map6x6
Definition CovarianceMatrix.H:20
static constexpr __host__ __device__ SmallMatrix< T, NRows, NCols, ORDER, StartIndex > Identity() noexcept
Definition ReferenceParticle.H:33
amrex::ParticleReal pt
energy, normalized by rest energy
Definition ReferenceParticle.H:42
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal rigidity_Tm() const
Definition ReferenceParticle.H:260
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal beta() const
Definition ReferenceParticle.H:151
Definition ExactQuad.H:45
void compute_constants(RefPart const &refpart)
Definition ExactQuad.H:110
ExactQuad(amrex::ParticleReal ds, amrex::ParticleReal k, int unit, amrex::ParticleReal dx=0, amrex::ParticleReal dy=0, amrex::ParticleReal rotation_degree=0, amrex::ParticleReal aperture_x=0, amrex::ParticleReal aperture_y=0, int int_order=2, int mapsteps=5, int nslice=1, std::optional< std::string > name=std::nullopt)
Definition ExactQuad.H:75
amrex::ParticleReal m_ibetgam2
beta*gamma^2
Definition ExactQuad.H:572
amrex::ParticleReal m_slice_ds
number of integration steps per slice
Definition ExactQuad.H:570
int m_int_order
unit specification for quad strength
Definition ExactQuad.H:564
int m_mapsteps
order used for the symplectic integration (2 or 4)
Definition ExactQuad.H:565
amrex::ParticleReal m_omega
quadrupole strength in 1/m^2
Definition ExactQuad.H:576
amrex::ParticleReal m_ibeta
beta
Definition ExactQuad.H:574
amrex::ParticleReal m_beta
1 / m_betgam2
Definition ExactQuad.H:573
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void operator()(T_Real &AMREX_RESTRICT x, T_Real &AMREX_RESTRICT y, T_Real &AMREX_RESTRICT t, T_Real &AMREX_RESTRICT px, T_Real &AMREX_RESTRICT py, T_Real &AMREX_RESTRICT pt, T_IdCpu const &AMREX_RESTRICT idcpu, RefPart const &AMREX_RESTRICT refpart) const
Definition ExactQuad.H:149
amrex::ParticleReal m_g
1 / m_beta
Definition ExactQuad.H:575
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void map2(amrex::ParticleReal const tau, amrex::SmallVector< T_Real, 6, 1 > &particle, amrex::ParticleReal &zeval, RefPart const &AMREX_RESTRICT refpart) const
Definition ExactQuad.H:286
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void map1(amrex::ParticleReal const tau, amrex::SmallVector< T_Real, 6, 1 > &particle, amrex::ParticleReal &zeval, RefPart const &AMREX_RESTRICT refpart) const
Definition ExactQuad.H:204
ImpactXParticleContainer::ParticleType PType
Definition ExactQuad.H:47
int m_unit
quadrupole strength in 1/m^2 (or T/m)
Definition ExactQuad.H:563
amrex::ParticleReal m_k
Definition ExactQuad.H:562
AMREX_GPU_HOST AMREX_FORCE_INLINE Map6x6 transport_map(RefPart const &AMREX_RESTRICT refpart) const
Definition ExactQuad.H:448
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void map3(amrex::ParticleReal const tau, amrex::SmallVector< T_Real, 6, 1 > &particle, amrex::SmallVector< T_Real, 3, 1 > &particle_spin, amrex::ParticleReal &zeval, RefPart const &AMREX_RESTRICT refpart) const
Definition ExactQuad.H:332
void reverse()
Definition ExactQuad.H:98
amrex::ParticleReal m_betgam2
m_ds / nslice();
Definition ExactQuad.H:571
static constexpr auto type
Definition ExactQuad.H:46
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void spin_and_phasespace_push(T_Real &AMREX_RESTRICT x, T_Real &AMREX_RESTRICT y, T_Real &AMREX_RESTRICT t, T_Real &AMREX_RESTRICT px, T_Real &AMREX_RESTRICT py, T_Real &AMREX_RESTRICT pt, T_Real &AMREX_RESTRICT sx, T_Real &AMREX_RESTRICT sy, T_Real &AMREX_RESTRICT sz, T_IdCpu const &AMREX_RESTRICT idcpu, RefPart const &AMREX_RESTRICT refpart) const
Definition ExactQuad.H:513
Definition alignment.H:29
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal dy() const
Definition alignment.H:189
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal dx() const
Definition alignment.H:179
AMREX_GPU_HOST AMREX_FORCE_INLINE Map6x6 rotate_aligned_map(Map6x6 const &R) const
Definition alignment.H:263
Alignment(amrex::ParticleReal dx, amrex::ParticleReal dy, amrex::ParticleReal rotation_degree)
Definition alignment.H:39
Definition beamoptic.H:529
Definition lineartransport.H:50
Definition named.H:29
AMREX_GPU_HOST Named(std::optional< std::string > name)
Definition named.H:57
AMREX_FORCE_INLINE std::string name() const
Definition named.H:122
Definition nofinalize.H:22
Definition pipeaperture.H:26
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal aperture_x() const
Definition pipeaperture.H:90
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal aperture_y() const
Definition pipeaperture.H:101
PipeAperture(amrex::ParticleReal aperture_x, amrex::ParticleReal aperture_y)
Definition pipeaperture.H:32
Definition spintransport.H:36
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void tbmt_precession_vector(T_Real const &AMREX_RESTRICT x, T_Real const &AMREX_RESTRICT ux, T_Real const &AMREX_RESTRICT uy, T_Real const &AMREX_RESTRICT uz, T_Real const &AMREX_RESTRICT gamma, amrex::ParticleReal const &AMREX_RESTRICT h, amrex::ParticleReal const &AMREX_RESTRICT gyro_anomaly, T_Real const &AMREX_RESTRICT Bx, T_Real const &AMREX_RESTRICT By, T_Real const &AMREX_RESTRICT Bz, T_Real const &AMREX_RESTRICT Ex, T_Real const &AMREX_RESTRICT Ey, T_Real const &AMREX_RESTRICT Ez, T_Real &AMREX_RESTRICT Omegax, T_Real &AMREX_RESTRICT Omegay, T_Real &AMREX_RESTRICT Omegaz) const
Definition spintransport.H:121
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void rotate_spin(T_Real const &AMREX_RESTRICT lambdax, T_Real const &AMREX_RESTRICT lambday, T_Real const &AMREX_RESTRICT lambdaz, T_Real &AMREX_RESTRICT sx, T_Real &AMREX_RESTRICT sy, T_Real &AMREX_RESTRICT sz) const
Definition spintransport.H:48
Definition thick.H:24
Thick(amrex::ParticleReal ds, int nslice)
Definition thick.H:30
amrex::ParticleReal m_ds
Definition thick.H:68
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal ds() const
Definition thick.H:53
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int nslice() const
Definition thick.H:43