WarpX
Toggle main menu visibility
Loading...
Searching...
No Matches
Source
AcceleratorLattice
LatticeElements
LatticeElementBase.H
Go to the documentation of this file.
1
/* Copyright 2022 David Grote
2
*
3
* This file is part of WarpX.
4
*
5
* License: BSD-3-Clause-LBNL
6
*/
7
#ifndef WARPX_ACCELERATORLATTICE_LATTICEELEMENTS_LATTICEELEMENTBASE_H_
8
#define WARPX_ACCELERATORLATTICE_LATTICEELEMENTS_LATTICEELEMENTBASE_H_
9
10
#include <
AMReX_REAL.H
>
11
#include <
AMReX_ParmParse.H
>
12
#include <
AMReX_GpuContainers.H
>
13
14
#include <string>
15
#include <vector>
16
17
struct
LatticeElementBase
18
{
19
26
explicit
LatticeElementBase
(std::string
const
& element_name);
27
34
void
35
AddElementBase
(
amrex::ParmParse
& pp_element,
amrex::ParticleReal
& z_location);
36
40
void
41
WriteToDeviceBase
();
42
43
std::string
m_element_name
;
44
45
int
nelements
= 0;
46
47
// The host level copy of the data.
48
std::vector<amrex::ParticleReal>
h_zs
;
49
std::vector<amrex::ParticleReal>
h_ze
;
50
51
// The device level copy of the data.
52
amrex::Gpu::DeviceVector<amrex::ParticleReal>
d_zs
;
53
amrex::Gpu::DeviceVector<amrex::ParticleReal>
d_ze
;
54
55
};
56
57
#endif
// WARPX_ACCELERATORLATTICE_LATTICEELEMENTS_LATTICEELEMENTBASE_H_
AMReX_GpuContainers.H
AMReX_ParmParse.H
AMReX_REAL.H
amrex::ParmParse
amrex::ParticleReal
amrex_particle_real ParticleReal
amrex::Gpu::DeviceVector
PODVector< T, ArenaAllocator< T > > DeviceVector
LatticeElementBase::h_zs
std::vector< amrex::ParticleReal > h_zs
Definition
LatticeElementBase.H:48
LatticeElementBase::m_element_name
std::string m_element_name
Definition
LatticeElementBase.H:43
LatticeElementBase::LatticeElementBase
LatticeElementBase(std::string const &element_name)
LatticeElementBase constructor This gets the input z extent of the element and check for its correctn...
Definition
LatticeElementBase.cpp:15
LatticeElementBase::WriteToDeviceBase
void WriteToDeviceBase()
Write the base element information to the device.
Definition
LatticeElementBase.cpp:33
LatticeElementBase::d_zs
amrex::Gpu::DeviceVector< amrex::ParticleReal > d_zs
Definition
LatticeElementBase.H:52
LatticeElementBase::d_ze
amrex::Gpu::DeviceVector< amrex::ParticleReal > d_ze
Definition
LatticeElementBase.H:53
LatticeElementBase::nelements
int nelements
Definition
LatticeElementBase.H:45
LatticeElementBase::AddElementBase
void AddElementBase(amrex::ParmParse &pp_element, amrex::ParticleReal &z_location)
Read in an element base data and add it to the lists.
Definition
LatticeElementBase.cpp:19
LatticeElementBase::h_ze
std::vector< amrex::ParticleReal > h_ze
Definition
LatticeElementBase.H:49
Generated by
1.17.0