ImpactX
Loading...
Searching...
No Matches
Empty.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_ELEMENT_EMPTY_H
11#define IMPACTX_ELEMENT_EMPTY_H
12
14#include "mixin/thin.H"
16#include "mixin/nofinalize.H"
17
18#include <AMReX_Extension.H>
19#include <AMReX_REAL.H>
20#include <AMReX_SIMD.H>
21
22#include <stdexcept>
23#include <string>
24
25
26namespace impactx::elements
27{
28 struct Empty
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 {
41 }
42
45 ImpactXParticleContainer & /* pc */,
46 int /* step */,
47 int /* period */
48 ) {
49 // nothing to do
50 }
51
53 void compute_constants (RefPart const & /* refpart */)
54 {
55 // nothing to do
56 }
57
61 RefPart & AMREX_RESTRICT /* ref_part */
62 ) {
63 // nothing to do
64 }
65
71 void operator() ([[maybe_unused]] RefPart & AMREX_RESTRICT refpart) const
72 {
73 // nothing to do
74 }
75
82 Map6x6
83 transport_map ([[maybe_unused]] RefPart const & AMREX_RESTRICT refpart) const
84 {
85 // nothing to do
86 return Map6x6::Identity();
87 }
88
100 template<typename T_Real=amrex::ParticleReal, typename T_IdCpu=uint64_t>
103 [[maybe_unused]] T_Real & AMREX_RESTRICT x,
104 [[maybe_unused]] T_Real & AMREX_RESTRICT y,
105 [[maybe_unused]] T_Real & AMREX_RESTRICT t,
106 [[maybe_unused]] T_Real & AMREX_RESTRICT px,
107 [[maybe_unused]] T_Real & AMREX_RESTRICT py,
108 [[maybe_unused]] T_Real & AMREX_RESTRICT pt,
109 [[maybe_unused]] T_IdCpu & AMREX_RESTRICT idcpu,
110 [[maybe_unused]] RefPart const & AMREX_RESTRICT refpart
111 ) const
112 {
113 // nothing to do
114 }
115
117 using Thin::operator();
118
120 using LinearTransport::operator();
121
124 std::string name () const { throw std::runtime_error("Name not set on element!"); }
125
128 bool has_name () const { return false; }
129 };
130
131} // namespace impactx
132
133#endif // IMPACTX_ELEMENT_EMPTY_H
#define AMREX_FORCE_INLINE
#define AMREX_RESTRICT
#define AMREX_GPU_HOST_DEVICE
#define AMREX_GPU_HOST
Definition ImpactXParticleContainer.H:133
impactx::ParIterSoA iterator
amrex iterator for particle boxes
Definition ImpactXParticleContainer.H:136
Definition All.H:54
@ 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:31
AMREX_FORCE_INLINE std::string name() const
Definition Empty.H:124
void compute_constants(RefPart const &)
Definition Empty.H:53
void operator()(ImpactXParticleContainer &, int, int)
Definition Empty.H:44
AMREX_FORCE_INLINE bool has_name() const
Definition Empty.H:128
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:83
ImpactXParticleContainer::ParticleType PType
Definition Empty.H:35
Empty()
Definition Empty.H:39
Definition lineartransport.H:29
Definition nofinalize.H:22
Definition thin.H:24