WarpX
SpeciesPhysicalProperties.H
Go to the documentation of this file.
1 /* Copyright 2020 Maxence Thevenet
2  *
3  * This file is part of WarpX.
4  *
5  * License: BSD-3-Clause-LBNL
6  */
7 
8 #ifndef WARPX_SPECIESPHYSICALPROPERTIES_H_
9 #define WARPX_SPECIESPHYSICALPROPERTIES_H_
10 
11 #include <AMReX_REAL.H>
12 
13 #include <optional>
14 #include <string>
15 
16 enum struct PhysicalSpecies{
21 
22 namespace species
23 {
30  std::optional<PhysicalSpecies> from_string (const std::string& species_name);
31 
38  amrex::Real get_charge (const PhysicalSpecies& ps);
39 
46  amrex::Real get_mass (const PhysicalSpecies& ps);
47 
54  std::string get_name (const PhysicalSpecies& ps);
55 }
56 
57 #endif // WARPX_SPECIESPHYSICALPROPERTIES_H_
PhysicalSpecies
Definition: SpeciesPhysicalProperties.H:16
Definition: SpeciesPhysicalProperties.cpp:277
std::optional< PhysicalSpecies > from_string(const std::string &species)
Returns the PhysicalSpecies associated to a given name.
Definition: SpeciesPhysicalProperties.cpp:278
std::string get_name(const PhysicalSpecies &ps)
Returns the name associated to a PhysicalSpecies.
Definition: SpeciesPhysicalProperties.cpp:295
amrex::Real get_charge(const PhysicalSpecies &ps)
Returns the charge associated to a PhysicalSpecies.
Definition: SpeciesPhysicalProperties.cpp:285
amrex::Real get_mass(const PhysicalSpecies &ps)
Returns the mass associated to a PhysicalSpecies.
Definition: SpeciesPhysicalProperties.cpp:290