ImpactX
Loading...
Searching...
No Matches
thick.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: 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
20{
23 struct Thick
24 {
25 static constexpr int DEFAULT_nslice = 1;
26
34 int nslice
35 )
37 {
38 }
39
45 int nslice () const
46 {
47 return m_nslice;
48 }
49
56 {
57 return m_ds;
58 }
59
65 void reverse ()
66 {
67 m_ds = -m_ds;
68 }
69
72 };
73
74} // namespace impactx::elements::mixin
75
76#endif // IMPACTX_ELEMENTS_MIXIN_THICK_H
#define AMREX_FORCE_INLINE
#define AMREX_GPU_HOST_DEVICE
amrex_particle_real ParticleReal
Definition alignment.H:25
void reverse()
Definition thick.H:65
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
int m_nslice
segment length in m
Definition thick.H:71
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