constant Namespace Reference


static const double sqrt2 = 1.4142135623730950488
static const double sqrt3 = 1.7320508075688772935
static const double two_pi = 6.28318530717958647688
static const double pi = 3.14159265358979323846
static const double pi_2 = 1.57079632679489661922
static const double pi_3 = 1.04719755119659774614
static const double inv_pi = 0.31830988618379067154
static const double deg2rad = 0.01745329251994329576
static const double rad2deg = 57.29577951308232087721
static const double e = 2.71828182845904523536
static const Mat9d unit_matrix

Detailed Description

This is a namespace that declares universal physical constants used in a variety of places in this application. Constants are not restricted to being simply scalars, for example $\pi$; but may also be defined as vectors or matrices, for example, the unit matrix $I$).

A typical usage in the application code could, for example, compute the area of a circle given the input dimension radius. In other words to compute the area of a circle $A=\pi r^2$; a code fragment in the application may look like this:

    const double area_of_a_circle (const double radius)
       return constant::pi * radius * radius;

Similarly for the diameter of a circle we could write:

    const double diameter_of_a_circle (const double radius)
       return constant::pi * 2 * radius;
This namespace only contains universal constants and not material parameters. All constants that pertain to specific materials should be defined by the user at run-time or in the input files.
Toby D. Young and Janek Cholewinski 2010.

Variable Documentation

const double constant::deg2rad = 0.01745329251994329576 [static]

Numerical value of $\pi/180$.

const double constant::e = 2.71828182845904523536 [static]

Numerical value of $e$.

const double constant::inv_pi = 0.31830988618379067154 [static]

Numerical value of $1/\pi$.

const double constant::pi = 3.14159265358979323846 [static]

Numerical value of $\pi$.

const double constant::pi_2 = 1.57079632679489661922 [static]

Numerical value of $\pi/2$.

const double constant::pi_3 = 1.04719755119659774614 [static]

Numerical value of $\pi/3$.

const double constant::rad2deg = 57.29577951308232087721 [static]

Numerical value of $180/\pi$.

const double constant::sqrt2 = 1.4142135623730950488 [static]

Numerical value of $\sqrt{2}$.

const double constant::sqrt3 = 1.7320508075688772935 [static]

Numerical value of $\sqrt{3}$.

const double constant::two_pi = 6.28318530717958647688 [static]

Numerical value of $2\pi$.

const Mat9d constant::unit_matrix [static]
Initial value:
 Mat9d(1., 0., 0.,
                                       0., 1., 0.,
                                       0., 0., 1.)

The unit matrix $I$.