ImpactX
Toggle main menu visibility
Loading...
Searching...
No Matches
src
elements
Marker.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_MARKER_H
11
#define IMPACTX_ELEMENT_MARKER_H
12
13
#include "
particles/ImpactXParticleContainer.H
"
14
#include "
mixin/thin.H
"
15
#include "
mixin/lineartransport.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
namespace
impactx::elements
24
{
25
struct
Marker
26
:
public
mixin::Named
,
27
public
mixin::LinearTransport
<Marker>,
28
public
mixin::Thin
,
29
public
mixin::NoFinalize
,
30
public
amrex::simd::Vectorized
<amrex::simd::native_simd_size_particlereal>
31
{
32
static
constexpr
auto
type
=
"Marker"
;
33
using
PType
=
ImpactXParticleContainer::ParticleType
;
34
39
Marker
(std::string
name
)
40
:
Named
(
name
)
41
{
42
}
43
45
void
reverse
() { }
46
48
void
operator()
(
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
63
void
operator()
(
64
ImpactXParticleContainer::iterator
&
/* pti */
,
65
RefPart
&
AMREX_RESTRICT
/* ref_part */
66
) {
67
// nothing to do
68
}
69
81
template
<
typename
T_Real=amrex::ParticleReal,
typename
T_IdCpu=u
int
64_t>
82
AMREX_GPU_HOST_DEVICE
AMREX_FORCE_INLINE
83
void
operator()
(
84
[[maybe_unused]] T_Real
const
&
AMREX_RESTRICT
x,
85
[[maybe_unused]] T_Real
const
&
AMREX_RESTRICT
y,
86
[[maybe_unused]] T_Real
const
&
AMREX_RESTRICT
t
,
87
[[maybe_unused]] T_Real
const
&
AMREX_RESTRICT
px,
88
[[maybe_unused]] T_Real
const
&
AMREX_RESTRICT
py,
89
[[maybe_unused]] T_Real
const
&
AMREX_RESTRICT
pt,
90
[[maybe_unused]] T_IdCpu
const
&
AMREX_RESTRICT
idcpu,
91
[[maybe_unused]]
RefPart
const
&
AMREX_RESTRICT
refpart
92
)
const
93
{
94
// nothing to do
95
}
96
98
using
Thin::operator();
99
101
using
LinearTransport::operator();
102
108
AMREX_GPU_HOST
AMREX_FORCE_INLINE
109
Map6x6
110
transport_map
([[maybe_unused]]
RefPart
const
&
AMREX_RESTRICT
refpart)
const
111
{
112
// nothing to do
113
return
Map6x6::Identity
();
114
}
115
};
116
117
}
// namespace impactx
118
119
#endif
// IMPACTX_ELEMENT_MARKER_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_GPU_HOST
#define AMREX_GPU_HOST
AMReX_REAL.H
AMReX_SIMD.H
ImpactXParticleContainer.H
amrex::ParticleContainer_impl< SoAParticle< T_NArrayReal, T_NArrayInt >, T_NArrayReal, T_NArrayInt, Allocator, CellAssignor >::ParticleType
T_ParticleType ParticleType
impactx::ImpactXParticleContainer
Definition
ImpactXParticleContainer.H:136
impactx::ImpactXParticleContainer::iterator
impactx::ParIterSoA iterator
amrex iterator for particle boxes
Definition
ImpactXParticleContainer.H:139
lineartransport.H
named.H
impactx::elements
Definition
All.H:55
impactx::CoordSystem::t
@ t
fixed t as the independent variable
Definition
ImpactXParticleContainer.H:38
impactx::Map6x6
amrex::SmallMatrix< amrex::ParticleReal, 6, 6, amrex::Order::F, 1 > Map6x6
Definition
CovarianceMatrix.H:20
nofinalize.H
amrex::SmallMatrix< amrex::ParticleReal, 6, 6, amrex::Order::F, 1 >::Identity
static constexpr __host__ __device__ SmallMatrix< T, NRows, NCols, ORDER, StartIndex > Identity() noexcept
amrex::simd::Vectorized
impactx::RefPart
Definition
ReferenceParticle.H:33
impactx::elements::Marker::operator()
void operator()(ImpactXParticleContainer &, int, int)
Definition
Marker.H:48
impactx::elements::Marker::compute_constants
void compute_constants(RefPart const &)
Definition
Marker.H:57
impactx::elements::Marker::PType
ImpactXParticleContainer::ParticleType PType
Definition
Marker.H:33
impactx::elements::Marker::transport_map
AMREX_GPU_HOST AMREX_FORCE_INLINE Map6x6 transport_map(RefPart const &AMREX_RESTRICT refpart) const
Definition
Marker.H:110
impactx::elements::Marker::type
static constexpr auto type
Definition
Marker.H:32
impactx::elements::Marker::reverse
void reverse()
Definition
Marker.H:45
impactx::elements::Marker::Marker
Marker(std::string name)
Definition
Marker.H:39
impactx::elements::mixin::LinearTransport
Definition
lineartransport.H:50
impactx::elements::mixin::Named
Definition
named.H:29
impactx::elements::mixin::Named::Named
AMREX_GPU_HOST Named(std::optional< std::string > name)
Definition
named.H:59
impactx::elements::mixin::Named::name
AMREX_FORCE_INLINE std::string name() const
Definition
named.H:124
impactx::elements::mixin::NoFinalize
Definition
nofinalize.H:22
impactx::elements::mixin::Thin
Definition
thin.H:24
thin.H
Generated by
1.17.0