ImpactX
thick.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: Axel Huebl
8  * License: BSD-3-Clause-LBNL
9  */
10 #ifndef IMPACTX_ELEMENTS_MIXIN_THICK_H
11 #define IMPACTX_ELEMENTS_MIXIN_THICK_H
12 
14 
15 #include <AMReX_Extension.H>
16 #include <AMReX_REAL.H>
17 
18 
19 namespace impactx::elements
20 {
23  struct Thick
24  {
30  Thick(amrex::ParticleReal const ds, int const nslice )
31  : m_ds(ds), m_nslice(nslice)
32  {
33  }
34 
40  int nslice () const
41  {
42  return m_nslice;
43  }
44 
50  amrex::ParticleReal ds () const
51  {
52  return m_ds;
53  }
54 
55  protected:
56  amrex::ParticleReal m_ds;
57  int m_nslice;
58  };
59 
60 } // namespace impactx::elements
61 
62 #endif // IMPACTX_ELEMENTS_MIXIN_THICK_H
#define AMREX_FORCE_INLINE
#define AMREX_GPU_HOST_DEVICE
Definition: beamoptic.H:23
Definition: thick.H:24
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal ds() const
Definition: thick.H:50
int m_nslice
segment length in m
Definition: thick.H:57
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int nslice() const
Definition: thick.H:40
amrex::ParticleReal m_ds
Definition: thick.H:56
Thick(amrex::ParticleReal const ds, int const nslice)
Definition: thick.H:30