ImpactX
Loading...
Searching...
No Matches
SoftSol.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_SOFTSOL_H
11#define IMPACTX_SOFTSOL_H
12
15#include "mixin/alignment.H"
16#include "mixin/pipeaperture.H"
17#include "mixin/beamoptic.H"
19#include "mixin/named.H"
20#include "mixin/thick.H"
21
22#include <ablastr/constant.H>
23
24#include <AMReX.H>
25#include <AMReX_Extension.H>
26#include <AMReX_Math.H>
27#include <AMReX_REAL.H>
28#include <AMReX_SIMD.H>
29#include <AMReX_SmallMatrix.H>
30
31#include <cmath>
32#include <stdexcept>
33#include <tuple>
34#include <vector>
35
36
37namespace impactx::elements
38{
52 {
54 0.350807812299706,
55 0.323554693720069,
56 0.260320578919415,
57 0.182848575294969,
58 0.106921016050403,
59 4.409581845710694E-002,
60 -9.416427163897508E-006,
61 -2.459452716865687E-002,
62 -3.272762575737291E-002,
63 -2.936414401076162E-002,
64 -1.995780078926890E-002,
65 -9.102893342953847E-003,
66 -2.456410658713271E-006,
67 5.788233017324325E-003,
68 8.040408292420691E-003,
69 7.480064552867431E-003,
70 5.230254569468851E-003,
71 2.447614547094685E-003,
72 -1.095525090532255E-006,
73 -1.614586867387170E-003,
74 -2.281365457438345E-003,
75 -2.148709081338292E-003,
76 -1.522541739363011E-003,
77 -7.185505862719508E-004,
78 -6.171194824600157E-007,
79 4.842109305036943E-004,
80 6.874508102002901E-004,
81 6.535550288205728E-004,
82 4.648795813759210E-004,
83 2.216564722797528E-004,
84 -4.100982995210341E-007,
85 -1.499332112463395E-004,
86 -2.151538438342482E-004,
87 -2.044590946652016E-004,
88 -1.468242784844341E-004
89 };
90
92 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
93 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
94 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
95 0, 0, 0, 0, 0
96 };
97 };
98
106{
108 inline int next_id = 0;
109
111 inline std::map<int, std::vector<amrex::ParticleReal>> h_cos_coef = {};
113 inline std::map<int, std::vector<amrex::ParticleReal>> h_sin_coef = {};
114
116 inline std::map<int, amrex::Gpu::DeviceVector<amrex::ParticleReal>> d_cos_coef = {};
118 inline std::map<int, amrex::Gpu::DeviceVector<amrex::ParticleReal>> d_sin_coef = {};
119
120} // namespace SoftSolenoidData
121
123 : public mixin::Named,
124 public mixin::BeamOptic<SoftSolenoid>,
125 public mixin::LinearTransport<SoftSolenoid>,
126 public mixin::Thick,
127 public mixin::Alignment,
128 public mixin::PipeAperture,
129 public amrex::simd::Vectorized<amrex::simd::native_simd_size_particlereal>
130 {
131 static constexpr auto type = "SoftSolenoid";
133
156 amrex::ParticleReal ds,
157 amrex::ParticleReal bscale,
158 std::vector<amrex::ParticleReal> cos_coef,
159 std::vector<amrex::ParticleReal> sin_coef,
160 int unit,
161 amrex::ParticleReal dx = 0,
162 amrex::ParticleReal dy = 0,
163 amrex::ParticleReal rotation_degree = 0,
164 amrex::ParticleReal aperture_x = 0,
165 amrex::ParticleReal aperture_y = 0,
166 int mapsteps = 1,
167 int nslice = 1,
168 std::optional<std::string> name = std::nullopt
169 )
170 : Named(std::move(name)),
171 Thick(ds, nslice),
172 Alignment(dx, dy, rotation_degree),
174 m_bscale(bscale), m_unit(unit), m_mapsteps(mapsteps), m_id(SoftSolenoidData::next_id)
175 {
176 // next created soft solenoid has another id for its data
178
179 // validate sin and cos coefficients are the same length
180 m_ncoef = int(cos_coef.size());
181 if (m_ncoef != int(sin_coef.size()))
182 throw std::runtime_error("SoftSolenoid: cos and sin coefficients must have same length!");
183
184 // host data
189
190 // device data
194 cos_coef.begin(), cos_coef.end(),
197 sin_coef.begin(), sin_coef.end(),
200
201 // low-level objects we can use on device
204 }
205
207 using BeamOptic::operator();
208
216 void compute_constants (RefPart const & refpart)
217 {
218 using namespace amrex::literals; // for _rt and _prt
219
220 Alignment::compute_constants(refpart);
221 }
222
237 template<typename T_Real=amrex::ParticleReal, typename T_IdCpu=uint64_t>
240 T_Real & AMREX_RESTRICT x,
241 T_Real & AMREX_RESTRICT y,
242 T_Real & AMREX_RESTRICT t,
243 T_Real & AMREX_RESTRICT px,
244 T_Real & AMREX_RESTRICT py,
245 T_Real & AMREX_RESTRICT pt,
246 T_IdCpu & AMREX_RESTRICT idcpu,
247 RefPart const & AMREX_RESTRICT refpart
248 ) const
249 {
250 using namespace amrex::literals; // for _rt and _prt
251
252 // shift due to alignment errors of the element
253 shift_in(x, y, px, py);
254
255 // get the linear map
257
258 // symplectic linear map for a solenoid is computed using the
259 // Hamiltonian formalism as described in:
260 // https://uspas.fnal.gov/materials/09UNM/ComputationalMethods.pdf.
261 // R denotes the transfer matrix in the basis (x,px,y,py,t,pt),
262 // so that, e.g., R(3,4) = dyf/dpyi.
263 amrex::SmallVector<T_Real, 6, 1> const v{x, px, y, py, t, pt};
264
265 // push particles using the linear map
266 auto const out = R * v;
267
268 // assign updated values
269 x = out[1];
270 px = out[2];
271 y = out[3];
272 py = out[4];
273 t = out[5];
274 pt = out[6];
275
276 // apply transverse aperture
277 apply_aperture(x, y, idcpu);
278
279 // undo shift due to alignment errors of the element
280 shift_out(x, y, px, py);
281 }
282
288 void operator() (RefPart & AMREX_RESTRICT refpart) const
289 {
290 using namespace amrex::literals; // for _rt and _prt
291 using amrex::Math::powi;
292
293 // assign input reference particle values
294 amrex::ParticleReal const x = refpart.x;
295 amrex::ParticleReal const px = refpart.px;
296 amrex::ParticleReal const y = refpart.y;
297 amrex::ParticleReal const py = refpart.py;
298 amrex::ParticleReal const z = refpart.z;
299 amrex::ParticleReal const pz = refpart.pz;
300 amrex::ParticleReal const pt = refpart.pt;
301 amrex::ParticleReal const s = refpart.s;
302 amrex::ParticleReal const sedge = refpart.sedge;
303
304 // initialize linear map (deviation) values
305 refpart.map = decltype(refpart.map)::Identity();
306
307 // length of the current slice
308 amrex::ParticleReal const slice_ds = m_ds / nslice();
309
310 // compute initial value of beta*gamma
311 amrex::ParticleReal const bgi = std::sqrt(powi<2>(pt) - 1.0_prt);
312
313 // call integrator to advance (t,pt)
314 amrex::ParticleReal const zin = s - sedge;
315 amrex::ParticleReal const zout = zin + slice_ds;
316 int const nsteps = m_mapsteps;
317
318 integrators::symp2_integrate_split3(refpart,zin,zout,nsteps,*this);
319 amrex::ParticleReal const ptf = refpart.pt;
320
321 /* print computed linear map:
322 for(int i=1; i<7; ++i){
323 for(int j=1; j<7; ++j){
324 amrex::PrintToFile("SolMap.txt") << i << " " <<
325 j << " " << refpart.map(i,j) << "\n";
326 }
327 }
328 */
329
330 // advance position (x,y,z)
331 refpart.x = x + slice_ds*px/bgi;
332 refpart.y = y + slice_ds*py/bgi;
333 refpart.z = z + slice_ds*pz/bgi;
334
335 // compute final value of beta*gamma
336 amrex::ParticleReal const bgf = std::sqrt(powi<2>(ptf) - 1.0_prt);
337
338 // advance momentum (px,py,pz)
339 refpart.px = px*bgf/bgi;
340 refpart.py = py*bgf/bgi;
341 refpart.pz = pz*bgf/bgi;
342
343 // advance integrated path length
344 refpart.s = s + slice_ds;
345 }
346
348 using LinearTransport::operator();
349
356 Map6x6
357 transport_map ([[maybe_unused]] RefPart const & AMREX_RESTRICT refpart) const
358 {
359
361 R = refpart.map;
362
363 return R;
364 }
365
372 std::tuple<amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal>
374 Sol_Bfield (amrex::ParticleReal const zeval) const
375 {
376 using namespace amrex::literals; // for _rt and _prt
377
378 // pick the right data depending if we are on the host side
379 // (reference particle push) or device side (particles):
380#if AMREX_DEVICE_COMPILE
381 amrex::ParticleReal* cos_data = m_cos_d_data;
382 amrex::ParticleReal* sin_data = m_sin_d_data;
383#else
384 amrex::ParticleReal* cos_data = m_cos_h_data;
385 amrex::ParticleReal* sin_data = m_sin_h_data;
386#endif
387
388 // specify constants
390 amrex::ParticleReal const zlen = m_ds;
391 amrex::ParticleReal const zmid = zlen * 0.5_prt;
392
393 // compute on-axis magnetic field (z is relative to solenoid midpoint)
394 amrex::ParticleReal bfield = 0.0;
395 amrex::ParticleReal bfieldp = 0.0;
396 amrex::ParticleReal bfieldint = 0.0;
397 amrex::ParticleReal const z = zeval - zmid;
398
399 if (std::abs(z) <= zmid)
400 {
401 bfield = 0.5_prt*cos_data[0];
402 bfieldint = z*bfield;
403 for (int j=1; j < m_ncoef; ++j)
404 {
405 bfield = bfield + cos_data[j] * std::cos(j*2*pi*z/zlen) +
406 sin_data[j] * std::sin(j*2*pi*z/zlen);
407 bfieldp = bfieldp-j*2*pi*cos_data[j] * std::sin(j*2*pi*z/zlen)/zlen +
408 j*2*pi*sin_data[j] * std::cos(j*2*pi*z/zlen)/zlen;
409 bfieldint = bfieldint + zlen*cos_data[j] * std::sin(j*2*pi*z/zlen)/(j*2*pi) -
410 zlen*sin_data[j] * std::cos(j*2*pi*z/zlen)/(j*2*pi);
411 }
412 }
413 return std::make_tuple(bfield, bfieldp, bfieldint);
414 }
415
425 void map1 (amrex::ParticleReal const tau,
426 RefPart & refpart,
427 [[maybe_unused]] amrex::ParticleReal & zeval) const
428 {
429 using namespace amrex::literals; // for _rt and _prt
430 using amrex::Math::powi;
431
432 // push the reference particle
433 amrex::ParticleReal const t = refpart.t;
434 amrex::ParticleReal const pt = refpart.pt;
435 amrex::ParticleReal const z = zeval;
436
437 if (pt < -1.0_prt) {
438 refpart.t = t + tau/std::sqrt(1.0_prt - powi<-2>(pt));
439 refpart.pt = pt;
440 }
441 else {
442 refpart.t = t;
443 refpart.pt = pt;
444 }
445
446 zeval = z + tau;
447
448 // push the linear map equations
450 amrex::ParticleReal const betgam = refpart.beta_gamma();
451
452 refpart.map(1,1) = R(1,1) + tau*R(2,1);
453 refpart.map(1,2) = R(1,2) + tau*R(2,2);
454 refpart.map(1,3) = R(1,3) + tau*R(2,3);
455 refpart.map(1,4) = R(1,4) + tau*R(2,4);
456
457 refpart.map(3,1) = R(3,1) + tau*R(4,1);
458 refpart.map(3,2) = R(3,2) + tau*R(4,2);
459 refpart.map(3,3) = R(3,3) + tau*R(4,3);
460 refpart.map(3,4) = R(3,4) + tau*R(4,4);
461
462 refpart.map(5,5) = R(5,5) + tau*R(6,5)/powi<2>(betgam);
463 refpart.map(5,6) = R(5,6) + tau*R(6,6)/powi<2>(betgam);
464
465 }
466
476 void map2 (amrex::ParticleReal const tau,
477 RefPart & refpart,
478 amrex::ParticleReal & zeval) const
479 {
480 using namespace amrex::literals; // for _rt and _prt
481 using amrex::Math::powi;
482
483 amrex::ParticleReal const t = refpart.t;
484 amrex::ParticleReal const pt = refpart.pt;
485
486 // Define parameters and intermediate constants
487 amrex::ParticleReal const B0 =
488 m_unit == 1 ?
489 m_bscale / refpart.rigidity_Tm() :
490 m_bscale;
491
492 // push the reference particle
493 auto [bz, bzp, bzint] = Sol_Bfield(zeval);
494 amrex::ignore_unused(bzp, bzint);
495
496 refpart.t = t;
497 refpart.pt = pt;
498
499 // push the linear map equations
501 amrex::ParticleReal const alpha = B0*bz*0.5_prt;
502 amrex::ParticleReal const alpha2 = powi<2>(alpha);
503
504 refpart.map(2,1) = R(2,1) - tau*alpha2*R(1,1);
505 refpart.map(2,2) = R(2,2) - tau*alpha2*R(1,2);
506 refpart.map(2,3) = R(2,3) - tau*alpha2*R(1,3);
507 refpart.map(2,4) = R(2,4) - tau*alpha2*R(1,4);
508
509 refpart.map(4,1) = R(4,1) - tau*alpha2*R(3,1);
510 refpart.map(4,2) = R(4,2) - tau*alpha2*R(3,2);
511 refpart.map(4,3) = R(4,3) - tau*alpha2*R(3,3);
512 refpart.map(4,4) = R(4,4) - tau*alpha2*R(3,4);
513
514 }
515
525 void map3 (amrex::ParticleReal const tau,
526 RefPart & refpart,
527 amrex::ParticleReal & zeval) const
528 {
529 using namespace amrex::literals; // for _rt and _prt
530
531 amrex::ParticleReal const t = refpart.t;
532 amrex::ParticleReal const pt = refpart.pt;
533 amrex::ParticleReal const z = zeval;
534
535 // Define parameters and intermediate constants
536 amrex::ParticleReal const B0 =
537 m_unit == 1 ?
538 m_bscale / refpart.rigidity_Tm() :
539 m_bscale;
540
541 // push the reference particle
542 auto [bz, bzp, bzint] = Sol_Bfield(z);
543 amrex::ignore_unused(bzp, bzint);
544
545 refpart.t = t;
546 refpart.pt = pt;
547
548 // push the linear map equations
550 amrex::ParticleReal const theta = tau*B0*bz*0.5_prt;
551 amrex::ParticleReal const cs = std::cos(theta);
552 amrex::ParticleReal const sn = std::sin(theta);
553
554 refpart.map(1,1) = R(1,1)*cs + R(3,1)*sn;
555 refpart.map(1,2) = R(1,2)*cs + R(3,2)*sn;
556 refpart.map(1,3) = R(1,3)*cs + R(3,3)*sn;
557 refpart.map(1,4) = R(1,4)*cs + R(3,4)*sn;
558
559 refpart.map(2,1) = R(2,1)*cs + R(4,1)*sn;
560 refpart.map(2,2) = R(2,2)*cs + R(4,2)*sn;
561 refpart.map(2,3) = R(2,3)*cs + R(4,3)*sn;
562 refpart.map(2,4) = R(2,4)*cs + R(4,4)*sn;
563
564 refpart.map(3,1) = R(3,1)*cs - R(1,1)*sn;
565 refpart.map(3,2) = R(3,2)*cs - R(1,2)*sn;
566 refpart.map(3,3) = R(3,3)*cs - R(1,3)*sn;
567 refpart.map(3,4) = R(3,4)*cs - R(1,4)*sn;
568
569 refpart.map(4,1) = R(4,1)*cs - R(2,1)*sn;
570 refpart.map(4,2) = R(4,2)*cs - R(2,2)*sn;
571 refpart.map(4,3) = R(4,3)*cs - R(2,3)*sn;
572 refpart.map(4,4) = R(4,4)*cs - R(2,4)*sn;
573
574 }
575
578 void
580 {
581 // remove from unique data map
582 if (SoftSolenoidData::h_cos_coef.count(m_id) != 0u)
584 if (SoftSolenoidData::h_sin_coef.count(m_id) != 0u)
586
587 if (SoftSolenoidData::d_cos_coef.count(m_id) != 0u)
589 if (SoftSolenoidData::d_sin_coef.count(m_id) != 0u)
591 }
592
593 amrex::ParticleReal m_bscale;
594 int m_unit;
596 int m_id;
597
598 int m_ncoef = 0;
599 amrex::ParticleReal* m_cos_h_data = nullptr;
600 amrex::ParticleReal* m_sin_h_data = nullptr;
601 amrex::ParticleReal* m_cos_d_data = nullptr;
602 amrex::ParticleReal* m_sin_d_data = nullptr;
603 };
604
605} // namespace impactx
606
607#endif // IMPACTX_SOFTSOL_H
#define AMREX_FORCE_INLINE
#define AMREX_RESTRICT
#define AMREX_GPU_HOST_DEVICE
#define AMREX_GPU_HOST
static constexpr amrex::Real pi
void copyAsync(HostToDevice, InIter begin, InIter end, OutIter result) noexcept
static constexpr HostToDevice hostToDevice
void streamSynchronize() noexcept
PODVector< T, ArenaAllocator< T > > DeviceVector
constexpr T powi(T x) noexcept
__host__ __device__ void ignore_unused(const Ts &...)
SmallMatrix< T, N, 1, Order::F, StartIndex > SmallVector
Definition SoftSol.H:106
std::map< int, amrex::Gpu::DeviceVector< amrex::ParticleReal > > d_cos_coef
device: cosine coefficients in Fourier expansion of on-axis magnetic field Bz
Definition SoftSol.H:116
std::map< int, std::vector< amrex::ParticleReal > > h_sin_coef
host: sine coefficients in Fourier expansion of on-axis magnetic field Bz
Definition SoftSol.H:113
std::map< int, std::vector< amrex::ParticleReal > > h_cos_coef
host: cosine coefficients in Fourier expansion of on-axis magnetic field Bz
Definition SoftSol.H:111
int next_id
last used id for a created soft solenoid
Definition SoftSol.H:108
std::map< int, amrex::Gpu::DeviceVector< amrex::ParticleReal > > d_sin_coef
device: sine coefficients in Fourier expansion of on-axis magnetic field Bz
Definition SoftSol.H:118
Definition All.H:54
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void symp2_integrate_split3(RefPart &refpart, amrex::ParticleReal const zin, amrex::ParticleReal const zout, int const nsteps, T_Element const &element)
Definition Integrators.H:79
@ 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:31
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal beta_gamma() const
Definition ReferenceParticle.H:110
amrex::ParticleReal pt
energy, normalized by rest energy
Definition ReferenceParticle.H:40
amrex::SmallMatrix< amrex::ParticleReal, 6, 6, amrex::Order::F, 1 > map
linearized map
Definition ReferenceParticle.H:45
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal rigidity_Tm() const
Definition ReferenceParticle.H:203
amrex::ParticleReal t
clock time * c in meters
Definition ReferenceParticle.H:36
std::tuple< amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal > AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Sol_Bfield(amrex::ParticleReal const zeval) const
Definition SoftSol.H:374
int m_id
number of map integration steps per slice
Definition SoftSol.H:596
int m_mapsteps
unit specification for quad strength
Definition SoftSol.H:595
void compute_constants(RefPart const &refpart)
Definition SoftSol.H:216
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 SoftSol.H:239
AMREX_GPU_HOST AMREX_FORCE_INLINE Map6x6 transport_map(RefPart const &AMREX_RESTRICT refpart) const
Definition SoftSol.H:357
static constexpr auto type
Definition SoftSol.H:131
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void map3(amrex::ParticleReal const tau, RefPart &refpart, amrex::ParticleReal &zeval) const
Definition SoftSol.H:525
amrex::ParticleReal * m_cos_h_data
number of Fourier coefficients
Definition SoftSol.H:599
void finalize()
Definition SoftSol.H:579
int m_ncoef
unique soft solenoid id used for data lookup map
Definition SoftSol.H:598
ImpactXParticleContainer::ParticleType PType
Definition SoftSol.H:132
SoftSolenoid(amrex::ParticleReal ds, amrex::ParticleReal bscale, std::vector< amrex::ParticleReal > cos_coef, std::vector< amrex::ParticleReal > sin_coef, 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 mapsteps=1, int nslice=1, std::optional< std::string > name=std::nullopt)
Definition SoftSol.H:155
amrex::ParticleReal m_bscale
Definition SoftSol.H:593
amrex::ParticleReal * m_cos_d_data
non-owning pointer to host sine coefficients
Definition SoftSol.H:601
amrex::ParticleReal * m_sin_h_data
non-owning pointer to host cosine coefficients
Definition SoftSol.H:600
int m_unit
scaling factor for solenoid Bz field
Definition SoftSol.H:594
amrex::ParticleReal * m_sin_d_data
non-owning pointer to device cosine coefficients
Definition SoftSol.H:602
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void map2(amrex::ParticleReal const tau, RefPart &refpart, amrex::ParticleReal &zeval) const
Definition SoftSol.H:476
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void map1(amrex::ParticleReal const tau, RefPart &refpart, amrex::ParticleReal &zeval) const
Definition SoftSol.H:425
Definition SoftSol.H:52
amrex::Vector< amrex::ParticleReal > default_sin_coef
Definition SoftSol.H:91
amrex::Vector< amrex::ParticleReal > default_cos_coef
Definition SoftSol.H:53
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:219
Definition lineartransport.H:29
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 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 thick.H:24
Thick(amrex::ParticleReal ds, int nslice)
Definition thick.H:30
amrex::ParticleReal m_ds
Definition thick.H:58
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