Hipace
Classes | Namespaces | Functions | Variables
Constants.H File Reference
#include <AMReX_REAL.H>
#include <AMReX_GpuQualifiers.H>
#include <cmath>

Go to the source code of this file.

Classes

struct  PhysConst
 Struct containing physical constants, our main strategy to handle both SI and normalized units. More...
 

Namespaces

 PhysConstSI
 
 MathConst
 Namespace containing math constants.
 

Functions

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE PhysConst make_constants_SI ()
 SI Physical constants. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE PhysConst make_constants_normalized ()
 Physical constants in normalized units. More...
 
PhysConst get_phys_const ()
 Return the PhysConst object, which is a member of class Hipace. More...
 

Variables

static constexpr auto PhysConstSI::c = static_cast<amrex::Real>( 299'792'458. )
 
static constexpr auto PhysConstSI::ep0 = static_cast<amrex::Real>( 8.8541878128e-12 )
 
static constexpr auto PhysConstSI::mu0 = static_cast<amrex::Real>( 1.25663706212e-06 )
 
static constexpr auto PhysConstSI::q_e = static_cast<amrex::Real>( 1.602176634e-19 )
 
static constexpr auto PhysConstSI::m_e = static_cast<amrex::Real>( 9.1093837015e-31 )
 
static constexpr auto PhysConstSI::m_p = static_cast<amrex::Real>( 1.67262192369e-27 )
 
static constexpr auto PhysConstSI::hbar = static_cast<amrex::Real>( 1.054571817e-34 )
 
static constexpr auto PhysConstSI::r_e = static_cast<amrex::Real>( 2.817940326204929e-15 )
 
static constexpr amrex::Real MathConst::pi = 3.14159265358979323846
 

Function Documentation

◆ get_phys_const()

PhysConst get_phys_const ( )

Return the PhysConst object, which is a member of class Hipace.

◆ make_constants_normalized()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE PhysConst make_constants_normalized ( )

Physical constants in normalized units.

◆ make_constants_SI()

SI Physical constants.

Values are the 2018 CODATA recommended values https://physics.nist.gov/cuu/Constants/index.html