ImpactX
Loading...
Searching...
No Matches
Empty.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_ELEMENT_EMPTY_H
11#define IMPACTX_ELEMENT_EMPTY_H
12
14#include "mixin/thin.H"
16#include "mixin/named.H"
17#include "mixin/nofinalize.H"
18
19#include <AMReX_Extension.H>
20#include <AMReX_REAL.H>
21#include <AMReX_SIMD.H>
22
23#include <optional>
24
25namespace impactx::elements
26{
27 struct Empty
28 : public mixin::Named,
29 public mixin::Thin,
30 public mixin::LinearTransport<Empty>,
31 public mixin::NoFinalize,
32 public amrex::simd::Vectorized<amrex::simd::native_simd_size_particlereal>
33 {
34 static constexpr auto type = "None";
36
40 : Named(std::nullopt)
41 {
42 }
43
45 void reverse () { }
46
49 ImpactXParticleContainer & /* pc */,
50 int /* step */,
51 int /* period */
52 ) {
53 // nothing to do
54 }
55
57 void compute_constants (RefPart const & /* refpart */)
58 {
59 // nothing to do
60 }
61
65 RefPart & AMREX_RESTRICT /* ref_part */
66 ) {
67 // nothing to do
68 }
69
75 void operator() ([[maybe_unused]] RefPart & AMREX_RESTRICT refpart) const
76 {
77 // nothing to do
78 }
79
86 Map6x6
87 transport_map ([[maybe_unused]] RefPart const & AMREX_RESTRICT refpart) const
88 {
89 // nothing to do
90 return Map6x6::Identity();
91 }
92
104 template<typename T_Real=amrex::ParticleReal, typename T_IdCpu=uint64_t>
107 [[maybe_unused]] T_Real const & AMREX_RESTRICT x,
108 [[maybe_unused]] T_Real const & AMREX_RESTRICT y,
109 [[maybe_unused]] T_Real const & AMREX_RESTRICT t,
110 [[maybe_unused]] T_Real const & AMREX_RESTRICT px,
111 [[maybe_unused]] T_Real const & AMREX_RESTRICT py,
112 [[maybe_unused]] T_Real const & AMREX_RESTRICT pt,
113 [[maybe_unused]] T_IdCpu const & AMREX_RESTRICT idcpu,
114 [[maybe_unused]] RefPart const & AMREX_RESTRICT refpart
115 ) const
116 {
117 // nothing to do
118 }
119
121 using Thin::operator();
122
124 using LinearTransport::operator();
125 };
126
127} // namespace impactx
128
129#endif // IMPACTX_ELEMENT_EMPTY_H
#define AMREX_FORCE_INLINE
#define AMREX_RESTRICT
#define AMREX_GPU_HOST_DEVICE
#define AMREX_GPU_HOST
Definition ImpactXParticleContainer.H:136
impactx::ParIterSoA iterator
amrex iterator for particle boxes
Definition ImpactXParticleContainer.H:139
Definition All.H:55
@ t
fixed t as the independent variable
Definition ImpactXParticleContainer.H:38
amrex::SmallMatrix< amrex::ParticleReal, 6, 6, amrex::Order::F, 1 > Map6x6
Definition CovarianceMatrix.H:20
static constexpr __host__ __device__ SmallMatrix< T, NRows, NCols, ORDER, StartIndex > Identity() noexcept
Definition ReferenceParticle.H:33
void reverse()
Definition Empty.H:45
void compute_constants(RefPart const &)
Definition Empty.H:57
void operator()(ImpactXParticleContainer &, int, int)
Definition Empty.H:48
static constexpr auto type
Definition Empty.H:34
AMREX_GPU_HOST AMREX_FORCE_INLINE Map6x6 transport_map(RefPart const &AMREX_RESTRICT refpart) const
Definition Empty.H:87
ImpactXParticleContainer::ParticleType PType
Definition Empty.H:35
Empty()
Definition Empty.H:39
Definition lineartransport.H:50
Definition named.H:29
AMREX_GPU_HOST Named(std::optional< std::string > name)
Definition named.H:59
Definition nofinalize.H:22
Definition thin.H:24