ImpactX
Loading...
Searching...
No Matches
Marker.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_MARKER_H
11#define IMPACTX_ELEMENT_MARKER_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
24namespace impactx::elements
25{
26 struct Marker
27 : public mixin::Named,
28 public mixin::LinearTransport<Marker>,
29 public mixin::Thin,
30 public mixin::NoFinalize,
31 public amrex::simd::Vectorized<amrex::simd::native_simd_size_particlereal>
32 {
33 static constexpr auto type = "Marker";
35
40 Marker (std::string name)
41 : Named(name)
42 {
43 }
44
46 void reverse () { }
47
50 ImpactXParticleContainer & /* pc */,
51 int /* step */,
52 int /* period */
53 ) {
54 // nothing to do
55 }
56
58 void compute_constants (RefPart const & /* refpart */)
59 {
60 // nothing to do
61 }
62
66 RefPart & AMREX_RESTRICT /* ref_part */
67 ) {
68 // nothing to do
69 }
70
82 template<typename T_Real=amrex::ParticleReal, typename T_IdCpu=uint64_t>
85 [[maybe_unused]] T_Real & AMREX_RESTRICT x,
86 [[maybe_unused]] T_Real & AMREX_RESTRICT y,
87 [[maybe_unused]] T_Real & AMREX_RESTRICT t,
88 [[maybe_unused]] T_Real & AMREX_RESTRICT px,
89 [[maybe_unused]] T_Real & AMREX_RESTRICT py,
90 [[maybe_unused]] T_Real & AMREX_RESTRICT pt,
91 [[maybe_unused]] T_IdCpu & AMREX_RESTRICT idcpu,
92 [[maybe_unused]] RefPart const & AMREX_RESTRICT refpart
93 ) const
94 {
95 // nothing to do
96 }
97
99 using Thin::operator();
100
102 using LinearTransport::operator();
103
110 Map6x6
111 transport_map ([[maybe_unused]] RefPart const & AMREX_RESTRICT refpart) const
112 {
113 // nothing to do
114 return Map6x6::Identity();
115 }
116 };
117
118} // namespace impactx
119
120#endif // IMPACTX_ELEMENT_MARKER_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:56
@ 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 operator()(ImpactXParticleContainer &, int, int)
Definition Marker.H:49
void compute_constants(RefPart const &)
Definition Marker.H:58
ImpactXParticleContainer::ParticleType PType
Definition Marker.H:34
AMREX_GPU_HOST AMREX_FORCE_INLINE Map6x6 transport_map(RefPart const &AMREX_RESTRICT refpart) const
Definition Marker.H:111
static constexpr auto type
Definition Marker.H:33
void reverse()
Definition Marker.H:46
Marker(std::string name)
Definition Marker.H:40
Definition lineartransport.H:50
Definition named.H:29
AMREX_GPU_HOST Named(std::optional< std::string > name)
Definition named.H:57
AMREX_FORCE_INLINE std::string name() const
Definition named.H:122
Definition nofinalize.H:22
Definition thin.H:24