#ifndef __NAUNET_CONSTANTS_H__
#define __NAUNET_CONSTANTS_H__

{% if info.device == "gpu" %}
extern __constant__ double pi;

// atomic mass unit (g)
extern __constant__ double amu;

// mass of electron (g)
extern __constant__ double me;

// mass or electron (u)
extern __constant__ double meu;

// mass of proton (g)
extern __constant__ double mp;

// mass of neutron (g)
extern __constant__ double mn;

// mass of hydrogen (g)
extern __constant__ double mh;

// electron charge (esu)
extern __constant__ double echarge;

// Boltzmann constant (erg/K)
extern __constant__ double kerg;

{% for c in variables.consts.keys() %}
extern __constant__ double {{ c }};
{% endfor %}

{% if physics.h2shielding == "L96Table" %}
// H2 column density
extern __device__ double H2ShieldingTableX[105];
// H2 shielding factor
extern __device__ double H2ShieldingTable[105];
{% endif %}

{% if physics.coshielding == "V09Table" %}
// Excitation temperature
extern __device__ double COShieldingTableX[5];
// H2 column density
extern __device__ double COShieldingTableY[41];
// CO column density
extern __device__ double COShieldingTableZ[46];
// CO shielding factor
extern __device__ double COShieldingTable[5][41][46];
{% endif %}

{% if physics.n2shielding == "L13Table" %}
// Excitation temperature
extern __device__ double N2ShieldingTableX[5];
// H2 column density
extern __device__ double N2ShieldingTableY[46];
// N2 column density
extern __device__ double N2ShieldingTableZ[46];
// N2 shielding factor
extern __device__ double N2ShieldingTable[5][46][46];
{% endif %}

{% else %}
extern const double pi;

// atomic mass unit (g)
extern const double amu;

// mass of electron (g)
extern const double me;

// mass or electron (u)
extern const double meu;

// mass of proton (g)
extern const double mp;

// mass of neutron (g)
extern const double mn;

// mass of hydrogen (g)
extern const double mh;

// electron charge (esu)
extern const double echarge;

// Boltzmann constant (erg/K)
extern const double kerg;

{% for c in variables.consts.keys() %}
extern const double {{ c }};
{% endfor %}

{% if physics.h2shielding == "L96Table" %}
// H2 column density
extern const double H2ShieldingTableX[105];
// shielding factor (theta)
extern const double H2ShieldingTable[105];
{% endif %}

{% if physics.coshielding == "V09Table" %}
// Excitation temperature
extern const double COShieldingTableX[5];
// H2 column density
extern const double COShieldingTableY[41];
// CO column density
extern const double COShieldingTableZ[46];
// CO shielding factor
extern const double COShieldingTable[5][41][46];
{% endif %}

{% if physics.n2shielding == "L13Table" %}
// Excitation temperature
extern const double N2ShieldingTableX[5];
// H2 column density
extern const double N2ShieldingTableY[46];
// N2 column density
extern const double N2ShieldingTableZ[46];
// N2 shielding factor
extern const double N2ShieldingTable[5][46][46];
{% endif %}

{% endif %}

#endif