ImpactX
Loading...
Searching...
No Matches
SoftQuad.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_SOFTQUAD_H
11#define IMPACTX_SOFTQUAD_H
12
15#include "mixin/alignment.H"
16#include "mixin/beamoptic.H"
17#include "mixin/dynamicdata.H"
19#include "mixin/named.H"
20#include "mixin/nofinalize.H"
21#include "mixin/pipeaperture.H"
22#include "mixin/thick.H"
23#include "mixin/spintransport.H"
24
25#include <ablastr/constant.H>
26
27#include <AMReX.H>
28#include <AMReX_Extension.H>
29#include <AMReX_Math.H>
30#include <AMReX_REAL.H>
31#include <AMReX_SIMD.H>
32#include <AMReX_SmallMatrix.H>
33#include <AMReX_TrackedVector.H>
34
35#include <cmath>
36#include <memory>
37#include <stdexcept>
38#include <tuple>
39#include <vector>
40
41namespace impactx::elements
42{
62 {
64 0.834166514794446,
65 0.598104328994702,
66 0.141852844428785,
67 -0.118211272182381,
68 -9.056149864743113E-002,
69 1.803476331179615E-002,
70 4.464887700797893E-002,
71 7.364410636252136E-003,
72 -1.697541023436736E-002,
73 -9.012679515542771E-003,
74 4.367667630047725E-003,
75 5.444030542119803E-003,
76 -5.889959910931886E-005,
77 -2.409098101409192E-003,
78 -7.962712154165590E-004,
79 7.855814707106538E-004,
80 6.174930463182168E-004,
81 -1.340154094301854E-004,
82 -3.167213724698439E-004,
83 -4.925292460592617E-005,
84 1.221580597451921E-004,
85 6.331025910961789E-005,
86 -3.202416719002774E-005,
87 -3.872103053895529E-005,
88 8.212882937116278E-007
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
95 };
96 };
97
108
110 : public mixin::Named,
111 public mixin::BeamOptic<SoftQuadrupole>,
112 public mixin::LinearTransport<SoftQuadrupole>,
113 public mixin::Thick,
114 public mixin::Alignment,
115 public mixin::NoFinalize,
116 public mixin::PipeAperture,
118 public amrex::simd::Vectorized<amrex::simd::native_simd_size_particlereal>
119 {
120 static constexpr auto type = "SoftQuadrupole";
122
124
125 static constexpr int DEFAULT_mapsteps = 10;
126
145 amrex::ParticleReal gscale,
146 std::vector<amrex::ParticleReal> cos_coef,
147 std::vector<amrex::ParticleReal> sin_coef,
153 int mapsteps = DEFAULT_mapsteps,
155 std::optional<std::string> name = DEFAULT_name
156 )
157 : Named(std::move(name)),
158 Thick(ds, nslice),
159 Alignment(dx, dy, rotation_degree),
161 m_gscale(gscale), m_mapsteps(mapsteps),
162 m_id(DynamicData::allocate_id())
163 {
164 m_ncoef = int(cos_coef.size());
165 if (m_ncoef != int(sin_coef.size()))
166 throw std::runtime_error("SoftQuadrupole: cos and sin coefficients must have same length!");
167
168 auto& coef = DynamicData::emplace(
169 m_id,
170 std::move(cos_coef),
171 std::move(sin_coef)
172 );
173 m_cos_h_data = coef.cos.host_const().data();
174 m_sin_h_data = coef.sin.host_const().data();
175 }
176
178 void reverse () {
179 // Reversing ds traverses the Fourier profile in the opposite z direction,
180 // so the odd sine terms change sign implicitly via sin(-kz) = -sin(kz).
181 Thick::reverse();
182 }
183
185 using BeamOptic::operator();
186
194 void compute_constants (RefPart const & refpart)
195 {
196 using namespace amrex::literals; // for _rt and _prt
197
198 Alignment::compute_constants(refpart);
199
200 // Ensure dynamic coefficient data is on GPU and we have fresh pointers to it
201 auto const & coef = *DynamicData::get(m_id);
202 m_cos_d_data = coef.cos.device_const().data();
203 m_sin_d_data = coef.sin.device_const().data();
204 }
205
220 template<typename T_Real=amrex::ParticleReal, typename T_IdCpu=uint64_t>
223 T_Real & AMREX_RESTRICT x,
224 T_Real & AMREX_RESTRICT y,
225 T_Real & AMREX_RESTRICT t,
226 T_Real & AMREX_RESTRICT px,
227 T_Real & AMREX_RESTRICT py,
228 T_Real & AMREX_RESTRICT pt,
229 [[maybe_unused]] T_IdCpu const & AMREX_RESTRICT idcpu,
230 [[maybe_unused]] RefPart const & AMREX_RESTRICT refpart
231 ) const
232 {
233 using namespace amrex::literals; // for _rt and _prt
234
235 // get the linear map
237
238 // symplectic linear map for a quadrupole is computed using the
239 // Hamiltonian formalism as described in:
240 // https://uspas.fnal.gov/materials/09UNM/ComputationalMethods.pdf .
241 // R denotes the transfer matrix in the basis (x,px,y,py,t,pt),
242 // so that, e.g., R(3,4) = dyf/dpyi.
243 amrex::SmallVector<T_Real, 6, 1> const v{x, px, y, py, t, pt};
244
245 // push particles using the linear map
246 auto const out = R * v;
247
248 // assign updated values
249 x = out[1];
250 px = out[2];
251 y = out[3];
252 py = out[4];
253 t = out[5];
254 pt = out[6];
255 }
256
262 void operator() (RefPart & AMREX_RESTRICT refpart) const
263 {
264 using namespace amrex::literals; // for _rt and _prt
265 using amrex::Math::powi;
266
267 // assign input reference particle values
268 amrex::ParticleReal const x = refpart.x;
269 amrex::ParticleReal const px = refpart.px;
270 amrex::ParticleReal const y = refpart.y;
271 amrex::ParticleReal const py = refpart.py;
272 amrex::ParticleReal const z = refpart.z;
273 amrex::ParticleReal const pz = refpart.pz;
274 amrex::ParticleReal const pt = refpart.pt;
275 amrex::ParticleReal const s = refpart.s;
276 amrex::ParticleReal const sedge = refpart.sedge;
277
278 // initialize linear map (deviation) values
279 m_map = decltype(m_map)::Identity();
280
281 // initialize the spin-orbit coupling matrix
282 m_spin_coupling = {};
283
284 // length of the current slice
285 amrex::ParticleReal const slice_ds = m_ds / nslice();
286
287 // compute initial value of beta*gamma
288 amrex::ParticleReal const bgi = std::sqrt(powi<2>(pt) - 1.0_prt);
289
290 // call integrator to advance (t,pt)
291 amrex::ParticleReal const zin = s - sedge;
292 amrex::ParticleReal const zout = zin + slice_ds;
293 int const nsteps = m_mapsteps;
294
295 integrators::symp2_integrate(refpart,zin,zout,nsteps,*this);
296 amrex::ParticleReal const ptf = refpart.pt;
297
298 /*
299 // print computed linear map:
300 for(int i=1; i<7; ++i){
301 for(int j=1; j<7; ++j){
302 amrex::PrintToFile("QuadMap.txt") << i << " " <<
303 j << " " << m_map(i,j) << "\n";
304 }
305 }
306 //
307 */
308
309 // advance position (x,y,z)
310 refpart.x = x + slice_ds*px/bgi;
311 refpart.y = y + slice_ds*py/bgi;
312 refpart.z = z + slice_ds*pz/bgi;
313
314 // compute final value of beta*gamma
315 amrex::ParticleReal const bgf = std::sqrt(powi<2>(ptf) - 1.0_prt);
316
317 // advance momentum (px,py,pz)
318 refpart.px = px*bgf/bgi;
319 refpart.py = py*bgf/bgi;
320 refpart.pz = pz*bgf/bgi;
321
322 // advance integrated path length
323 refpart.s = s + slice_ds;
324 }
325
340 template<typename T_Real=amrex::ParticleReal, typename T_IdCpu=uint64_t>
343 T_Real & AMREX_RESTRICT x,
344 T_Real & AMREX_RESTRICT y,
345 T_Real & AMREX_RESTRICT t,
346 T_Real & AMREX_RESTRICT px,
347 T_Real & AMREX_RESTRICT py,
348 T_Real & AMREX_RESTRICT pt,
349 T_Real & AMREX_RESTRICT sx,
350 T_Real & AMREX_RESTRICT sy,
351 T_Real & AMREX_RESTRICT sz,
352 T_IdCpu const & AMREX_RESTRICT idcpu,
353 RefPart const & AMREX_RESTRICT refpart
354 ) const
355 {
356 using namespace amrex::literals; // for _rt and _prt
357
358 // initialize the three components of the axis-angle vector
359 T_Real lambdax = 0_prt;
360 T_Real lambday = 0_prt;
361 T_Real lambdaz = 0_prt;
362
363 // store the phase space variables in vector form
364 amrex::SmallVector<T_Real, 6, 1> const v{x, px, y, py, t, pt};
365
366 // get the spin-orbit coupling matrix
368
369 // use phase space variables to obtain the angle-axis generator of spin rotation
370 auto const out = A * v;
371
372 // update the angle-axis generator
373 lambdax = out[1];
374 lambday = out[2];
375 lambdaz = out[3];
376
377 // push the spin vector using the generator just determined
378 rotate_spin(lambdax,lambday,lambdaz,sx,sy,sz);
379
380 // phase space push
381 (*this)(x, y, t, px, py, pt, idcpu, refpart);
382 }
383
385 using LinearTransport::operator();
386
393 Map6x6
394 transport_map ([[maybe_unused]] RefPart const & AMREX_RESTRICT refpart) const
395 {
396
398 R = m_map;
399
400 // apply the transverse rotation (roll) alignment error
401 return rotate_aligned_map(R);
402 }
403
410 std::tuple<amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal>
413 {
414 using namespace amrex::literals; // for _rt and _prt
415
416 // pick the right data depending if we are on the host side
417 // (reference particle push) or device side (particles):
418#if AMREX_DEVICE_COMPILE
419 amrex::ParticleReal const * cos_data = m_cos_d_data;
420 amrex::ParticleReal const * sin_data = m_sin_d_data;
421#else
422 amrex::ParticleReal const * cos_data = m_cos_h_data;
423 amrex::ParticleReal const * sin_data = m_sin_h_data;
424#endif
425
426 // specify constants
428 amrex::ParticleReal const zlen = std::abs(m_ds);
429 amrex::ParticleReal const zmid = zlen * 0.5_prt;
430
431 // compute on-axis magnetic field (z is relative to quadrupole midpoint)
432 amrex::ParticleReal bfield = 0.0;
433 amrex::ParticleReal bfieldp = 0.0;
434 amrex::ParticleReal bfieldint = 0.0;
435 amrex::ParticleReal const z = zeval - zmid;
436
437 if (std::abs(z) <= zmid)
438 {
439 bfield = 0.5_prt*cos_data[0];
440 bfieldint = z*bfield;
441 for (int j=1; j < m_ncoef; ++j)
442 {
443 bfield = bfield + cos_data[j] *std::cos(j * 2 * pi * z / zlen) +
444 sin_data[j] *std::sin(j * 2 * pi * z / zlen);
445 bfieldp = bfieldp - j * 2 * pi * cos_data[j] *std::sin(j * 2 * pi * z / zlen) / zlen +
446 j * 2 * pi * sin_data[j] *std::cos(j * 2 * pi * z / zlen) / zlen;
447 bfieldint = bfieldint + zlen * cos_data[j] *std::sin(j * 2 * pi * z / zlen) / (j * 2 * pi) -
448 zlen * sin_data[j] *std::cos(j * 2 * pi * z / zlen) / (j * 2 * pi);
449 }
450 }
451 return std::make_tuple(bfield, bfieldp, bfieldint);
452 }
453
463 void map1 (amrex::ParticleReal const tau,
464 RefPart & refpart,
465 [[maybe_unused]] amrex::ParticleReal & zeval) const
466 {
467 using namespace amrex::literals; // for _rt and _prt
468 using amrex::Math::powi;
469
470 // push the reference particle
471 amrex::ParticleReal const t = refpart.t;
472 amrex::ParticleReal const pt = refpart.pt;
473 amrex::ParticleReal const z = zeval;
474
475 if (pt < -1.0_prt) {
476 refpart.t = t + tau/std::sqrt(1.0_prt - powi<-2>(pt));
477 refpart.pt = pt;
478 }
479 else {
480 refpart.t = t;
481 refpart.pt = pt;
482 }
483
484 zeval = z + tau;
485
486 // push the linear map equations
488 amrex::ParticleReal const betgam = refpart.beta_gamma();
489
490 m_map(1,1) = R(1,1) + tau*R(2,1);
491 m_map(1,2) = R(1,2) + tau*R(2,2);
492 m_map(1,3) = R(1,3) + tau*R(2,3);
493 m_map(1,4) = R(1,4) + tau*R(2,4);
494
495 m_map(3,1) = R(3,1) + tau*R(4,1);
496 m_map(3,2) = R(3,2) + tau*R(4,2);
497 m_map(3,3) = R(3,3) + tau*R(4,3);
498 m_map(3,4) = R(3,4) + tau*R(4,4);
499
500 m_map(5,5) = R(5,5) + tau*R(6,5) / powi<2>(betgam);
501 m_map(5,6) = R(5,6) + tau*R(6,6) / powi<2>(betgam);
502 }
503
513 void map2 (amrex::ParticleReal const tau,
514 RefPart & refpart,
515 amrex::ParticleReal & zeval) const
516 {
517 using namespace amrex::literals; // for _rt and _prt
518
519 amrex::ParticleReal const t = refpart.t;
520 amrex::ParticleReal const pt = refpart.pt;
521
522 // Define parameters and intermediate constants
523 amrex::ParticleReal const G0 = m_gscale;
524
525 // push the reference particle
526 auto [bz, bzp, bzint] = Quad_Bfield(zeval);
527 amrex::ignore_unused(bzp, bzint);
528
529 refpart.t = t;
530 refpart.pt = pt;
531
532 // push the linear map equations
534 amrex::ParticleReal const alpha = G0*bz;
535
536 m_map(2,1) = R(2,1) - tau*alpha*R(1,1);
537 m_map(2,2) = R(2,2) - tau*alpha*R(1,2);
538 m_map(2,3) = R(2,3) - tau*alpha*R(1,3);
539 m_map(2,4) = R(2,4) - tau*alpha*R(1,4);
540
541 m_map(4,1) = R(4,1) + tau*alpha*R(3,1);
542 m_map(4,2) = R(4,2) + tau*alpha*R(3,2);
543 m_map(4,3) = R(4,3) + tau*alpha*R(3,3);
544 m_map(4,4) = R(4,4) + tau*alpha*R(3,4);
545
546 // BELOW: if spin is needed only:
549 amrex::ParticleReal const gamma = refpart.gamma();
551
552 // Update spin-orbit coupling matrix here
553 dA(1,3) = -(1_prt + G*gamma) * tau * alpha;
554 dA(2,1) = -(1_prt + G*gamma) * tau * alpha;
555
556 // update the spin-orbit coupling matrix here
557 m_spin_coupling = A + dA*R;
558
559 }
560
563 int m_id;
564
565 int m_ncoef = 0;
570
571 // Reference-trajectory linearization around the reference particle.
572 // Computed during the reference-particle push and consumed during the
573 // particle push.
574 // mutable: written by the const reference push before the element is copied
575 // into the particle-push functor.
578 };
579
580} // namespace impactx
581
584
585#endif // IMPACTX_SOFTQUAD_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
#define IMPACTX_GPUDATA_EXTERN(ElementType)
Definition dynamicdata.H:169
amrex_particle_real ParticleReal
constexpr T powi(T x) noexcept
__host__ __device__ void ignore_unused(const Ts &...)
SmallMatrix< T, N, 1, Order::F, StartIndex > SmallVector
Definition All.H:55
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void symp2_integrate(RefPart &refpart, amrex::ParticleReal const zin, amrex::ParticleReal const zout, int const nsteps, T_Element const &element)
Definition Integrators.H:39
@ 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_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal beta_gamma() const
Definition ReferenceParticle.H:167
amrex::ParticleReal pt
energy, normalized by rest energy
Definition ReferenceParticle.H:42
amrex::ParticleReal gyromagnetic_anomaly
anomalous magnetic moment [unitless]
Definition ReferenceParticle.H:45
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal gamma() const
Definition ReferenceParticle.H:139
amrex::ParticleReal t
clock time * c in meters
Definition ReferenceParticle.H:38
Definition SoftQuad.H:62
amrex::Vector< amrex::ParticleReal > default_cos_coef
Definition SoftQuad.H:63
amrex::Vector< amrex::ParticleReal > default_sin_coef
Definition SoftQuad.H:91
amrex::Gpu::TrackedVector< amrex::ParticleReal > sin
Definition SoftQuad.H:106
amrex::Gpu::TrackedVector< amrex::ParticleReal > cos
Definition SoftQuad.H:105
Definition SoftQuad.H:119
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 SoftQuad.H:222
static constexpr auto type
Definition SoftQuad.H:120
mixin::GPUDataRegistry< QuadrupoleFourierCoefficients > DynamicData
Definition SoftQuad.H:123
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void map1(amrex::ParticleReal const tau, RefPart &refpart, amrex::ParticleReal &zeval) const
Definition SoftQuad.H:463
int m_ncoef
unique soft quad id used for data lookup map
Definition SoftQuad.H:565
ImpactXParticleContainer::ParticleType PType
Definition SoftQuad.H:121
amrex::ParticleReal const * m_cos_d_data
non-owning pointer to host sine coefficients
Definition SoftQuad.H:568
int m_id
number of map integration steps per slice
Definition SoftQuad.H:563
amrex::ParticleReal const * m_sin_h_data
non-owning pointer to host cosine coefficients
Definition SoftQuad.H:567
AMREX_GPU_HOST AMREX_FORCE_INLINE Map6x6 transport_map(RefPart const &AMREX_RESTRICT refpart) const
Definition SoftQuad.H:394
std::tuple< amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal > AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Quad_Bfield(amrex::ParticleReal const zeval) const
Definition SoftQuad.H:412
amrex::SmallMatrix< amrex::ParticleReal, 3, 6, amrex::Order::F, 1 > m_spin_coupling
linearized map
Definition SoftQuad.H:577
SoftQuadrupole(amrex::ParticleReal ds, amrex::ParticleReal gscale, std::vector< amrex::ParticleReal > cos_coef, std::vector< amrex::ParticleReal > sin_coef, 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 mapsteps=DEFAULT_mapsteps, int nslice=DEFAULT_nslice, std::optional< std::string > name=DEFAULT_name)
Definition SoftQuad.H:143
amrex::ParticleReal m_gscale
Definition SoftQuad.H:561
int m_mapsteps
scaling factor for quad field gradient
Definition SoftQuad.H:562
void reverse()
Definition SoftQuad.H:178
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 SoftQuad.H:342
amrex::SmallMatrix< amrex::ParticleReal, 6, 6, amrex::Order::F, 1 > m_map
non-owning pointer to device sine coefficients
Definition SoftQuad.H:576
amrex::ParticleReal const * m_sin_d_data
non-owning pointer to device cosine coefficients
Definition SoftQuad.H:569
amrex::ParticleReal const * m_cos_h_data
number of Fourier coefficients
Definition SoftQuad.H:566
void compute_constants(RefPart const &refpart)
Definition SoftQuad.H:194
static constexpr int DEFAULT_mapsteps
Definition SoftQuad.H:125
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void map2(amrex::ParticleReal const tau, RefPart &refpart, amrex::ParticleReal &zeval) const
Definition SoftQuad.H:513
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
static std::shared_ptr< QuadrupoleFourierCoefficients > const & get(int id)
Definition dynamicdata.H:98
static QuadrupoleFourierCoefficients & emplace(int id, Args &&... args)
Definition dynamicdata.H:125
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 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