Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
Loading...
Searching...
No Matches
common.h
Go to the documentation of this file.
1/*
2This file is part of Vlasiator.
3
4Copyright 2010, 2011, 2012, 2013 Finnish Meteorological Institute
5
6*/
7
8#ifndef COMMON_H
9#define COMMON_H
10# include <stdint.h>
11
12typedef uint32_t uint;
13typedef const uint32_t cuint;
14
15
16const uint WID = 4;
17const uint WID2 = WID*WID;
18const uint WID3 = WID2*WID;
19
20//set general floating point precision here. Default is single precision, use -DDP to set double precision
21#ifdef DP
22typedef double Real;
23typedef const double creal;
24#else
25typedef float Real;
26typedef const float creal;
27#endif
28
29
30#define MAX_BLOCKS_PER_DIM 1000
31#ifdef ACC_SEMILAG_PLM
32#define RECONSTRUCTION_ORDER 1
33#endif
34#ifdef ACC_SEMILAG_PPM
35#define RECONSTRUCTION_ORDER 2
36#endif
37#ifdef ACC_SEMILAG_PQM
38#define RECONSTRUCTION_ORDER 4
39#endif
40
41// Natural constants
42namespace physicalconstants {
43 const Real MU_0 = 1.25663706e-6;
44 const Real K_B = 1.3806503e-23;
45 const Real CHARGE = 1.60217653e-19;
46 const Real MASS_PROTON = 1.67262158e-27;
47 const Real R_E = 6.3712e6;
48}
49
50
51#endif
52
53
#define WID
Definition common.h:514
const int WID3
Definition common.h:517
const int WID2
Definition common.h:516
const uint32_t cuint
Definition definitions.h:50
float Real
Definition definitions.h:41
const float creal
Definition definitions.h:42
static const Real CHARGE
uint32_t uint
const Real K_B
Definition common.h:571
const Real MU_0
Definition common.h:570
static const Real MASS_PROTON
#define R_E
Definition test1.cpp:15