WarpX
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 
18 {
19 
26  LatticeElementBase (std::string const& element_name);
27 
34  void
35  AddElementBase(amrex::ParmParse & pp_element, amrex::ParticleReal & z_location);
36 
40  void
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.
54 
55 };
56 
57 #endif // WARPX_ACCELERATORLATTICE_LATTICEELEMENTS_LATTICEELEMENTBASE_H_
Definition: LatticeElementBase.H:18
std::vector< amrex::ParticleReal > h_zs
Definition: LatticeElementBase.H:48
std::string m_element_name
Definition: LatticeElementBase.H:43
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
void WriteToDeviceBase()
Write the base element information to the device.
Definition: LatticeElementBase.cpp:33
amrex::Gpu::DeviceVector< amrex::ParticleReal > d_zs
Definition: LatticeElementBase.H:52
amrex::Gpu::DeviceVector< amrex::ParticleReal > d_ze
Definition: LatticeElementBase.H:53
int nelements
Definition: LatticeElementBase.H:45
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
std::vector< amrex::ParticleReal > h_ze
Definition: LatticeElementBase.H:49