ImpactX
Toggle main menu visibility
Loading...
Searching...
No Matches
src
elements
mixin
thin.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_THIN_H
11
#define IMPACTX_ELEMENTS_MIXIN_THIN_H
12
13
#include "
particles/ImpactXParticleContainer.H
"
14
15
#include <
AMReX_Extension.H
>
16
#include <
AMReX_REAL.H
>
17
18
19
namespace
impactx::elements::mixin
20
{
23
struct
Thin
24
{
29
AMREX_GPU_HOST_DEVICE
AMREX_FORCE_INLINE
30
void
operator()
([[maybe_unused]]
RefPart
&
AMREX_RESTRICT
refpart)
const
31
{
32
// nothing to do: this is a zero-length element
33
}
34
40
void
reverse
()
41
{
42
// no-op base for zero-length elements
43
}
44
49
AMREX_GPU_HOST_DEVICE
AMREX_FORCE_INLINE
50
int
nslice
()
const
51
{
52
return
1;
53
}
54
59
AMREX_GPU_HOST_DEVICE
AMREX_FORCE_INLINE
60
amrex::ParticleReal
ds
()
const
61
{
62
using namespace
amrex::literals
;
63
return
0.0_prt;
64
}
65
};
66
67
}
// namespace impactx::elements::mixin
68
69
#endif
// IMPACTX_ELEMENTS_MIXIN_THIN_H
AMReX_Extension.H
AMREX_FORCE_INLINE
#define AMREX_FORCE_INLINE
AMREX_RESTRICT
#define AMREX_RESTRICT
AMREX_GPU_HOST_DEVICE
#define AMREX_GPU_HOST_DEVICE
AMReX_REAL.H
ImpactXParticleContainer.H
amrex::ParticleReal
amrex_particle_real ParticleReal
amrex::literals
impactx::elements::mixin
Definition
alignment.H:25
impactx::RefPart
Definition
ReferenceParticle.H:33
impactx::elements::mixin::Thin
Definition
thin.H:24
impactx::elements::mixin::Thin::nslice
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int nslice() const
Definition
thin.H:50
impactx::elements::mixin::Thin::operator()
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void operator()(RefPart &AMREX_RESTRICT refpart) const
Definition
thin.H:30
impactx::elements::mixin::Thin::ds
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal ds() const
Definition
thin.H:60
impactx::elements::mixin::Thin::reverse
void reverse()
Definition
thin.H:40
Generated by
1.17.0