QC.h

Classes

QC -- Physical constants (i.e. dimensioned values) (full description)
QC_init -- Class used to force construction of QC. (full description)
Global Functions -- Object used to force construction of QC. (full description)

class QC

Interface

Private Members
static void init()
See Also
QC_init -- Class used to force construction of QC.
QC initialization object -- Object used to force construction of QC.

Description

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25
Programs:
Tests:

Prerequisite

Etymology

A QC is based on the Quantum and C (constants) class

Synopsis

QC:name will produce a Quantity (Quantum<Double>) value consisting of a value and a unit. See the Quantum class for possibilities of manipulating quanta. tQuantum will give a list of the currently available constants

Example

To obtain the velocity of light in pc/a, use:
    #include <casa/Quanta.h>
    Double vel_pcpy = (C::c).convert("pc/a").getValue();
    

The following constants are defined as public data members of class QC.

Caution The following public data member documentation is currently extracted by hand, and thus could be out of date if this documentation was not updated when the class was modified.


    // vel of light
    static Quantum<Double> c;

    // Gravitational constant
    static Quantum<Double> G;

    // Planck
    static Quantum<Double> h;

    // HI line
    static Quantum<Double> HI;

    // Gas constant
    static Quantum<Double> R;

    // Avogadro
    static Quantum<Double> NA;

    // electron charge
    static Quantum<Double> e;

    // proton mass
    static Quantum<Double> mp;

    // mp/me
    static Quantum<Double> mp_me;

    // permeability vacuum
    static Quantum<Double> mu0;

    // permittivity vacuum
    static Quantum<Double> epsilon0;

    // Boltzmann
    static Quantum<Double> k;

    // Faraday
    static Quantum<Double> F;

    // mass electron
    static Quantum<Double> me;

    // radius electron
    static Quantum<Double> re;

    // Bohr's radius
    static Quantum<Double> a0;

    // Solar radius
    static Quantum<Double> R0;

    // IAU Gaussian grav. const **2
    static Quantum<Double> k2;

Motivation

Physical constants should be known with their proper dimensions

To Do

Member Description

static void init()

This function is used, in conjunction with the QC_init class to force construction of statics (see ARM 3.4).

class QC_init

Interface

Public Members
QC_init()
~QC_init()
See Also
QC initialization object -- Object used to force construction of QC.

Description

Synopsis

A static object of this class is used to make sure that QC is constructed before it is needed, and therefore that its static data members are defined. See Meyers, p. 47.

Member Description

QC_init()

~QC_init()


Object used to force construction of QC. (source)

Interface

Description

Synopsis

This static object of the QC_init class is used to make sure that QC is constructed before it is needed, and therefore that its static data members are defined. See Meyers, p. 47.

Member Description