Skip to content

Commit

Permalink
[Draft] Elements: add ds() Function
Browse files Browse the repository at this point in the history
To Do:
- [ ] Python
- [ ] Doc Strings
  • Loading branch information
ax3l committed Aug 31, 2022
1 parent 6ca18ae commit f33e63e
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/particles/elements/ConstF.H
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@ namespace impactx
return m_nslice;
}

/** ...
*
* @return ...
*/
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
amrex::ParticleReal ds () const
{
return m_ds;
}

private:
amrex::ParticleReal m_ds; //! segment length in m
amrex::ParticleReal m_kx; //! focusing x strength in 1/m
Expand Down
10 changes: 10 additions & 0 deletions src/particles/elements/DipEdge.H
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,16 @@ namespace impactx
return 1;
}

/** ...
*
* @return ...
*/
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
amrex::ParticleReal ds () const
{
return 0.0;
}

private:
amrex::ParticleReal m_psi; //! pole face angle in rad
amrex::ParticleReal m_rc; //! bend radius in m
Expand Down
10 changes: 10 additions & 0 deletions src/particles/elements/Drift.H
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,16 @@ namespace impactx
return m_nslice;
}

/** ...
*
* @return ...
*/
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
amrex::ParticleReal ds () const
{
return m_ds;
}

private:
amrex::ParticleReal m_ds; //! segment length in m
int m_nslice; //! number of slices used for the application of space charge
Expand Down
10 changes: 10 additions & 0 deletions src/particles/elements/Multipole.H
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ namespace impactx
return 1;
}

/** ...
*
* @return ...
*/
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
amrex::ParticleReal ds () const
{
return 0.0;
}

private:
int m_multipole; //! multipole index
int m_mfactorial; //! factorial of multipole index
Expand Down
10 changes: 10 additions & 0 deletions src/particles/elements/None.H
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ namespace impactx
{
return 1;
}

/** ...
*
* @return ...
*/
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
amrex::ParticleReal ds () const
{
return 0.0;
}
};

} // namespace impactx
Expand Down
10 changes: 10 additions & 0 deletions src/particles/elements/NonlinearLens.H
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@ namespace impactx
return 1;
}

/** ...
*
* @return ...
*/
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
amrex::ParticleReal ds () const
{
return 0.0;
}

private:
amrex::ParticleReal m_knll; //! integrated strength of the nonlinear lens (m)
amrex::ParticleReal m_cnll; //! distance of singularities from the origin (m)
Expand Down
10 changes: 10 additions & 0 deletions src/particles/elements/Quad.H
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,16 @@ namespace impactx
return m_nslice;
}

/** ...
*
* @return ...
*/
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
amrex::ParticleReal ds () const
{
return m_ds;
}

private:
amrex::ParticleReal m_ds; //! segment length in m
amrex::ParticleReal m_k; //! quadrupole strength in 1/m
Expand Down
10 changes: 10 additions & 0 deletions src/particles/elements/Sbend.H
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,16 @@ namespace impactx
return m_nslice;
}

/** ...
*
* @return ...
*/
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
amrex::ParticleReal ds () const
{
return m_ds;
}

private:
amrex::ParticleReal m_ds; //! segment length in m
amrex::ParticleReal m_rc; //! bend radius in m
Expand Down
10 changes: 10 additions & 0 deletions src/particles/elements/ShortRF.H
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@ namespace impactx
return 1;
}

/** ...
*
* @return ...
*/
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
amrex::ParticleReal ds () const
{
return 0.0;
}

private:
amrex::ParticleReal m_V; //! normalized (max) RF voltage drop.
amrex::ParticleReal m_k; //! RF wavenumber in 1/m.
Expand Down

0 comments on commit f33e63e

Please sign in to comment.