ImpactX
Loading...
Searching...
No Matches
thin.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_THIN_H
11#define IMPACTX_ELEMENTS_MIXIN_THIN_H
12
14
15#include <AMReX_Extension.H>
16#include <AMReX_REAL.H>
17
18
20{
23 struct Thin
24 {
30 void operator() ([[maybe_unused]] RefPart & AMREX_RESTRICT refpart) const
31 {
32 // nothing to do: this is a zero-length element
33 }
34
40 int nslice () const
41 {
42 return 1;
43 }
44
50 amrex::ParticleReal ds () const
51 {
52 using namespace amrex::literals;
53 return 0.0_prt;
54 }
55 };
56
57} // namespace impactx::elements::mixin
58
59#endif // IMPACTX_ELEMENTS_MIXIN_THIN_H
#define AMREX_FORCE_INLINE
#define AMREX_RESTRICT
#define AMREX_GPU_HOST_DEVICE
Definition alignment.H:23
Definition ReferenceParticle.H:31
Definition thin.H:24
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int nslice() const
Definition thin.H:40
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void operator()(RefPart &AMREX_RESTRICT refpart) const
Definition thin.H:30
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal ds() const
Definition thin.H:50