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 // additional constants needed for spin push
134 m_gamma_ref = refpart.gamma();
136 }
137
151 template<typename T_Real=amrex::ParticleReal, typename T_IdCpu=uint64_t>
154 T_Real & AMREX_RESTRICT x,
155 T_Real & AMREX_RESTRICT y,
156 T_Real & AMREX_RESTRICT t,
157 T_Real & AMREX_RESTRICT px,
158 T_Real & AMREX_RESTRICT py,
159 T_Real & AMREX_RESTRICT pt,
160 T_IdCpu & AMREX_RESTRICT idcpu,
161 [[maybe_unused]] RefPart const & AMREX_RESTRICT refpart
162 ) const
163 {
164 using namespace amrex::literals; // for _rt and _prt
165
166 // shift due to alignment errors of the element
167 shift_in(x, y, px, py);
168
169 // numerical integration parameters
170 amrex::ParticleReal const zin = 0_prt;
171 amrex::ParticleReal const zout = m_slice_ds;
172 int const nsteps = m_mapsteps;
173
174 // initialize phase space 6-vector
176 x, px, y, py, t, pt
177 };
178
179 // call integrator to advance through slice (int_order = 2 or 4, otherwise default 2)
180 if (m_int_order == 2) {
181 integrators::symp2_integrate_particle(particle,zin,zout,nsteps,*this);
182 } else if (m_int_order == 4) {
183 integrators::symp4_integrate_particle(particle,zin,zout,nsteps,*this);
184 } else if (m_int_order == 6) {
185 integrators::symp6_integrate_particle(particle,zin,zout,nsteps,*this);
186 } else {
187 integrators::symp2_integrate_particle(particle,zin,zout,nsteps,*this);
188 }
189
190 // assign updated values
191 x = particle(1);
192 px = particle(2);
193 y = particle(3);
194 py = particle(4);
195 t = particle(5);
196 pt = particle(6);
197
198 // apply transverse aperture
199 apply_aperture(x, y, idcpu);
200
201 // undo shift due to alignment errors of the element
202 shift_out(x, y, px, py);
203 }
204
214 template<typename T_Real>
216 void map1 (amrex::ParticleReal const tau,
218 amrex::ParticleReal & zeval) const
219 {
220 using namespace amrex::literals; // for _rt and _prt
221
222 T_Real const x = particle(1);
223 T_Real const px = particle(2);
224 T_Real const y = particle(3);
225 T_Real const py = particle(4);
226 T_Real const t = particle(5);
227 T_Real const pt = particle(6);
228
229 T_Real xout = x;
230 T_Real pxout = px;
231 T_Real yout = y;
232 T_Real pyout = py;
233 T_Real tout = t;
234 T_Real ptout = pt;
235
236 amrex::ParticleReal const sin_omega_ds = sin(m_omega*tau);
237 amrex::ParticleReal const cos_omega_ds = cos(m_omega*tau);
238 amrex::ParticleReal const sinh_omega_ds = sinh(m_omega*tau);
239 amrex::ParticleReal const cosh_omega_ds = cosh(m_omega*tau);
240 amrex::ParticleReal const slice_bg = tau / m_betgam2;
241
242 if (m_g > 0.0_prt)
243 {
244 // advance position and momentum (focusing quad)
245 xout = cos_omega_ds*x + sin_omega_ds/m_omega*px;
246 pxout = -m_omega*sin_omega_ds*x + cos_omega_ds*px;
247
248 yout = cosh_omega_ds*y + sinh_omega_ds/m_omega*py;
249 pyout = m_omega*sinh_omega_ds*y + cosh_omega_ds*py;
250
251 tout = t + slice_bg*pt;
252 // ptout = pt;
253 } else if (m_g < 0.0_prt)
254 {
255 // advance position and momentum (defocusing quad)
256 xout = cosh_omega_ds*x + sinh_omega_ds/m_omega*px;
257 pxout = m_omega*sinh_omega_ds*x + cosh_omega_ds*px;
258
259 yout = cos_omega_ds*y + sin_omega_ds/m_omega*py;
260 pyout = -m_omega*sin_omega_ds*y + cos_omega_ds*py;
261
262 tout = t + slice_bg*pt;
263 // ptout = pt;
264 } else {
265 // advance position and momentum (zero strength = drift)
266 xout = x + tau * px;
267 // pxout = px;
268 yout = y + tau * py;
269 // pyout = py;
270 tout = t + slice_bg * pt;
271 // ptout = pt;
272 }
273
274 // push particle coordinates
275 particle(1) = xout;
276 particle(2) = pxout;
277 particle(3) = yout;
278 particle(4) = pyout;
279 particle(5) = tout;
280 particle(6) = ptout;
281
282 zeval += 0_prt;
283 }
284
293 template<typename T_Real>
295 void map2 (amrex::ParticleReal const tau,
297 amrex::ParticleReal & zeval) const
298 {
299 using namespace amrex::literals; // for _rt and _prt
300 using namespace std; // for cmath(float)
301 using amrex::Math::powi;
302
303 T_Real const x = particle(1);
304 T_Real const px = particle(2);
305 T_Real const y = particle(3);
306 T_Real const py = particle(4);
307 T_Real const t = particle(5);
308 T_Real const pt = particle(6);
309
310 // compute the radical in the denominator (= pz):
311 T_Real const inv_pzden = 1_prt / sqrt(
312 powi<2>(pt - m_ibeta) -
313 m_ibetgam2 -
314 powi<2>(px) -
315 powi<2>(py)
316 );
317
318 // The momenta are not affected.
319 particle(1) = x + tau * px * (-1_prt + inv_pzden);
320 particle(2) = px;
321 particle(3) = y + tau * py * (-1_prt + inv_pzden);
322 particle(4) = py;
323 particle(5) = t + tau * (-m_ibeta - m_ibetgam2*pt + inv_pzden*(1_prt - pt*m_beta)*m_ibeta);
324 particle(6) = pt;
325
326 zeval += tau;
327 }
328
337 template<typename T_Real>
339 void map3 (amrex::ParticleReal const tau,
341 amrex::SmallVector<T_Real, 3, 1> & particle_spin,
342 amrex::ParticleReal & zeval) const
343 {
344 using namespace amrex::literals; // for _rt and _prt
345 using namespace std; // for cmath(float)
346 using amrex::Math::powi;
347
348 // initialize the three components of the axis-angle vector
349 T_Real lambdax = 0_prt;
350 T_Real lambday = 0_prt;
351 T_Real lambdaz = 0_prt;
352
353 T_Real const x = particle(1);
354 T_Real const px = particle(2);
355 T_Real const y = particle(3);
356 T_Real const py = particle(4);
357 //T_Real const t = particle(5); // not used
358 T_Real const pt = particle(6);
359 T_Real sx = particle_spin(1);
360 T_Real sy = particle_spin(2);
361 T_Real sz = particle_spin(3);
362
363 // Magnetic field normalized by q/mc:
364 T_Real const Bx = m_g * y * m_beta * m_gamma_ref;
365 T_Real const By = m_g * x * m_beta * m_gamma_ref;
366 T_Real const Bz = 0_prt;
367
368 // Electric field normalized by q/mc^2:
369 T_Real const Ex = 0.0_prt;
370 T_Real const Ey = 0.0_prt;
371 T_Real const Ez = 0.0_prt;
372
373 // Quantities required to evaluate the full Thomas-BMT precession vector.
374 T_Real const Pnorm = sqrt(1_prt - 2_prt * pt * m_ibeta + pt*pt);
375 T_Real const iPnorm = 1_prt/Pnorm;
376 T_Real const Ps = sqrt(Pnorm*Pnorm - px*px - py*py);
377 T_Real const gamma = m_gamma_ref * (1_prt - pt*m_beta);
378 T_Real const ux = px * iPnorm;
379 T_Real const uy = py * iPnorm;
380 T_Real const uz = Ps * iPnorm;
381
382 // Zero curvature in a quadrupole
383 amrex::ParticleReal const h = 0.0_prt;
384
385 // Evaluation of the full Thomas-BMT precession vector.
386 tbmt_precession_vector(x,ux,uy,uz,gamma,h,m_gyro_anomaly,Bx,By,Bz,Ex,Ey,Ez,lambdax,lambday,lambdaz);
387
388 // Generator of the spin rotation for a single step
389 lambdax *= tau;
390 lambday *= tau;
391 lambdaz *= tau;
392
393 // push the spin vector using the generator just determined
394 rotate_spin(lambdax,lambday,lambdaz,sx,sy,sz);
395
396 // update the spin variables
397 particle_spin(1) = sx;
398 particle_spin(2) = sy;
399 particle_spin(3) = sz;
400
401 // The coordinates and momenta are not affected.
402
403 zeval += 0_prt;
404 }
405
406
412 void operator() (RefPart & AMREX_RESTRICT refpart) const { // TODO: update as well, but needs more careful placement of calc_constants
413
414 using namespace amrex::literals; // for _rt and _prt
415 using amrex::Math::powi;
416
417 // assign input reference particle values
418 amrex::ParticleReal const x = refpart.x;
419 amrex::ParticleReal const px = refpart.px;
420 amrex::ParticleReal const y = refpart.y;
421 amrex::ParticleReal const py = refpart.py;
422 amrex::ParticleReal const z = refpart.z;
423 amrex::ParticleReal const pz = refpart.pz;
424 amrex::ParticleReal const t = refpart.t;
425 amrex::ParticleReal const pt = refpart.pt;
426 amrex::ParticleReal const s = refpart.s;
427
428 // length of the current slice
429 amrex::ParticleReal const slice_ds = m_ds / nslice();
430
431 // assign intermediate parameter
432 amrex::ParticleReal const step = slice_ds / std::sqrt(powi<2>(pt)-1.0_prt);
433
434 // advance position and momentum (straight element)
435 refpart.x = x + step*px;
436 refpart.y = y + step*py;
437 refpart.z = z + step*pz;
438 refpart.t = t - step*pt;
439
440 // advance integrated path length
441 refpart.s = s + slice_ds;
442 }
443
449 Map6x6
450 transport_map (RefPart const & AMREX_RESTRICT refpart) const // TODO: update as well, but needs more careful placement of calc_constants
451 {
452 using namespace amrex::literals; // for _rt and _prt
453 using amrex::Math::powi;
454
455 // length of the current slice
456 amrex::ParticleReal const slice_ds = m_ds / nslice();
457
458 // access reference particle values to find beta*gamma^2
459 amrex::ParticleReal const pt_ref = refpart.pt;
460 amrex::ParticleReal const betgam2 = powi<2>(pt_ref) - 1.0_prt;
461
462 // compute phase advance per unit length in s (in rad/m)
463 amrex::ParticleReal const omega = std::sqrt(std::abs(m_k));
464
465 // initialize linear map matrix elements
467
468 if (m_k > 0.0_prt) {
469 R(1,1) = std::cos(omega*slice_ds);
470 R(1,2) = std::sin(omega*slice_ds)/omega;
471 R(2,1) = -omega*std::sin(omega*slice_ds);
472 R(2,2) = std::cos(omega*slice_ds);
473 R(3,3) = std::cosh(omega*slice_ds);
474 R(3,4) = std::sinh(omega*slice_ds)/omega;
475 R(4,3) = omega*std::sinh(omega*slice_ds);
476 R(4,4) = std::cosh(omega*slice_ds);
477 R(5,6) = slice_ds/betgam2;
478 } else if (m_k < 0.0_prt) {
479 R(1,1) = std::cosh(omega*slice_ds);
480 R(1,2) = std::sinh(omega*slice_ds)/omega;
481 R(2,1) = omega*std::sinh(omega*slice_ds);
482 R(2,2) = std::cosh(omega*slice_ds);
483 R(3,3) = std::cos(omega*slice_ds);
484 R(3,4) = std::sin(omega*slice_ds)/omega;
485 R(4,3) = -omega*std::sin(omega*slice_ds);
486 R(4,4) = std::cos(omega*slice_ds);
487 R(5,6) = slice_ds/betgam2;
488 } else {
489 R(1,2) = m_slice_ds;
490 R(3,4) = m_slice_ds;
491 R(5,6) = m_slice_ds / betgam2;
492 }
493
494 return R;
495 }
496
497
512 template<typename T_Real=amrex::ParticleReal, typename T_IdCpu=uint64_t>
515 T_Real & AMREX_RESTRICT x,
516 T_Real & AMREX_RESTRICT y,
517 T_Real & AMREX_RESTRICT t,
518 T_Real & AMREX_RESTRICT px,
519 T_Real & AMREX_RESTRICT py,
520 T_Real & AMREX_RESTRICT pt,
521 T_Real & AMREX_RESTRICT sx,
522 T_Real & AMREX_RESTRICT sy,
523 T_Real & AMREX_RESTRICT sz,
524 T_IdCpu & AMREX_RESTRICT idcpu,
525 [[maybe_unused]] RefPart const & AMREX_RESTRICT refpart
526 ) const
527 {
528 using namespace amrex::literals; // for _rt and _prt
529
530 // shift due to alignment errors of the element
531 shift_in(x, y, px, py);
532
533 // numerical integration parameters
534 amrex::ParticleReal const zin = 0_prt;
535 amrex::ParticleReal const zout = m_slice_ds;
536 int const nsteps = m_mapsteps;
537
538 // initialize phase space 6-vector
540 x, px, y, py, t, pt
541 };
542
543 // initialize spin 3-vector
545 sx, sy, sz
546 };
547
548 // call integrator to advance through slice
549 integrators::symp_integrate_particle_spin(particle,particle_spin,zin,zout,nsteps,m_int_order,*this);
550
551 // assign updated values
552 x = particle(1);
553 px = particle(2);
554 y = particle(3);
555 py = particle(4);
556 t = particle(5);
557 pt = particle(6);
558 sx = particle_spin(1);
559 sy = particle_spin(2);
560 sz = particle_spin(3);
561
562 // apply transverse aperture
563 apply_aperture(x, y, idcpu);
564
565 // undo shift due to alignment errors of the element
566 shift_out(x, y, px, py);
567 }
568
570 using LinearTransport::operator();
571
573 int m_unit;
576
577 private:
578 // constants that are independent of the individually tracked particle,
579 // see: compute_constants() to refresh
589 };
590
591} // namespace impactx
592
594
595#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 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, T_Element const &element)
Definition Integrators.H:477
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, T_Element const &element)
Definition Integrators.H:225
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, T_Element const &element)
Definition Integrators.H:284
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, T_Element const &element)
Definition Integrators.H:178
@ 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:261
amrex::ParticleReal gyromagnetic_anomaly
anomalous magnetic moment [unitless]
Definition ReferenceParticle.H:45
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal beta() const
Definition ReferenceParticle.H:152
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal gamma() const
Definition ReferenceParticle.H:140
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:582
amrex::ParticleReal m_slice_ds
number of integration steps per slice
Definition ExactQuad.H:580
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) const
Definition ExactQuad.H:339
int m_int_order
unit specification for quad strength
Definition ExactQuad.H:574
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 &AMREX_RESTRICT idcpu, RefPart const &AMREX_RESTRICT refpart) const
Definition ExactQuad.H:514
int m_mapsteps
order used for the symplectic integration (2 or 4)
Definition ExactQuad.H:575
amrex::ParticleReal m_gyro_anomaly
gamma
Definition ExactQuad.H:588
amrex::ParticleReal m_omega
quadrupole strength in 1/m^2
Definition ExactQuad.H:586
amrex::ParticleReal m_ibeta
beta
Definition ExactQuad.H:584
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void map1(amrex::ParticleReal const tau, amrex::SmallVector< T_Real, 6, 1 > &particle, amrex::ParticleReal &zeval) const
Definition ExactQuad.H:216
amrex::ParticleReal m_beta
1 / m_betgam2
Definition ExactQuad.H:583
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void map2(amrex::ParticleReal const tau, amrex::SmallVector< T_Real, 6, 1 > &particle, amrex::ParticleReal &zeval) const
Definition ExactQuad.H:295
amrex::ParticleReal m_g
1 / m_beta
Definition ExactQuad.H:585
ImpactXParticleContainer::ParticleType PType
Definition ExactQuad.H:47
int m_unit
quadrupole strength in 1/m^2 (or T/m)
Definition ExactQuad.H:573
amrex::ParticleReal m_gamma_ref
Definition ExactQuad.H:587
amrex::ParticleReal m_k
Definition ExactQuad.H:572
AMREX_GPU_HOST AMREX_FORCE_INLINE Map6x6 transport_map(RefPart const &AMREX_RESTRICT refpart) const
Definition ExactQuad.H:450
void reverse()
Definition ExactQuad.H:98
amrex::ParticleReal m_betgam2
m_ds / nslice();
Definition ExactQuad.H:581
static constexpr auto type
Definition ExactQuad.H:46
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 &AMREX_RESTRICT idcpu, RefPart const &AMREX_RESTRICT refpart) const
Definition ExactQuad.H:153
Definition alignment.H:27
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void shift_out(T_Real &AMREX_RESTRICT x, T_Real &AMREX_RESTRICT y, T_Real &AMREX_RESTRICT px, T_Real &AMREX_RESTRICT py) const
Definition alignment.H:109
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal dy() const
Definition alignment.H:146
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal dx() const
Definition alignment.H:136
Alignment(amrex::ParticleReal dx, amrex::ParticleReal dy, amrex::ParticleReal rotation_degree)
Definition alignment.H:36
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void shift_in(T_Real &AMREX_RESTRICT x, T_Real &AMREX_RESTRICT y, T_Real &AMREX_RESTRICT px, T_Real &AMREX_RESTRICT py) const
Definition alignment.H:78
Definition beamoptic.H:436
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 void apply_aperture(T_Real &AMREX_RESTRICT x, T_Real &AMREX_RESTRICT y, T_IdCpu &AMREX_RESTRICT idcpu) const
Definition pipeaperture.H:59
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