aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/SpeciesPhysicalProperties.H
blob: dba12e353f5a03506ba919c3434845d84629ae76 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* Copyright 2020 Maxence Thevenet
 *
 * This file is part of WarpX.
 *
 * License: BSD-3-Clause-LBNL
 */

#ifndef WARPX_SPECIESPHYSICALPROPERTIES_H_
#define WARPX_SPECIESPHYSICALPROPERTIES_H_

#include <AMReX_REAL.H>

#include <optional>
#include <string>

enum struct PhysicalSpecies{
    unspecified=0, electron, positron, muon, antimuon, photon, neutron, proton, hydrogen, hydrogen1, hydrogen2, hydrogen3,
    helium, helium3, helium4, alpha, lithium, lithium6, lithium7, beryllium, beryllium9, boron, boron10, boron11, carbon,
    carbon12, carbon13, carbon14, nitrogen, nitrogen14, nitrogen15, oxygen, oxygen16, oxygen17, oxygen18, fluorine,
    fluorine19, neon, neon20, neon21, neon22, aluminium, argon, copper, xenon, gold};

namespace species
{
    /**
     * \brief Returns the PhysicalSpecies associated to a given name
     *
     * \param[in] species_name the name of a species
     * \return the PhysicalSpecies corresponding to species_name (if it exists)
     */
    std::optional<PhysicalSpecies> from_string (const std::string& species_name);

    /**
     * \brief Returns the charge associated to a PhysicalSpecies
     *
     * \param[in] ps the PhysicalSpecies
     * \return the charge associated to the PhysicalSpecies
     */
    amrex::Real get_charge (const PhysicalSpecies& ps);

    /**
     * \brief Returns the mass associated to a PhysicalSpecies
     *
     * \param[in] ps the PhysicalSpecies
     * \return the mass associated to the PhysicalSpecies
     */
    amrex::Real get_mass (const PhysicalSpecies& ps);

    /**
     * \brief Returns the name associated to a PhysicalSpecies
     *
     * \param[in] ps the PhysicalSpecies
     * \return the name associated to the PhysicalSpecies
     */
    std::string get_name (const PhysicalSpecies& ps);
}

#endif // WARPX_SPECIESPHYSICALPROPERTIES_H_