Celeritas  0.5.0-56+6b053cd
Classes | Namespaces | Macros | Functions
UnitTypes.hh File Reference

Annotated unit struct definitions for use with Quantity. More...

#include <utility>
#include "corecel/Config.hh"
#include "corecel/math/UnitUtils.hh"
#include "Constants.hh"
#include "Types.hh"
#include "Units.hh"
This graph shows which files directly or indirectly include this file:

Classes

struct  celeritas::units::CLight
 Natural unit of speed. More...
 
struct  celeritas::units::EElectron
 Natural unit of charge (positive electron) More...
 
struct  celeritas::units::Mev
 Nucleus-scale energy. More...
 
struct  celeritas::units::MevPerCsq
 Nucleus-scale mass. More...
 
struct  celeritas::units::MevPerC
 Nucleus-scale momentum. More...
 
struct  celeritas::units::Amu
 Atomic mass units [amu]. More...
 
struct  celeritas::units::Barn
 Barn cross section [b]. More...
 
struct  celeritas::units::Millibarn
 Millibarn cross section [mb]. More...
 
struct  celeritas::units::Mol
 Amount of substance \(N_a\). More...
 
struct  celeritas::units::Centimeter
 
struct  celeritas::units::Gram
 
struct  celeritas::units::Gauss
 
struct  celeritas::units::InvCentimeterCubed
 Inverse cubic centimeter for number densities. More...
 
struct  celeritas::units::MolPerCentimeterCubed
 Molar density. More...
 
struct  celeritas::units::GramPerCentimeterCubed
 Mass density. More...
 
struct  celeritas::units::Meter
 
struct  celeritas::units::Kilogram
 
struct  celeritas::units::Second
 
struct  celeritas::units::Tesla
 
struct  celeritas::units::Millimeter
 
struct  celeritas::units::Nanosecond
 
struct  celeritas::units::ClhepUnitMass
 Unit mass in CLHEP system. More...
 
struct  celeritas::units::ClhepUnitBField
 Unit magnetic flux density in CLHEP system. More...
 
struct  celeritas::units::Native
 Mark as being in the native/builtin unit system. More...
 
struct  celeritas::units::LogMev
 Annotate a quantity represented the logarithm of (E/MeV) More...
 

Namespaces

 celeritas::units
 Units in Celeritas for macro-scale quantities.
 

Macros

#define CELER_US_VISIT_CASE(TYPE)
 

Typedefs

Type aliases for unit system traits
using celeritas::units::CgsTraits = UnitSystemTraits< UnitSystem::cgs >
 
using celeritas::units::SiTraits = UnitSystemTraits< UnitSystem::si >
 
using celeritas::units::ClhepTraits = UnitSystemTraits< UnitSystem::clhep >
 
using celeritas::units::NativeTraits = UnitSystemTraits< UnitSystem::native >
 

Functions

template<class F >
constexpr decltype(auto) celeritas::units::visit_unit_system (F &&func, UnitSystem sys)
 Expand a macro to a switch statement over all possible unit system types. More...
 

Detailed Description

Annotated unit struct definitions for use with Quantity.

Macro Definition Documentation

◆ CELER_US_VISIT_CASE

#define CELER_US_VISIT_CASE (   TYPE)
Value:
case UnitSystem::TYPE: \
return std::forward<F>(func)(UnitSystemTraits<UnitSystem::TYPE>{});