ImpactX
Loading...
Searching...
No Matches
ExactQuad.H
Go to the documentation of this file.
1/* Copyright 2022-2026 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
32namespace impactx::elements
33{
34 struct ExactQuad
35 : public mixin::Named,
36 public mixin::BeamOptic<ExactQuad>,
37 public mixin::LinearTransport<ExactQuad>,
38 public mixin::Thick,
39 public mixin::Alignment,
42 public mixin::NoFinalize,
43 public amrex::simd::Vectorized<amrex::simd::native_simd_size_particlereal>
44 {
45 static constexpr auto type = "ExactQuad";
47
48 static constexpr int DEFAULT_unit = 0;
49 static constexpr int DEFAULT_int_order = 2;
50 static constexpr int DEFAULT_mapsteps = 10;
51
81 int unit = DEFAULT_unit,
87 int int_order = DEFAULT_int_order,
88 int mapsteps = DEFAULT_mapsteps,
90 std::optional<std::string> name = DEFAULT_name
91 )
92 : Named(std::move(name)),
93 Thick(ds, nslice),
94 Alignment(dx, dy, rotation_degree),
96 m_k(k),m_unit(unit),m_int_order(int_order),m_mapsteps(mapsteps)
97 {
98 }
99
101 void reverse () { Thick::reverse(); }
102
104 using BeamOptic::operator();
105
113 void compute_constants (RefPart const & refpart)
114 {
115 using namespace amrex::literals; // for _rt and _prt
116 using amrex::Math::powi;
117
118 Alignment::compute_constants(refpart);
119
120 // length of the current slice
121 m_slice_ds = m_ds / nslice();
122
123 // find beta*gamma^2
124 amrex::ParticleReal const pt_ref = refpart.pt;
125 m_betgam2 = powi<2>(pt_ref) - 1.0_prt;
126 m_ibetgam2 = 1_prt / m_betgam2;
127 m_beta = refpart.beta();
128 m_ibeta = 1_prt / m_beta;
129
130 // normalize quad units to MAD-X convention if needed
131 m_g = m_unit == 1 ? m_k / refpart.rigidity_Tm() : m_k;
132
133 // compute phase advance per unit length in s (in rad/m)
134 m_omega = std::sqrt(std::abs(m_g));
135 }
136
150 template<typename T_Real=amrex::ParticleReal, typename T_IdCpu=uint64_t>
153 T_Real & AMREX_RESTRICT x,
154 T_Real & AMREX_RESTRICT y,
155 T_Real & AMREX_RESTRICT t,
156 T_Real & AMREX_RESTRICT px,
157 T_Real & AMREX_RESTRICT py,
158 T_Real & AMREX_RESTRICT pt,
159 [[maybe_unused]] T_IdCpu const & AMREX_RESTRICT idcpu,
160 RefPart const & AMREX_RESTRICT refpart
161 ) const
162 {
163 using namespace amrex::literals; // for _rt and _prt
164
165 // numerical integration parameters
166 amrex::ParticleReal const zin = 0_prt;
167 amrex::ParticleReal const zout = m_slice_ds;
168 int const nsteps = m_mapsteps;
169
170 // initialize phase space 6-vector
172 x, px, y, py, t, pt
173 };
174
175 // call integrator to advance through slice (int_order = 2 or 4, otherwise default 2)
176 if (m_int_order == 2) {
177 integrators::symp2_integrate_particle(particle,zin,zout,nsteps,refpart,*this);
178 } else if (m_int_order == 4) {
179 integrators::symp4_integrate_particle(particle,zin,zout,nsteps,refpart,*this);
180 } else if (m_int_order == 6) {
181 integrators::symp6_integrate_particle(particle,zin,zout,nsteps,refpart,*this);
182 } else {
183 integrators::symp2_integrate_particle(particle,zin,zout,nsteps,refpart,*this);
184 }
185
186 // assign updated values
187 x = particle(1);
188 px = particle(2);
189 y = particle(3);
190 py = particle(4);
191 t = particle(5);
192 pt = particle(6);
193 }
194
205 template<typename T_Real>
207 void map1 (amrex::ParticleReal const tau,
209 amrex::ParticleReal & zeval,
210 [[maybe_unused]] RefPart const & AMREX_RESTRICT refpart) const
211 {
212 using namespace amrex::literals; // for _rt and _prt
213 using namespace std; // for cmath(float)
214
215 T_Real const x = particle(1);
216 T_Real const px = particle(2);
217 T_Real const y = particle(3);
218 T_Real const py = particle(4);
219 T_Real const t = particle(5);
220 T_Real const pt = particle(6);
221
222 T_Real xout = x;
223 T_Real pxout = px;
224 T_Real yout = y;
225 T_Real pyout = py;
226 T_Real tout = t;
227 T_Real ptout = pt;
228
229 amrex::ParticleReal const sin_omega_ds = sin(m_omega*tau);
230 amrex::ParticleReal const cos_omega_ds = cos(m_omega*tau);
231 amrex::ParticleReal const sinh_omega_ds = sinh(m_omega*tau);
232 amrex::ParticleReal const cosh_omega_ds = cosh(m_omega*tau);
233 amrex::ParticleReal const slice_bg = tau / m_betgam2;
234
235 if (m_g > 0.0_prt)
236 {
237 // advance position and momentum (focusing quad)
238 xout = cos_omega_ds*x + sin_omega_ds/m_omega*px;
239 pxout = -m_omega*sin_omega_ds*x + cos_omega_ds*px;
240
241 yout = cosh_omega_ds*y + sinh_omega_ds/m_omega*py;
242 pyout = m_omega*sinh_omega_ds*y + cosh_omega_ds*py;
243
244 tout = t + slice_bg*pt;
245 // ptout = pt;
246 } else if (m_g < 0.0_prt)
247 {
248 // advance position and momentum (defocusing quad)
249 xout = cosh_omega_ds*x + sinh_omega_ds/m_omega*px;
250 pxout = m_omega*sinh_omega_ds*x + cosh_omega_ds*px;
251
252 yout = cos_omega_ds*y + sin_omega_ds/m_omega*py;
253 pyout = -m_omega*sin_omega_ds*y + cos_omega_ds*py;
254
255 tout = t + slice_bg*pt;
256 // ptout = pt;
257 } else {
258 // advance position and momentum (zero strength = drift)
259 xout = x + tau * px;
260 // pxout = px;
261 yout = y + tau * py;
262 // pyout = py;
263 tout = t + slice_bg * pt;
264 // ptout = pt;
265 }
266
267 // push particle coordinates
268 particle(1) = xout;
269 particle(2) = pxout;
270 particle(3) = yout;
271 particle(4) = pyout;
272 particle(5) = tout;
273 particle(6) = ptout;
274
275 zeval += 0_prt;
276 }
277
287 template<typename T_Real>
289 void map2 (amrex::ParticleReal const tau,
291 amrex::ParticleReal & zeval,
292 [[maybe_unused]] RefPart const & AMREX_RESTRICT refpart) const
293 {
294 using namespace amrex::literals; // for _rt and _prt
295 using namespace std; // for cmath(float)
296 using amrex::Math::powi;
297
298 T_Real const x = particle(1);
299 T_Real const px = particle(2);
300 T_Real const y = particle(3);
301 T_Real const py = particle(4);
302 T_Real const t = particle(5);
303 T_Real const pt = particle(6);
304
305 // compute the radical in the denominator (= pz):
306 T_Real const inv_pzden = 1_prt / sqrt(
307 powi<2>(pt - m_ibeta) -
308 m_ibetgam2 -
309 powi<2>(px) -
310 powi<2>(py)
311 );
312
313 // The momenta are not affected.
314 particle(1) = x + tau * px * (-1_prt + inv_pzden);
315 particle(2) = px;
316 particle(3) = y + tau * py * (-1_prt + inv_pzden);
317 particle(4) = py;
318 particle(5) = t + tau * (-m_ibeta - m_ibetgam2*pt + inv_pzden*(1_prt - pt*m_beta)*m_ibeta);
319 particle(6) = pt;
320
321 zeval += tau;
322 }
323
333 template<typename T_Real>
335 void map3 (amrex::ParticleReal const tau,
337 amrex::SmallVector<T_Real, 3, 1> & particle_spin,
338 amrex::ParticleReal & zeval,
339 RefPart const & AMREX_RESTRICT refpart) const
340 {
341 using namespace amrex::literals; // for _rt and _prt
342 using namespace std; // for cmath(float)
343 using amrex::Math::powi;
344
345 // reference particle relativistic factors
346 amrex::ParticleReal const gamma_ref = refpart.gamma();
347 amrex::ParticleReal const gyro_anomaly = refpart.gyromagnetic_anomaly;
348
349 // initialize the three components of the axis-angle vector
350 T_Real lambdax = 0_prt;
351 T_Real lambday = 0_prt;
352 T_Real lambdaz = 0_prt;
353
354 T_Real const x = particle(1);
355 T_Real const px = particle(2);
356 T_Real const y = particle(3);
357 T_Real const py = particle(4);
358 //T_Real const t = particle(5); // not used
359 T_Real const pt = particle(6);
360 T_Real sx = particle_spin(1);
361 T_Real sy = particle_spin(2);
362 T_Real sz = particle_spin(3);
363
364 // Magnetic field normalized by q/mc:
365 T_Real const Bx = m_g * y * m_beta * gamma_ref;
366 T_Real const By = m_g * x * m_beta * gamma_ref;
367 T_Real const Bz = 0_prt;
368
369 // Electric field normalized by q/mc^2:
370 T_Real const Ex = 0.0_prt;
371 T_Real const Ey = 0.0_prt;
372 T_Real const Ez = 0.0_prt;
373
374 // Quantities required to evaluate the full Thomas-BMT precession vector.
375 T_Real const Pnorm = sqrt(1_prt - 2_prt * pt * m_ibeta + pt*pt);
376 T_Real const iPnorm = 1_prt/Pnorm;
377 T_Real const Ps = sqrt(Pnorm*Pnorm - px*px - py*py);
378 T_Real const gamma = gamma_ref * (1_prt - pt*m_beta);
379 T_Real const ux = px * iPnorm;
380 T_Real const uy = py * iPnorm;
381 T_Real const uz = Ps * iPnorm;
382
383 // Zero curvature in a quadrupole
384 amrex::ParticleReal const h = 0.0_prt;
385
386 // Evaluation of the full Thomas-BMT precession vector.
387 tbmt_precession_vector(x,ux,uy,uz,gamma,h,gyro_anomaly,Bx,By,Bz,Ex,Ey,Ez,lambdax,lambday,lambdaz);
388
389 // Generator of the spin rotation for a single step
390 lambdax *= tau;
391 lambday *= tau;
392 lambdaz *= tau;
393
394 // push the spin vector using the generator just determined
395 rotate_spin(lambdax,lambday,lambdaz,sx,sy,sz);
396
397 // update the spin variables
398 particle_spin(1) = sx;
399 particle_spin(2) = sy;
400 particle_spin(3) = sz;
401
402 // The coordinates and momenta are not affected.
403
404 zeval += 0_prt;
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 // apply the transverse rotation (roll) alignment error
495 return rotate_aligned_map(R);
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 [[maybe_unused]] T_IdCpu const & AMREX_RESTRICT idcpu,
525 RefPart const & AMREX_RESTRICT refpart
526 ) const
527 {
528 using namespace amrex::literals; // for _rt and _prt
529
530 // numerical integration parameters
531 amrex::ParticleReal const zin = 0_prt;
532 amrex::ParticleReal const zout = m_slice_ds;
533 int const nsteps = m_mapsteps;
534
535 // initialize phase space 6-vector
537 x, px, y, py, t, pt
538 };
539
540 // initialize spin 3-vector
542 sx, sy, sz
543 };
544
545 // call integrator to advance through slice
546 integrators::symp_integrate_particle_spin(particle,particle_spin,zin,zout,nsteps,m_int_order,refpart,*this);
547
548 // assign updated values
549 x = particle(1);
550 px = particle(2);
551 y = particle(3);
552 py = particle(4);
553 t = particle(5);
554 pt = particle(6);
555 sx = particle_spin(1);
556 sy = particle_spin(2);
557 sz = particle_spin(3);
558 }
559
561 using LinearTransport::operator();
562
564 int m_unit;
567
568 private:
569 // constants that are independent of the individually tracked particle,
570 // see: compute_constants() to refresh
578 };
579
580} // namespace impactx
581
583
584#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:55
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:44
void compute_constants(RefPart const &refpart)
Definition ExactQuad.H:113
amrex::ParticleReal m_ibetgam2
beta*gamma^2
Definition ExactQuad.H:573
amrex::ParticleReal m_slice_ds
number of integration steps per slice
Definition ExactQuad.H:571
int m_int_order
unit specification for quad strength
Definition ExactQuad.H:565
int m_mapsteps
order used for the symplectic integration (2 or 4)
Definition ExactQuad.H:566
static constexpr int DEFAULT_int_order
Definition ExactQuad.H:49
ExactQuad(amrex::ParticleReal ds, amrex::ParticleReal k, int unit=DEFAULT_unit, amrex::ParticleReal dx=DEFAULT_dx, amrex::ParticleReal dy=DEFAULT_dy, amrex::ParticleReal rotation_degree=DEFAULT_rotation_degree, amrex::ParticleReal aperture_x=DEFAULT_aperture_x, amrex::ParticleReal aperture_y=DEFAULT_aperture_y, int int_order=DEFAULT_int_order, int mapsteps=DEFAULT_mapsteps, int nslice=DEFAULT_nslice, std::optional< std::string > name=DEFAULT_name)
Definition ExactQuad.H:78
amrex::ParticleReal m_omega
quadrupole strength in 1/m^2
Definition ExactQuad.H:577
amrex::ParticleReal m_ibeta
beta
Definition ExactQuad.H:575
static constexpr int DEFAULT_mapsteps
Definition ExactQuad.H:50
static constexpr int DEFAULT_unit
Definition ExactQuad.H:48
amrex::ParticleReal m_beta
1 / m_betgam2
Definition ExactQuad.H:574
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:152
amrex::ParticleReal m_g
1 / m_beta
Definition ExactQuad.H:576
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:289
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:207
ImpactXParticleContainer::ParticleType PType
Definition ExactQuad.H:46
int m_unit
quadrupole strength in 1/m^2 (or T/m)
Definition ExactQuad.H:564
amrex::ParticleReal m_k
Definition ExactQuad.H:563
AMREX_GPU_HOST AMREX_FORCE_INLINE Map6x6 transport_map(RefPart const &AMREX_RESTRICT refpart) const
Definition ExactQuad.H:450
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:335
void reverse()
Definition ExactQuad.H:101
amrex::ParticleReal m_betgam2
m_ds / nslice();
Definition ExactQuad.H:572
static constexpr auto type
Definition ExactQuad.H:45
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:514
Definition alignment.H:29
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal dy() const
Definition alignment.H:193
static constexpr amrex::ParticleReal DEFAULT_dy
Definition alignment.H:34
static constexpr amrex::ParticleReal DEFAULT_dx
Definition alignment.H:33
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal dx() const
Definition alignment.H:183
AMREX_GPU_HOST AMREX_FORCE_INLINE Map6x6 rotate_aligned_map(Map6x6 const &R) const
Definition alignment.H:267
Alignment(amrex::ParticleReal dx, amrex::ParticleReal dy, amrex::ParticleReal rotation_degree)
Definition alignment.H:43
static constexpr amrex::ParticleReal DEFAULT_rotation_degree
Definition alignment.H:35
Definition beamoptic.H:567
Definition lineartransport.H:50
Definition named.H:29
static constexpr std::nullopt_t DEFAULT_name
Definition named.H:30
AMREX_GPU_HOST Named(std::optional< std::string > name)
Definition named.H:59
AMREX_FORCE_INLINE std::string name() const
Definition named.H:124
Definition nofinalize.H:22
Definition pipeaperture.H:26
static constexpr amrex::ParticleReal DEFAULT_aperture_x
Definition pipeaperture.H:27
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal aperture_x() const
Definition pipeaperture.H:93
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal aperture_y() const
Definition pipeaperture.H:104
static constexpr amrex::ParticleReal DEFAULT_aperture_y
Definition pipeaperture.H:28
PipeAperture(amrex::ParticleReal aperture_x, amrex::ParticleReal aperture_y)
Definition pipeaperture.H:35
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
static constexpr int DEFAULT_nslice
Definition thick.H:25
Thick(amrex::ParticleReal ds, int nslice)
Definition thick.H:32
amrex::ParticleReal m_ds
Definition thick.H:70
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal ds() const
Definition thick.H:55
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int nslice() const
Definition thick.H:45