diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-10-30 12:57:26 -0700 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2012-10-30 12:57:26 -0700 |
commit | 1a78a62555be32868418fe52f8e330c9d0f95d5a (patch) | |
tree | d3765a80e7d3b9640ec2e930743630cd6b9fce2b /boost/units/systems/si | |
download | boost-1a78a62555be32868418fe52f8e330c9d0f95d5a.tar.gz boost-1a78a62555be32868418fe52f8e330c9d0f95d5a.tar.bz2 boost-1a78a62555be32868418fe52f8e330c9d0f95d5a.zip |
Imported Upstream version 1.49.0upstream/1.49.0
Diffstat (limited to 'boost/units/systems/si')
71 files changed, 3131 insertions, 0 deletions
diff --git a/boost/units/systems/si/absorbed_dose.hpp b/boost/units/systems/si/absorbed_dose.hpp new file mode 100644 index 0000000000..f59ec513b1 --- /dev/null +++ b/boost/units/systems/si/absorbed_dose.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_ABSORBED_DOSE_HPP +#define BOOST_UNITS_SI_ABSORBED_DOSE_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/absorbed_dose.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<absorbed_dose_dimension,si::system> absorbed_dose; + +BOOST_UNITS_STATIC_CONSTANT(gray,absorbed_dose); +BOOST_UNITS_STATIC_CONSTANT(grays,absorbed_dose); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_ABSORBED_DOSE_HPP diff --git a/boost/units/systems/si/acceleration.hpp b/boost/units/systems/si/acceleration.hpp new file mode 100644 index 0000000000..54ac29f0b8 --- /dev/null +++ b/boost/units/systems/si/acceleration.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_ACCELERATION_HPP +#define BOOST_UNITS_SI_ACCELERATION_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/acceleration.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<acceleration_dimension,si::system> acceleration; + +BOOST_UNITS_STATIC_CONSTANT(meter_per_second_squared,acceleration); +BOOST_UNITS_STATIC_CONSTANT(meters_per_second_squared,acceleration); +BOOST_UNITS_STATIC_CONSTANT(metre_per_second_squared,acceleration); +BOOST_UNITS_STATIC_CONSTANT(metres_per_second_squared,acceleration); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_ACCELERATION_HPP diff --git a/boost/units/systems/si/action.hpp b/boost/units/systems/si/action.hpp new file mode 100644 index 0000000000..43b6629369 --- /dev/null +++ b/boost/units/systems/si/action.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_ACTION_HPP +#define BOOST_UNITS_SI_ACTION_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/action.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<action_dimension,si::system> action; + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_ACTION_HPP diff --git a/boost/units/systems/si/activity.hpp b/boost/units/systems/si/activity.hpp new file mode 100644 index 0000000000..d31f0028d2 --- /dev/null +++ b/boost/units/systems/si/activity.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_ACTIVITY_HPP +#define BOOST_UNITS_SI_ACTIVITY_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/activity.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<activity_dimension,si::system> activity; + +BOOST_UNITS_STATIC_CONSTANT(becquerel,activity); +BOOST_UNITS_STATIC_CONSTANT(becquerels,activity); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_ACTIVITY_HPP diff --git a/boost/units/systems/si/amount.hpp b/boost/units/systems/si/amount.hpp new file mode 100644 index 0000000000..7fe8f413cd --- /dev/null +++ b/boost/units/systems/si/amount.hpp @@ -0,0 +1,33 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_AMOUNT_HPP +#define BOOST_UNITS_SI_AMOUNT_HPP + +#include <boost/units/systems/si/base.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<amount_dimension,si::system> amount; + +BOOST_UNITS_STATIC_CONSTANT(mole,amount); +BOOST_UNITS_STATIC_CONSTANT(moles,amount); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_AMOUNT_HPP diff --git a/boost/units/systems/si/angular_acceleration.hpp b/boost/units/systems/si/angular_acceleration.hpp new file mode 100644 index 0000000000..ff20102691 --- /dev/null +++ b/boost/units/systems/si/angular_acceleration.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_ANGULAR_ACCELERATION_HPP +#define BOOST_UNITS_SI_ANGULAR_ACCELERATION_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/angular_acceleration.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<angular_acceleration_dimension,si::system> angular_acceleration; + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_ANGULAR_ACCELERATION_HPP diff --git a/boost/units/systems/si/angular_momentum.hpp b/boost/units/systems/si/angular_momentum.hpp new file mode 100644 index 0000000000..7c20f5b4b5 --- /dev/null +++ b/boost/units/systems/si/angular_momentum.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_ANGULAR_MOMENTUM_HPP +#define BOOST_UNITS_SI_ANGULAR_MOMENTUM_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/angular_momentum.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<angular_momentum_dimension,si::system> angular_momentum; + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_ANGULAR_MOMENTUM_HPP diff --git a/boost/units/systems/si/angular_velocity.hpp b/boost/units/systems/si/angular_velocity.hpp new file mode 100644 index 0000000000..3149dc6eef --- /dev/null +++ b/boost/units/systems/si/angular_velocity.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_ANGULAR_VELOCITY_HPP +#define BOOST_UNITS_SI_ANGULAR_VELOCITY_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/angular_velocity.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<angular_velocity_dimension,si::system> angular_velocity; + +BOOST_UNITS_STATIC_CONSTANT(radian_per_second,angular_velocity); +BOOST_UNITS_STATIC_CONSTANT(radians_per_second,angular_velocity); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_ANGULAR_VELOCITY_HPP diff --git a/boost/units/systems/si/area.hpp b/boost/units/systems/si/area.hpp new file mode 100644 index 0000000000..568b80a5da --- /dev/null +++ b/boost/units/systems/si/area.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_AREA_HPP +#define BOOST_UNITS_SI_AREA_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/area.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<area_dimension,si::system> area; + +BOOST_UNITS_STATIC_CONSTANT(square_meter,area); +BOOST_UNITS_STATIC_CONSTANT(square_meters,area); +BOOST_UNITS_STATIC_CONSTANT(square_metre,area); +BOOST_UNITS_STATIC_CONSTANT(square_metres,area); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_AREA_HPP diff --git a/boost/units/systems/si/base.hpp b/boost/units/systems/si/base.hpp new file mode 100644 index 0000000000..469b294297 --- /dev/null +++ b/boost/units/systems/si/base.hpp @@ -0,0 +1,56 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_BASE_HPP +#define BOOST_UNITS_SI_BASE_HPP + +#include <string> + +#include <boost/units/static_constant.hpp> +#include <boost/units/unit.hpp> +#include <boost/units/make_system.hpp> + +#include <boost/units/base_units/si/meter.hpp> +#include <boost/units/base_units/si/kilogram.hpp> +#include <boost/units/base_units/si/second.hpp> +#include <boost/units/base_units/si/ampere.hpp> +#include <boost/units/base_units/si/kelvin.hpp> +#include <boost/units/base_units/si/mole.hpp> +#include <boost/units/base_units/si/candela.hpp> +#include <boost/units/base_units/angle/radian.hpp> +#include <boost/units/base_units/angle/steradian.hpp> + +namespace boost { + +namespace units { + +namespace si { + +/// placeholder class defining si unit system +typedef make_system<meter_base_unit, + kilogram_base_unit, + second_base_unit, + ampere_base_unit, + kelvin_base_unit, + mole_base_unit, + candela_base_unit, + angle::radian_base_unit, + angle::steradian_base_unit>::type system; + +/// dimensionless si unit +typedef unit<dimensionless_type,system> dimensionless; + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_BASE_HPP diff --git a/boost/units/systems/si/capacitance.hpp b/boost/units/systems/si/capacitance.hpp new file mode 100644 index 0000000000..076de71de9 --- /dev/null +++ b/boost/units/systems/si/capacitance.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_CAPACITANCE_HPP +#define BOOST_UNITS_SI_CAPACITANCE_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/capacitance.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<capacitance_dimension,si::system> capacitance; + +BOOST_UNITS_STATIC_CONSTANT(farad,capacitance); +BOOST_UNITS_STATIC_CONSTANT(farads,capacitance); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_CAPACITANCE_HPP diff --git a/boost/units/systems/si/catalytic_activity.hpp b/boost/units/systems/si/catalytic_activity.hpp new file mode 100644 index 0000000000..2a2e538657 --- /dev/null +++ b/boost/units/systems/si/catalytic_activity.hpp @@ -0,0 +1,37 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_CATALYTIC_ACTIVITY_HPP +#define BOOST_UNITS_SI_CATALYTIC_ACTIVITY_HPP + +#include <boost/units/derived_dimension.hpp> +#include <boost/units/systems/si/base.hpp> + +namespace boost { + +namespace units { + +namespace si { + +/// catalytic activity : T^-1 A^1 +typedef derived_dimension<time_base_dimension,-1,amount_base_dimension,1>::type catalytic_activity_dim; + +typedef unit<si::catalytic_activity_dim,si::system> catalytic_activity; + +BOOST_UNITS_STATIC_CONSTANT(katal,catalytic_activity); +BOOST_UNITS_STATIC_CONSTANT(katals,catalytic_activity); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_CATALYTIC_ACTIVITY_HPP diff --git a/boost/units/systems/si/codata/alpha_constants.hpp b/boost/units/systems/si/codata/alpha_constants.hpp new file mode 100644 index 0000000000..1b1846f2e3 --- /dev/null +++ b/boost/units/systems/si/codata/alpha_constants.hpp @@ -0,0 +1,65 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_ALPHA_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_ALPHA_CONSTANTS_HPP + +#include <boost/units/static_constant.hpp> + +#include <boost/units/systems/detail/constants.hpp> +#include <boost/units/systems/si/amount.hpp> +#include <boost/units/systems/si/area.hpp> +#include <boost/units/systems/si/electric_charge.hpp> +#include <boost/units/systems/si/energy.hpp> +#include <boost/units/systems/si/frequency.hpp> +#include <boost/units/systems/si/length.hpp> +#include <boost/units/systems/si/mass.hpp> +#include <boost/units/systems/si/magnetic_flux_density.hpp> +#include <boost/units/systems/si/time.hpp> +#include <boost/units/systems/si/wavenumber.hpp> + +#include <boost/units/systems/si/codata/typedefs.hpp> + +/// \file +/// CODATA recommended values of fundamental atomic and nuclear constants +/// CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +/// alpha particle mass +BOOST_UNITS_PHYSICAL_CONSTANT(m_alpha,quantity<mass>,6.64465620e-27*kilograms,3.3e-34*kilograms); +/// alpha-electron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_alpha_over_m_e,quantity<dimensionless>,7294.2995365*dimensionless(),3.1e-6*dimensionless()); +/// alpha-proton mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_alpha_over_m_p,quantity<dimensionless>,3.97259968951*dimensionless(),4.1e-10*dimensionless()); +/// alpha molar mass +BOOST_UNITS_PHYSICAL_CONSTANT(M_alpha,quantity<mass_over_amount>,4.001506179127e-3*kilograms/mole,6.2e-14*kilograms/mole); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_ALPHA_CONSTANTS_HPP diff --git a/boost/units/systems/si/codata/atomic-nuclear_constants.hpp b/boost/units/systems/si/codata/atomic-nuclear_constants.hpp new file mode 100644 index 0000000000..80b4c279e2 --- /dev/null +++ b/boost/units/systems/si/codata/atomic-nuclear_constants.hpp @@ -0,0 +1,56 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_ATOMIC_AND_NUCLEAR_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_ATOMIC_AND_NUCLEAR_CONSTANTS_HPP + +#include <boost/units/systems/si/codata/alpha_constants.hpp> +#include <boost/units/systems/si/codata/deuteron_constants.hpp> +#include <boost/units/systems/si/codata/electron_constants.hpp> +#include <boost/units/systems/si/codata/helion_constants.hpp> +#include <boost/units/systems/si/codata/muon_constants.hpp> +#include <boost/units/systems/si/codata/neutron_constants.hpp> +#include <boost/units/systems/si/codata/proton_constants.hpp> +#include <boost/units/systems/si/codata/tau_constants.hpp> +#include <boost/units/systems/si/codata/triton_constants.hpp> + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +// ATOMIC AND NUCLEAR +/// fine structure constant +BOOST_UNITS_PHYSICAL_CONSTANT(alpha,quantity<dimensionless>,7.2973525376e-3*dimensionless(),5.0e-12*dimensionless()); +/// Rydberg constant +BOOST_UNITS_PHYSICAL_CONSTANT(R_infinity,quantity<wavenumber>,10973731.568527/meter,7.3e-5/meter); +/// Bohr radius +BOOST_UNITS_PHYSICAL_CONSTANT(a_0,quantity<length>,0.52917720859e-10*meters,3.6e-20*meters); +/// Hartree energy +BOOST_UNITS_PHYSICAL_CONSTANT(E_h,quantity<energy>,4.35974394e-18*joules,2.2e-25*joules); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_ATOMIC_AND_NUCLEAR_CONSTANTS_HPP diff --git a/boost/units/systems/si/codata/deuteron_constants.hpp b/boost/units/systems/si/codata/deuteron_constants.hpp new file mode 100644 index 0000000000..a92b6664db --- /dev/null +++ b/boost/units/systems/si/codata/deuteron_constants.hpp @@ -0,0 +1,81 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_DEUTERON_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_DEUTERON_CONSTANTS_HPP + +#include <boost/units/static_constant.hpp> + +#include <boost/units/systems/detail/constants.hpp> +#include <boost/units/systems/si/amount.hpp> +#include <boost/units/systems/si/area.hpp> +#include <boost/units/systems/si/electric_charge.hpp> +#include <boost/units/systems/si/energy.hpp> +#include <boost/units/systems/si/frequency.hpp> +#include <boost/units/systems/si/length.hpp> +#include <boost/units/systems/si/mass.hpp> +#include <boost/units/systems/si/magnetic_flux_density.hpp> +#include <boost/units/systems/si/time.hpp> +#include <boost/units/systems/si/wavenumber.hpp> + +#include <boost/units/systems/si/codata/typedefs.hpp> + +/// \file +/// CODATA recommended values of fundamental atomic and nuclear constants +/// CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +/// deuteron mass +BOOST_UNITS_PHYSICAL_CONSTANT(m_d,quantity<mass>,3.34358320e-27*kilograms,1.7e-34*kilograms); +/// deuteron-electron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_d_over_m_e,quantity<dimensionless>,3670.4829654*dimensionless(),1.6e-6*dimensionless()); +/// deuteron-proton mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_d_over_m_p,quantity<dimensionless>,1.99900750108*dimensionless(),2.2e-10*dimensionless()); +/// deuteron molar mass +BOOST_UNITS_PHYSICAL_CONSTANT(M_d,quantity<mass_over_amount>,2.013553212724e-3*kilograms/mole,7.8e-14*kilograms/mole); +/// deuteron rms charge radius +BOOST_UNITS_PHYSICAL_CONSTANT(R_d,quantity<length>,2.1402e-15*meters,2.8e-18*meters); +/// deuteron magnetic moment +BOOST_UNITS_PHYSICAL_CONSTANT(mu_d,quantity<energy_over_magnetic_flux_density>,0.433073465e-26*joules/tesla,1.1e-34*joules/tesla); +/// deuteron-Bohr magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_B,quantity<dimensionless>,0.4669754556e-3*dimensionless(),3.9e-12*dimensionless()); +/// deuteron-nuclear magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_N,quantity<dimensionless>,0.8574382308*dimensionless(),7.2e-9*dimensionless()); +/// deuteron g-factor +BOOST_UNITS_PHYSICAL_CONSTANT(g_d,quantity<dimensionless>,0.8574382308*dimensionless(),7.2e-9*dimensionless()); +/// deuteron-electron magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_e,quantity<dimensionless>,-4.664345537e-4*dimensionless(),3.9e-12*dimensionless()); +/// deuteron-proton magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_p,quantity<dimensionless>,0.3070122070*dimensionless(),2.4e-9*dimensionless()); +/// deuteron-neutron magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_n,quantity<dimensionless>,-0.44820652*dimensionless(),1.1e-7*dimensionless()); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_DEUTERON_CONSTANTS_HPP diff --git a/boost/units/systems/si/codata/electromagnetic_constants.hpp b/boost/units/systems/si/codata/electromagnetic_constants.hpp new file mode 100644 index 0000000000..b2ffe26fb7 --- /dev/null +++ b/boost/units/systems/si/codata/electromagnetic_constants.hpp @@ -0,0 +1,74 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_ELECTROMAGNETIC_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_ELECTROMAGNETIC_CONSTANTS_HPP + +/// +/// \file +/// \brief CODATA recommended values of fundamental electromagnetic constants. +/// \details CODATA recommended values of the fundamental physical constants: NIST SP 961 +/// CODATA 2006 values as of 2007/03/30 +/// + +#include <boost/units/static_constant.hpp> + +#include <boost/units/systems/detail/constants.hpp> +#include <boost/units/systems/si/conductance.hpp> +#include <boost/units/systems/si/current.hpp> +#include <boost/units/systems/si/electric_charge.hpp> +#include <boost/units/systems/si/electric_potential.hpp> +#include <boost/units/systems/si/energy.hpp> +#include <boost/units/systems/si/frequency.hpp> +#include <boost/units/systems/si/magnetic_flux.hpp> +#include <boost/units/systems/si/magnetic_flux_density.hpp> +#include <boost/units/systems/si/resistance.hpp> + +#include <boost/units/systems/si/codata/typedefs.hpp> + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +// ELECTROMAGNETIC +/// elementary charge +BOOST_UNITS_PHYSICAL_CONSTANT(e,quantity<electric_charge>,1.602176487e-19*coulombs,4.0e-27*coulombs); +/// elementary charge to Planck constant ratio +BOOST_UNITS_PHYSICAL_CONSTANT(e_over_h,quantity<current_over_energy>,2.417989454e14*amperes/joule,6.0e6*amperes/joule); +/// magnetic flux quantum +BOOST_UNITS_PHYSICAL_CONSTANT(Phi_0,quantity<magnetic_flux>,2.067833667e-15*webers,5.2e-23*webers); +/// conductance quantum +BOOST_UNITS_PHYSICAL_CONSTANT(G_0,quantity<conductance>,7.7480917004e-5*siemens,5.3e-14*siemens); +/// Josephson constant +BOOST_UNITS_PHYSICAL_CONSTANT(K_J,quantity<frequency_over_electric_potential>,483597.891e9*hertz/volt,1.2e7*hertz/volt); +/// von Klitzing constant +BOOST_UNITS_PHYSICAL_CONSTANT(R_K,quantity<resistance>,25812.807557*ohms,1.77e-5*ohms); +/// Bohr magneton +BOOST_UNITS_PHYSICAL_CONSTANT(mu_B,quantity<energy_over_magnetic_flux_density>,927.400915e-26*joules/tesla,2.3e-31*joules/tesla); +/// nuclear magneton +BOOST_UNITS_PHYSICAL_CONSTANT(mu_N,quantity<energy_over_magnetic_flux_density>,5.05078324e-27*joules/tesla,1.3e-34*joules/tesla); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_ELECTROMAGNETIC_CONSTANTS_HPP diff --git a/boost/units/systems/si/codata/electron_constants.hpp b/boost/units/systems/si/codata/electron_constants.hpp new file mode 100644 index 0000000000..131ba92395 --- /dev/null +++ b/boost/units/systems/si/codata/electron_constants.hpp @@ -0,0 +1,105 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_ELECTRON_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_ELECTRON_CONSTANTS_HPP + +#include <boost/units/static_constant.hpp> + +#include <boost/units/systems/detail/constants.hpp> +#include <boost/units/systems/si/amount.hpp> +#include <boost/units/systems/si/area.hpp> +#include <boost/units/systems/si/electric_charge.hpp> +#include <boost/units/systems/si/energy.hpp> +#include <boost/units/systems/si/frequency.hpp> +#include <boost/units/systems/si/length.hpp> +#include <boost/units/systems/si/mass.hpp> +#include <boost/units/systems/si/magnetic_flux_density.hpp> +#include <boost/units/systems/si/time.hpp> +#include <boost/units/systems/si/wavenumber.hpp> + +#include <boost/units/systems/si/codata/typedefs.hpp> + +/// \file +/// CODATA recommended values of fundamental atomic and nuclear constants +/// CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +/// electron mass +BOOST_UNITS_PHYSICAL_CONSTANT(m_e,quantity<mass>,9.10938215e-31*kilograms,4.5e-38*kilograms); +/// electron-muon mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_mu,quantity<dimensionless>,4.83633171e-3*dimensionless(),1.2e-10*dimensionless()); +/// electron-tau mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_tau,quantity<dimensionless>,2.87564e-4*dimensionless(),4.7e-8*dimensionless()); +/// electron-proton mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_p,quantity<dimensionless>,5.4461702177e-4*dimensionless(),2.4e-13*dimensionless()); +/// electron-neutron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_n,quantity<dimensionless>,5.4386734459e-4*dimensionless(),3.3e-13*dimensionless()); +/// electron-deuteron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_d,quantity<dimensionless>,2.7244371093e-4*dimensionless(),1.2e-13*dimensionless()); +/// electron-alpha particle mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_alpha,quantity<dimensionless>,1.37093355570e-4*dimensionless(),5.8e-14*dimensionless()); +/// electron charge to mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(e_over_m_e,quantity<electric_charge_over_mass>,1.758820150e11*coulombs/kilogram,4.4e3*coulombs/kilogram); +/// electron molar mass +BOOST_UNITS_PHYSICAL_CONSTANT(M_e,quantity<mass_over_amount>,5.4857990943e-7*kilograms/mole,2.3e-16*kilograms/mole); +/// Compton wavelength +BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C,quantity<length>,2.4263102175e-12*meters,3.3e-21*meters); +/// classical electron radius +BOOST_UNITS_PHYSICAL_CONSTANT(r_e,quantity<length>,2.8179402894e-15*meters,5.8e-24*meters); +/// Thompson cross section +BOOST_UNITS_PHYSICAL_CONSTANT(sigma_e,quantity<area>,0.6652458558e-28*square_meters,2.7e-37*square_meters); +/// electron magnetic moment +BOOST_UNITS_PHYSICAL_CONSTANT(mu_e,quantity<energy_over_magnetic_flux_density>,-928.476377e-26*joules/tesla,2.3e-31*joules/tesla); +/// electron-Bohr magenton moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_B,quantity<dimensionless>,-1.00115965218111*dimensionless(),7.4e-13*dimensionless()); +/// electron-nuclear magneton moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_N,quantity<dimensionless>,-183.28197092*dimensionless(),8.0e-7*dimensionless()); +/// electron magnetic moment anomaly +BOOST_UNITS_PHYSICAL_CONSTANT(a_e,quantity<dimensionless>,1.15965218111e-3*dimensionless(),7.4e-13*dimensionless()); +/// electron g-factor +BOOST_UNITS_PHYSICAL_CONSTANT(g_e,quantity<dimensionless>,-2.0023193043622*dimensionless(),1.5e-12*dimensionless()); +/// electron-muon magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_mu,quantity<dimensionless>,206.7669877*dimensionless(),5.2e-6*dimensionless()); +/// electron-proton magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_p,quantity<dimensionless>,-658.2106848*dimensionless(),5.4e-6*dimensionless()); +/// electron-shielded proton magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_p_prime,quantity<dimensionless>,-658.2275971*dimensionless(),7.2e-6*dimensionless()); +/// electron-neutron magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_n,quantity<dimensionless>,960.92050*dimensionless(),2.3e-4*dimensionless()); +/// electron-deuteron magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_d,quantity<dimensionless>,-2143.923498*dimensionless(),1.8e-5*dimensionless()); +/// electron-shielded helion magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_h_prime,quantity<dimensionless>,864.058257*dimensionless(),1.0e-5*dimensionless()); +/// electron gyromagnetic ratio +BOOST_UNITS_PHYSICAL_CONSTANT(gamma_e,quantity<frequency_over_magnetic_flux_density>,1.760859770e11/second/tesla,4.4e3/second/tesla); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_ELECTRON_CONSTANTS_HPP diff --git a/boost/units/systems/si/codata/helion_constants.hpp b/boost/units/systems/si/codata/helion_constants.hpp new file mode 100644 index 0000000000..56665f3d08 --- /dev/null +++ b/boost/units/systems/si/codata/helion_constants.hpp @@ -0,0 +1,77 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_HELION_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_HELION_CONSTANTS_HPP + +#include <boost/units/static_constant.hpp> + +#include <boost/units/systems/detail/constants.hpp> +#include <boost/units/systems/si/amount.hpp> +#include <boost/units/systems/si/area.hpp> +#include <boost/units/systems/si/electric_charge.hpp> +#include <boost/units/systems/si/energy.hpp> +#include <boost/units/systems/si/frequency.hpp> +#include <boost/units/systems/si/length.hpp> +#include <boost/units/systems/si/mass.hpp> +#include <boost/units/systems/si/magnetic_flux_density.hpp> +#include <boost/units/systems/si/time.hpp> +#include <boost/units/systems/si/wavenumber.hpp> + +#include <boost/units/systems/si/codata/typedefs.hpp> + +/// \file +/// CODATA recommended values of fundamental atomic and nuclear constants +/// CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +/// helion mass +BOOST_UNITS_PHYSICAL_CONSTANT(m_h,quantity<mass>,5.00641192e-27*kilograms,2.5e-34*kilograms); +/// helion-electron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_h_over_m_e,quantity<dimensionless>,5495.8852765*dimensionless(),5.2e-6*dimensionless()); +/// helion-proton mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_h_over_m_p,quantity<dimensionless>,2.9931526713*dimensionless(),2.6e-9*dimensionless()); +/// helion molar mass +BOOST_UNITS_PHYSICAL_CONSTANT(M_h,quantity<mass_over_amount>,3.0149322473e-3*kilograms/mole,2.6e-12*kilograms/mole); +/// helion shielded magnetic moment +BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime,quantity<energy_over_magnetic_flux_density>,-1.074552982e-26*joules/tesla,3.0e-34*joules/tesla); +/// shielded helion-Bohr magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime_over_mu_B,quantity<dimensionless>,-1.158671471e-3*dimensionless(),1.4e-11*dimensionless()); +/// shielded helion-nuclear magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime_over_mu_N,quantity<dimensionless>,-2.127497718*dimensionless(),2.5e-8*dimensionless()); +/// shielded helion-proton magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime_over_mu_p,quantity<dimensionless>,-0.761766558*dimensionless(),1.1e-8*dimensionless()); +/// shielded helion-shielded proton magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime_over_mu_p_prime,quantity<dimensionless>,-0.7617861313*dimensionless(),3.3e-8*dimensionless()); +/// shielded helion gyromagnetic ratio +BOOST_UNITS_PHYSICAL_CONSTANT(gamma_h_prime,quantity<frequency_over_magnetic_flux_density>,2.037894730e8/second/tesla,5.6e-0/second/tesla); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_HELION_CONSTANTS_HPP diff --git a/boost/units/systems/si/codata/muon_constants.hpp b/boost/units/systems/si/codata/muon_constants.hpp new file mode 100644 index 0000000000..12afdf162d --- /dev/null +++ b/boost/units/systems/si/codata/muon_constants.hpp @@ -0,0 +1,83 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_MUON_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_MUON_CONSTANTS_HPP + +#include <boost/units/static_constant.hpp> + +#include <boost/units/systems/detail/constants.hpp> +#include <boost/units/systems/si/amount.hpp> +#include <boost/units/systems/si/area.hpp> +#include <boost/units/systems/si/electric_charge.hpp> +#include <boost/units/systems/si/energy.hpp> +#include <boost/units/systems/si/frequency.hpp> +#include <boost/units/systems/si/length.hpp> +#include <boost/units/systems/si/mass.hpp> +#include <boost/units/systems/si/magnetic_flux_density.hpp> +#include <boost/units/systems/si/time.hpp> +#include <boost/units/systems/si/wavenumber.hpp> + +#include <boost/units/systems/si/codata/typedefs.hpp> + +/// \file +/// CODATA recommended values of fundamental atomic and nuclear constants +/// CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +/// muon mass +BOOST_UNITS_PHYSICAL_CONSTANT(m_mu,quantity<mass>,1.88353130e-28*kilograms,1.1e-35*kilograms); +/// muon-electron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_mu_over_m_e,quantity<dimensionless>,206.7682823*dimensionless(),5.2e-6*dimensionless()); +/// muon-tau mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_mu_over_m_tau,quantity<dimensionless>,5.94592e-2*dimensionless(),9.7e-6*dimensionless()); +/// muon-proton mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_mu_over_m_p,quantity<dimensionless>,0.1126095261*dimensionless(),2.9e-9*dimensionless()); +/// muon-neutron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_mu_over_m_n,quantity<dimensionless>,0.1124545167*dimensionless(),2.9e-9*dimensionless()); +/// muon molar mass +BOOST_UNITS_PHYSICAL_CONSTANT(M_mu,quantity<mass_over_amount>,0.1134289256e-3*kilograms/mole,2.9e-12*kilograms/mole); +/// muon Compton wavelength +BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_mu,quantity<length>,11.73444104e-15*meters,3.0e-22*meters); +/// muon magnetic moment +BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu,quantity<energy_over_magnetic_flux_density>,-4.49044786e-26*joules/tesla,1.6e-33*joules/tesla); +/// muon-Bohr magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu_over_mu_B,quantity<dimensionless>,-4.84197049e-3*dimensionless(),1.2e-10*dimensionless()); +/// muon-nuclear magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu_over_mu_N,quantity<dimensionless>,-8.89059705*dimensionless(),2.3e-7*dimensionless()); +/// muon magnetic moment anomaly +BOOST_UNITS_PHYSICAL_CONSTANT(a_mu,quantity<dimensionless>,1.16592069e-3*dimensionless(),6.0e-10*dimensionless()); +/// muon g-factor +BOOST_UNITS_PHYSICAL_CONSTANT(g_mu,quantity<dimensionless>,-2.0023318414*dimensionless(),1.2e-9*dimensionless()); +/// muon-proton magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu_over_mu_p,quantity<dimensionless>,-3.183345137*dimensionless(),8.5e-8*dimensionless()); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_MUON_CONSTANTS_HPP diff --git a/boost/units/systems/si/codata/neutron_constants.hpp b/boost/units/systems/si/codata/neutron_constants.hpp new file mode 100644 index 0000000000..44d89bc089 --- /dev/null +++ b/boost/units/systems/si/codata/neutron_constants.hpp @@ -0,0 +1,83 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_NEUTRON_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_NEUTRON_CONSTANTS_HPP + +#include <boost/units/static_constant.hpp> + +#include <boost/units/systems/detail/constants.hpp> +#include <boost/units/systems/si/amount.hpp> +#include <boost/units/systems/si/area.hpp> +#include <boost/units/systems/si/electric_charge.hpp> +#include <boost/units/systems/si/energy.hpp> +#include <boost/units/systems/si/frequency.hpp> +#include <boost/units/systems/si/length.hpp> +#include <boost/units/systems/si/mass.hpp> +#include <boost/units/systems/si/magnetic_flux_density.hpp> +#include <boost/units/systems/si/time.hpp> +#include <boost/units/systems/si/wavenumber.hpp> + +#include <boost/units/systems/si/codata/typedefs.hpp> + +/// \file +/// CODATA recommended values of fundamental atomic and nuclear constants +/// CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +/// neutron mass +BOOST_UNITS_PHYSICAL_CONSTANT(m_n,quantity<mass>,1.674927211e-27*kilograms,8.4e-35*kilograms); +/// neutron-electron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_n_over_m_e,quantity<dimensionless>,1838.6836605*dimensionless(),1.1e-6*dimensionless()); +/// neutron-muon mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_n_over_m_mu,quantity<dimensionless>,8.89248409*dimensionless(),2.3e-7*dimensionless()); +/// neutron-tau mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_n_over_m_tau,quantity<dimensionless>,0.528740*dimensionless(),8.6e-5*dimensionless()); +/// neutron-proton mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_n_over_m_p,quantity<dimensionless>,1.00137841918*dimensionless(),4.6e-10*dimensionless()); +/// neutron molar mass +BOOST_UNITS_PHYSICAL_CONSTANT(M_n,quantity<mass_over_amount>,1.00866491597e-3*kilograms/mole,4.3e-13*kilograms/mole); +/// neutron Compton wavelength +BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_n,quantity<length>,1.3195908951e-15*meters,2.0e-24*meters); +/// neutron magnetic moment +BOOST_UNITS_PHYSICAL_CONSTANT(mu_n,quantity<energy_over_magnetic_flux_density>,-0.96623641e-26*joules/tesla,2.3e-33*joules/tesla); +/// neutron g-factor +BOOST_UNITS_PHYSICAL_CONSTANT(g_n,quantity<dimensionless>,-3.82608545*dimensionless(),9.0e-7*dimensionless()); +/// neutron-electron magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_n_over_mu_e,quantity<dimensionless>,1.04066882e-3*dimensionless(),2.5e-10*dimensionless()); +/// neutron-proton magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_n_over_mu_p,quantity<dimensionless>,-0.68497934*dimensionless(),1.6e-7*dimensionless()); +/// neutron-shielded proton magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_n_over_mu_p_prime,quantity<dimensionless>,-0.68499694*dimensionless(),1.6e-7*dimensionless()); +/// neutron gyromagnetic ratio +BOOST_UNITS_PHYSICAL_CONSTANT(gamma_n,quantity<frequency_over_magnetic_flux_density>,1.83247185e8/second/tesla,4.3e1/second/tesla); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_NEUTRON_CONSTANTS_HPP diff --git a/boost/units/systems/si/codata/physico-chemical_constants.hpp b/boost/units/systems/si/codata/physico-chemical_constants.hpp new file mode 100644 index 0000000000..0cde3ac4df --- /dev/null +++ b/boost/units/systems/si/codata/physico-chemical_constants.hpp @@ -0,0 +1,78 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_PHYSICO_CHEMICAL_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_PHYSICO_CHEMICAL_CONSTANTS_HPP + +#include <boost/units/pow.hpp> +#include <boost/units/static_constant.hpp> + +#include <boost/units/systems/detail/constants.hpp> +#include <boost/units/systems/si/amount.hpp> +#include <boost/units/systems/si/area.hpp> +#include <boost/units/systems/si/electric_charge.hpp> +#include <boost/units/systems/si/energy.hpp> +#include <boost/units/systems/si/frequency.hpp> +#include <boost/units/systems/si/mass.hpp> +#include <boost/units/systems/si/power.hpp> +#include <boost/units/systems/si/solid_angle.hpp> +#include <boost/units/systems/si/temperature.hpp> + +#include <boost/units/systems/si/codata/typedefs.hpp> + +/// \file +/// CODATA recommended values of fundamental physico-chemical constants +/// CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +// PHYSICO-CHEMICAL +/// Avogadro constant +BOOST_UNITS_PHYSICAL_CONSTANT(N_A,quantity<inverse_amount>,6.02214179e23/mole,3.0e16/mole); +/// atomic mass constant +BOOST_UNITS_PHYSICAL_CONSTANT(m_u,quantity<mass>,1.660538782e-27*kilograms,8.3e-35*kilograms); +/// Faraday constant +BOOST_UNITS_PHYSICAL_CONSTANT(F,quantity<electric_charge_over_amount>,96485.3399*coulombs/mole,2.4e-3*coulombs/mole); +/// molar gas constant +BOOST_UNITS_PHYSICAL_CONSTANT(R,quantity<energy_over_temperature_amount>,8.314472*joules/kelvin/mole,1.5e-5*joules/kelvin/mole); +/// Boltzmann constant +BOOST_UNITS_PHYSICAL_CONSTANT(k_B,quantity<energy_over_temperature>,1.3806504e-23*joules/kelvin,2.4e-29*joules/kelvin); +/// Stefan-Boltzmann constant +BOOST_UNITS_PHYSICAL_CONSTANT(sigma_SB,quantity<power_over_area_temperature_4>,5.670400e-8*watts/square_meter/pow<4>(kelvin),4.0e-13*watts/square_meter/pow<4>(kelvin)); +/// first radiation constant +BOOST_UNITS_PHYSICAL_CONSTANT(c_1,quantity<power_area>,3.74177118e-16*watt*square_meters,1.9e-23*watt*square_meters); +/// first radiation constant for spectral radiance +BOOST_UNITS_PHYSICAL_CONSTANT(c_1L,quantity<power_area_over_solid_angle>,1.191042759e-16*watt*square_meters/steradian,5.9e-24*watt*square_meters/steradian); +/// second radiation constant +BOOST_UNITS_PHYSICAL_CONSTANT(c_2,quantity<length_temperature>,1.4387752e-2*meter*kelvin,2.5e-8*meter*kelvin); +/// Wien displacement law constant : lambda_max T +BOOST_UNITS_PHYSICAL_CONSTANT(b,quantity<length_temperature>,2.8977685e-3*meter*kelvin,5.1e-9*meter*kelvin); +/// Wien displacement law constant : nu_max/T +BOOST_UNITS_PHYSICAL_CONSTANT(b_prime,quantity<frequency_over_temperature>,5.878933e10*hertz/kelvin,1.0e15*hertz/kelvin); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_PHYSICO_CHEMICAL_CONSTANTS_HPP diff --git a/boost/units/systems/si/codata/proton_constants.hpp b/boost/units/systems/si/codata/proton_constants.hpp new file mode 100644 index 0000000000..14c1ee06f3 --- /dev/null +++ b/boost/units/systems/si/codata/proton_constants.hpp @@ -0,0 +1,97 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_PROTON_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_PROTON_CONSTANTS_HPP + +#include <boost/units/static_constant.hpp> + +#include <boost/units/systems/detail/constants.hpp> +#include <boost/units/systems/si/amount.hpp> +#include <boost/units/systems/si/area.hpp> +#include <boost/units/systems/si/electric_charge.hpp> +#include <boost/units/systems/si/energy.hpp> +#include <boost/units/systems/si/frequency.hpp> +#include <boost/units/systems/si/length.hpp> +#include <boost/units/systems/si/mass.hpp> +#include <boost/units/systems/si/magnetic_flux_density.hpp> +#include <boost/units/systems/si/time.hpp> +#include <boost/units/systems/si/wavenumber.hpp> + +#include <boost/units/systems/si/codata/typedefs.hpp> + +/// \file +/// CODATA recommended values of fundamental atomic and nuclear constants +/// CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +/// proton mass +BOOST_UNITS_PHYSICAL_CONSTANT(m_p,quantity<mass>,1.672621637e-27*kilograms,8.3e-35*kilograms); +/// proton-electron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_p_over_m_e,quantity<dimensionless>,1836.15267247*dimensionless(),8.0e-7*dimensionless()); +/// proton-muon mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_p_over_m_mu,quantity<dimensionless>,8.88024339*dimensionless(),2.3e-7*dimensionless()); +/// proton-tau mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_p_over_m_tau,quantity<dimensionless>,0.528012*dimensionless(),8.6e-5*dimensionless()); +/// proton-neutron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_p_over_m_n,quantity<dimensionless>,0.99862347824*dimensionless(),4.6e-10*dimensionless()); +/// proton charge to mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(e_over_m_p,quantity<electric_charge_over_mass>,9.57883392e7*coulombs/kilogram,2.4e0*coulombs/kilogram); +/// proton molar mass +BOOST_UNITS_PHYSICAL_CONSTANT(M_p,quantity<mass_over_amount>,1.00727646677e-3*kilograms/mole,1.0e-13*kilograms/mole); +/// proton Compton wavelength +BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_p,quantity<length>,1.3214098446e-15*meters,1.9e-24*meters); +/// proton rms charge radius +BOOST_UNITS_PHYSICAL_CONSTANT(R_p,quantity<length>,0.8768e-15*meters,6.9e-18*meters); +/// proton magnetic moment +BOOST_UNITS_PHYSICAL_CONSTANT(mu_p,quantity<energy_over_magnetic_flux_density>,1.410606662e-26*joules/tesla,3.7e-34*joules/tesla); +/// proton-Bohr magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_over_mu_B,quantity<dimensionless>,1.521032209e-3*dimensionless(),1.2e-11*dimensionless()); +/// proton-nuclear magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_over_mu_N,quantity<dimensionless>,2.792847356*dimensionless(),2.3e-8*dimensionless()); +/// proton g-factor +BOOST_UNITS_PHYSICAL_CONSTANT(g_p,quantity<dimensionless>,5.585694713*dimensionless(),4.6e-8*dimensionless()); +/// proton-neutron magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_over_mu_n,quantity<dimensionless>,-1.45989806*dimensionless(),3.4e-7*dimensionless()); +/// shielded proton magnetic moment +BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_prime,quantity<energy_over_magnetic_flux_density>,1.410570419e-26*joules/tesla,3.8e-34*joules/tesla); +/// shielded proton-Bohr magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_prime_over_mu_B,quantity<dimensionless>,1.520993128e-3*dimensionless(),1.7e-11*dimensionless()); +/// shielded proton-nuclear magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_prime_over_mu_N,quantity<dimensionless>,2.792775598*dimensionless(),3.0e-8*dimensionless()); +/// proton magnetic shielding correction +BOOST_UNITS_PHYSICAL_CONSTANT(sigma_p_prime,quantity<dimensionless>,25.694e-6*dimensionless(),1.4e-8*dimensionless()); +/// proton gyromagnetic ratio +BOOST_UNITS_PHYSICAL_CONSTANT(gamma_p,quantity<frequency_over_magnetic_flux_density>,2.675222099e8/second/tesla,7.0e0/second/tesla); +/// shielded proton gyromagnetic ratio +BOOST_UNITS_PHYSICAL_CONSTANT(gamma_p_prime,quantity<frequency_over_magnetic_flux_density>,2.675153362e8/second/tesla,7.3e0/second/tesla); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_PROTON_CONSTANTS_HPP diff --git a/boost/units/systems/si/codata/tau_constants.hpp b/boost/units/systems/si/codata/tau_constants.hpp new file mode 100644 index 0000000000..653019e04a --- /dev/null +++ b/boost/units/systems/si/codata/tau_constants.hpp @@ -0,0 +1,71 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_TAU_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_TAU_CONSTANTS_HPP + +#include <boost/units/static_constant.hpp> + +#include <boost/units/systems/detail/constants.hpp> +#include <boost/units/systems/si/amount.hpp> +#include <boost/units/systems/si/area.hpp> +#include <boost/units/systems/si/electric_charge.hpp> +#include <boost/units/systems/si/energy.hpp> +#include <boost/units/systems/si/frequency.hpp> +#include <boost/units/systems/si/length.hpp> +#include <boost/units/systems/si/mass.hpp> +#include <boost/units/systems/si/magnetic_flux_density.hpp> +#include <boost/units/systems/si/time.hpp> +#include <boost/units/systems/si/wavenumber.hpp> + +#include <boost/units/systems/si/codata/typedefs.hpp> + +/// \file +/// CODATA recommended values of fundamental atomic and nuclear constants +/// CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +/// tau mass +BOOST_UNITS_PHYSICAL_CONSTANT(m_tau,quantity<mass>,3.16777e-27*kilograms,5.2e-31*kilograms); +/// tau-electron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_tau_over_m_e,quantity<dimensionless>,3477.48*dimensionless(),5.7e-1*dimensionless()); +/// tau-muon mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_tau_over_m_mu,quantity<dimensionless>,16.8183*dimensionless(),2.7e-3*dimensionless()); +/// tau-proton mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_tau_over_m_p,quantity<dimensionless>,1.89390*dimensionless(),3.1e-4*dimensionless()); +/// tau-neutron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_tau_over_m_n,quantity<dimensionless>,1.89129*dimensionless(),3.1e-4*dimensionless()); +/// tau molar mass +BOOST_UNITS_PHYSICAL_CONSTANT(M_tau,quantity<mass_over_amount>,1.90768e-3*kilograms/mole,3.1e-7*kilograms/mole); +/// tau Compton wavelength +BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_tau,quantity<length>,0.69772e-15*meters,1.1e-19*meters); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_TAU_CONSTANTS_HPP diff --git a/boost/units/systems/si/codata/triton_constants.hpp b/boost/units/systems/si/codata/triton_constants.hpp new file mode 100644 index 0000000000..24448abda7 --- /dev/null +++ b/boost/units/systems/si/codata/triton_constants.hpp @@ -0,0 +1,79 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_TRITON_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_TRITON_CONSTANTS_HPP + +#include <boost/units/static_constant.hpp> + +#include <boost/units/systems/detail/constants.hpp> +#include <boost/units/systems/si/amount.hpp> +#include <boost/units/systems/si/area.hpp> +#include <boost/units/systems/si/electric_charge.hpp> +#include <boost/units/systems/si/energy.hpp> +#include <boost/units/systems/si/frequency.hpp> +#include <boost/units/systems/si/length.hpp> +#include <boost/units/systems/si/mass.hpp> +#include <boost/units/systems/si/magnetic_flux_density.hpp> +#include <boost/units/systems/si/time.hpp> +#include <boost/units/systems/si/wavenumber.hpp> + +#include <boost/units/systems/si/codata/typedefs.hpp> + +/// \file +/// CODATA recommended values of fundamental atomic and nuclear constants +/// CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +/// triton mass +BOOST_UNITS_PHYSICAL_CONSTANT(m_t,quantity<mass>,5.00735588e-27*kilograms,2.5e-34*kilograms); +/// triton-electron mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_t_over_m_e,quantity<dimensionless>,5496.9215269*dimensionless(),5.1e-6*dimensionless()); +/// triton-proton mass ratio +BOOST_UNITS_PHYSICAL_CONSTANT(m_t_over_m_p,quantity<dimensionless>,2.9937170309*dimensionless(),2.5e-9*dimensionless()); +/// triton molar mass +BOOST_UNITS_PHYSICAL_CONSTANT(M_t,quantity<mass_over_amount>,3.0155007134e-3*kilograms/mole,2.5e-12*kilograms/mole); +/// triton magnetic moment +BOOST_UNITS_PHYSICAL_CONSTANT(mu_t,quantity<energy_over_magnetic_flux_density>,1.504609361e-26*joules/tesla,4.2e-34*joules/tesla); +/// triton-Bohr magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_B,quantity<dimensionless>,1.622393657e-3*dimensionless(),2.1e-11*dimensionless()); +/// triton-nuclear magneton ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_N,quantity<dimensionless>,2.978962448*dimensionless(),3.8e-8*dimensionless()); +/// triton g-factor +BOOST_UNITS_PHYSICAL_CONSTANT(g_t,quantity<dimensionless>,5.957924896*dimensionless(),7.6e-8*dimensionless()); +/// triton-electron magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_e,quantity<dimensionless>,-1.620514423e-3*dimensionless(),2.1e-11*dimensionless()); +/// triton-proton magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_p,quantity<dimensionless>,1.066639908*dimensionless(),1.0e-8*dimensionless()); +/// triton-neutron magnetic moment ratio +BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_n,quantity<dimensionless>,-1.55718553*dimensionless(),3.7e-7*dimensionless()); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_TRITON_CONSTANTS_HPP diff --git a/boost/units/systems/si/codata/typedefs.hpp b/boost/units/systems/si/codata/typedefs.hpp new file mode 100644 index 0000000000..27330ce061 --- /dev/null +++ b/boost/units/systems/si/codata/typedefs.hpp @@ -0,0 +1,79 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_TYPEDEFS_HPP +#define BOOST_UNITS_CODATA_TYPEDEFS_HPP + +#include <boost/units/operators.hpp> +#include <boost/units/systems/si/amount.hpp> +#include <boost/units/systems/si/area.hpp> +#include <boost/units/systems/si/capacitance.hpp> +#include <boost/units/systems/si/electric_charge.hpp> +#include <boost/units/systems/si/current.hpp> +#include <boost/units/systems/si/electric_potential.hpp> +#include <boost/units/systems/si/energy.hpp> +#include <boost/units/systems/si/force.hpp> +#include <boost/units/systems/si/frequency.hpp> +#include <boost/units/systems/si/magnetic_flux_density.hpp> +#include <boost/units/systems/si/mass.hpp> +#include <boost/units/systems/si/length.hpp> +#include <boost/units/systems/si/power.hpp> +#include <boost/units/systems/si/solid_angle.hpp> +#include <boost/units/systems/si/temperature.hpp> +#include <boost/units/systems/si/time.hpp> +#include <boost/units/systems/si/volume.hpp> + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +typedef divide_typeof_helper<frequency,electric_potential>::type frequency_over_electric_potential; +typedef divide_typeof_helper<electric_charge,mass>::type electric_charge_over_mass; +typedef divide_typeof_helper<mass,amount>::type mass_over_amount; +typedef divide_typeof_helper<energy,magnetic_flux_density>::type energy_over_magnetic_flux_density; +typedef divide_typeof_helper<frequency,magnetic_flux_density>::type frequency_over_magnetic_flux_density; +typedef divide_typeof_helper<current,energy>::type current_over_energy; +typedef divide_typeof_helper<dimensionless,amount>::type inverse_amount; +typedef divide_typeof_helper<energy,temperature>::type energy_over_temperature; +typedef divide_typeof_helper<energy_over_temperature,amount>::type energy_over_temperature_amount; +typedef divide_typeof_helper< + divide_typeof_helper<power,area>::type, + power_typeof_helper<temperature,static_rational<4> >::type + >::type power_over_area_temperature_4; +typedef multiply_typeof_helper<power,area>::type power_area; +typedef divide_typeof_helper<power_area,solid_angle>::type power_area_over_solid_angle; +typedef multiply_typeof_helper<length,temperature>::type length_temperature; +typedef divide_typeof_helper<frequency,temperature>::type frequency_over_temperature; +typedef divide_typeof_helper<divide_typeof_helper<force,current>::type,current>::type force_over_current_squared; +typedef divide_typeof_helper<capacitance,length>::type capacitance_over_length; +typedef divide_typeof_helper< + divide_typeof_helper<divide_typeof_helper<volume,mass>::type,time>::type, + time + >::type volume_over_mass_time_squared; +typedef multiply_typeof_helper<energy,time>::type energy_time; +typedef divide_typeof_helper<electric_charge,amount>::type electric_charge_over_amount; + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif diff --git a/boost/units/systems/si/codata/universal_constants.hpp b/boost/units/systems/si/codata/universal_constants.hpp new file mode 100644 index 0000000000..21f076b741 --- /dev/null +++ b/boost/units/systems/si/codata/universal_constants.hpp @@ -0,0 +1,80 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_UNIVERSAL_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_UNIVERSAL_CONSTANTS_HPP + +#include <boost/units/static_constant.hpp> + +#include <boost/units/systems/detail/constants.hpp> +#include <boost/units/systems/si/capacitance.hpp> +#include <boost/units/systems/si/current.hpp> +#include <boost/units/systems/si/energy.hpp> +#include <boost/units/systems/si/force.hpp> +#include <boost/units/systems/si/length.hpp> +#include <boost/units/systems/si/mass.hpp> +#include <boost/units/systems/si/resistance.hpp> +#include <boost/units/systems/si/temperature.hpp> +#include <boost/units/systems/si/time.hpp> +#include <boost/units/systems/si/velocity.hpp> +#include <boost/units/systems/si/volume.hpp> +#include <boost/units/systems/si/codata/typedefs.hpp> + +/// \file +/// CODATA recommended values of fundamental universal constants +/// using CODATA 2006 values as of 2007/03/30 + +namespace boost { + +namespace units { + +namespace si { + +namespace constants { + +namespace codata { + +/// CODATA recommended values of the fundamental physical constants: NIST SP 961 + +// UNIVERSAL +/// speed of light +BOOST_UNITS_PHYSICAL_CONSTANT(c,quantity<velocity>,299792458.0*meters/second,0.0*meters/second); +/// magnetic constant (exactly 4 pi x 10^(-7) - error is due to finite precision of pi) +BOOST_UNITS_PHYSICAL_CONSTANT(mu_0,quantity<force_over_current_squared>,12.56637061435917295385057353311801153679e-7*newtons/ampere/ampere,0.0*newtons/ampere/ampere); +/// electric constant +BOOST_UNITS_PHYSICAL_CONSTANT(epsilon_0,quantity<capacitance_over_length>,8.854187817620389850536563031710750260608e-12*farad/meter,0.0*farad/meter); +/// characteristic impedance of vacuum +BOOST_UNITS_PHYSICAL_CONSTANT(Z_0,quantity<resistance>,376.7303134617706554681984004203193082686*ohm,0.0*ohm); +/// Newtonian constant of gravitation +BOOST_UNITS_PHYSICAL_CONSTANT(G,quantity<volume_over_mass_time_squared>,6.67428e-11*cubic_meters/kilogram/second/second,6.7e-15*cubic_meters/kilogram/second/second); +/// Planck constant +BOOST_UNITS_PHYSICAL_CONSTANT(h,quantity<energy_time>,6.62606896e-34*joule*seconds,3.3e-41*joule*seconds); +/// Dirac constant +BOOST_UNITS_PHYSICAL_CONSTANT(hbar,quantity<energy_time>,1.054571628e-34*joule*seconds,5.3e-42*joule*seconds); +/// Planck mass +BOOST_UNITS_PHYSICAL_CONSTANT(m_P,quantity<mass>,2.17644e-8*kilograms,1.1e-12*kilograms); +/// Planck temperature +BOOST_UNITS_PHYSICAL_CONSTANT(T_P,quantity<temperature>,1.416785e32*kelvin,7.1e27*kelvin); +/// Planck length +BOOST_UNITS_PHYSICAL_CONSTANT(l_P,quantity<length>,1.616252e-35*meters,8.1e-40*meters); +/// Planck time +BOOST_UNITS_PHYSICAL_CONSTANT(t_P,quantity<time>,5.39124e-44*seconds,2.7e-48*seconds); + +} // namespace codata + +} // namespace constants + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_CODATA_UNIVERSAL_CONSTANTS_HPP diff --git a/boost/units/systems/si/codata_constants.hpp b/boost/units/systems/si/codata_constants.hpp new file mode 100644 index 0000000000..69bb858a24 --- /dev/null +++ b/boost/units/systems/si/codata_constants.hpp @@ -0,0 +1,19 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_CODATA_CONSTANTS_HPP +#define BOOST_UNITS_CODATA_CONSTANTS_HPP + +#include <boost/units/systems/si/codata/atomic-nuclear_constants.hpp> +#include <boost/units/systems/si/codata/electromagnetic_constants.hpp> +#include <boost/units/systems/si/codata/physico-chemical_constants.hpp> +#include <boost/units/systems/si/codata/universal_constants.hpp> + +#endif // BOOST_UNITS_CODATA_CONSTANTS_HPP diff --git a/boost/units/systems/si/conductance.hpp b/boost/units/systems/si/conductance.hpp new file mode 100644 index 0000000000..68c82c9648 --- /dev/null +++ b/boost/units/systems/si/conductance.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_CONDUCTANCE_HPP +#define BOOST_UNITS_SI_CONDUCTANCE_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/conductance.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<conductance_dimension,si::system> conductance; + +BOOST_UNITS_STATIC_CONSTANT(siemen,conductance); +BOOST_UNITS_STATIC_CONSTANT(siemens,conductance); +BOOST_UNITS_STATIC_CONSTANT(mho,conductance); +BOOST_UNITS_STATIC_CONSTANT(mhos,conductance); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_CONDUCTANCE_HPP diff --git a/boost/units/systems/si/conductivity.hpp b/boost/units/systems/si/conductivity.hpp new file mode 100644 index 0000000000..0f48b64e49 --- /dev/null +++ b/boost/units/systems/si/conductivity.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_CONDUCTIVITY_HPP +#define BOOST_UNITS_SI_CONDUCTIVITY_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/conductivity.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<conductivity_dimension,si::system> conductivity; + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_CONDUCTIVITY_HPP diff --git a/boost/units/systems/si/current.hpp b/boost/units/systems/si/current.hpp new file mode 100644 index 0000000000..e2ba345b80 --- /dev/null +++ b/boost/units/systems/si/current.hpp @@ -0,0 +1,33 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_CURRENT_HPP +#define BOOST_UNITS_SI_CURRENT_HPP + +#include <boost/units/systems/si/base.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<current_dimension,si::system> current; + +BOOST_UNITS_STATIC_CONSTANT(ampere,current); +BOOST_UNITS_STATIC_CONSTANT(amperes,current); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_CURRENT_HPP diff --git a/boost/units/systems/si/dimensionless.hpp b/boost/units/systems/si/dimensionless.hpp new file mode 100644 index 0000000000..aa7b2c380d --- /dev/null +++ b/boost/units/systems/si/dimensionless.hpp @@ -0,0 +1,30 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_DIMENSIONLESS_HPP +#define BOOST_UNITS_SI_DIMENSIONLESS_HPP + +#include <boost/units/systems/si/base.hpp> + +namespace boost { + +namespace units { + +namespace si { + +BOOST_UNITS_STATIC_CONSTANT(si_dimensionless,dimensionless); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_DIMENSIONLESS_HPP diff --git a/boost/units/systems/si/dose_equivalent.hpp b/boost/units/systems/si/dose_equivalent.hpp new file mode 100644 index 0000000000..0be0d3b000 --- /dev/null +++ b/boost/units/systems/si/dose_equivalent.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_DOSE_EQUIVALENT_HPP +#define BOOST_UNITS_SI_DOSE_EQUIVALENT_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/dose_equivalent.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<dose_equivalent_dimension,si::system> dose_equivalent; + +BOOST_UNITS_STATIC_CONSTANT(sievert,dose_equivalent); +BOOST_UNITS_STATIC_CONSTANT(sieverts,dose_equivalent); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_DOSE_EQUIVALENT_HPP diff --git a/boost/units/systems/si/dynamic_viscosity.hpp b/boost/units/systems/si/dynamic_viscosity.hpp new file mode 100644 index 0000000000..f72523feca --- /dev/null +++ b/boost/units/systems/si/dynamic_viscosity.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_DYNAMIC_VISCOSITY_HPP +#define BOOST_UNITS_SI_DYNAMIC_VISCOSITY_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/dynamic_viscosity.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<dynamic_viscosity_dimension,si::system> dynamic_viscosity; + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_DYNAMIC_VISCOSITY_HPP diff --git a/boost/units/systems/si/electric_charge.hpp b/boost/units/systems/si/electric_charge.hpp new file mode 100644 index 0000000000..fa1ccff018 --- /dev/null +++ b/boost/units/systems/si/electric_charge.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_ELECTRIC_CHARGE_HPP +#define BOOST_UNITS_SI_ELECTRIC_CHARGE_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/electric_charge.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<electric_charge_dimension,si::system> electric_charge; + +BOOST_UNITS_STATIC_CONSTANT(coulomb,electric_charge); +BOOST_UNITS_STATIC_CONSTANT(coulombs,electric_charge); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_ELECTRIC_CHARGE_HPP diff --git a/boost/units/systems/si/electric_potential.hpp b/boost/units/systems/si/electric_potential.hpp new file mode 100644 index 0000000000..e737985bc8 --- /dev/null +++ b/boost/units/systems/si/electric_potential.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_ELECTRIC_POTENTIAL_HPP +#define BOOST_UNITS_SI_ELECTRIC_POTENTIAL_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/electric_potential.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<electric_potential_dimension,si::system> electric_potential; + +BOOST_UNITS_STATIC_CONSTANT(volt,electric_potential); +BOOST_UNITS_STATIC_CONSTANT(volts,electric_potential); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_ELECTRIC_POTENTIAL_HPP diff --git a/boost/units/systems/si/energy.hpp b/boost/units/systems/si/energy.hpp new file mode 100644 index 0000000000..4fb1aa806d --- /dev/null +++ b/boost/units/systems/si/energy.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_ENERGY_HPP +#define BOOST_UNITS_SI_ENERGY_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/energy.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<energy_dimension,si::system> energy; + +BOOST_UNITS_STATIC_CONSTANT(joule,energy); +BOOST_UNITS_STATIC_CONSTANT(joules,energy); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_ENERGY_HPP diff --git a/boost/units/systems/si/force.hpp b/boost/units/systems/si/force.hpp new file mode 100644 index 0000000000..cd2689f6b3 --- /dev/null +++ b/boost/units/systems/si/force.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_FORCE_HPP +#define BOOST_UNITS_SI_FORCE_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/force.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<force_dimension,si::system> force; + +BOOST_UNITS_STATIC_CONSTANT(newton,force); +BOOST_UNITS_STATIC_CONSTANT(newtons,force); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_FORCE_HPP diff --git a/boost/units/systems/si/frequency.hpp b/boost/units/systems/si/frequency.hpp new file mode 100644 index 0000000000..83fbb5cff2 --- /dev/null +++ b/boost/units/systems/si/frequency.hpp @@ -0,0 +1,33 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_FREQUENCY_HPP +#define BOOST_UNITS_SI_FREQUENCY_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/frequency.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<frequency_dimension,si::system> frequency; + +BOOST_UNITS_STATIC_CONSTANT(hertz,frequency); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_FREQUENCY_HPP diff --git a/boost/units/systems/si/illuminance.hpp b/boost/units/systems/si/illuminance.hpp new file mode 100644 index 0000000000..96f28c70b7 --- /dev/null +++ b/boost/units/systems/si/illuminance.hpp @@ -0,0 +1,33 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_ILLUMINANCE_HPP +#define BOOST_UNITS_SI_ILLUMINANCE_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/illuminance.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<illuminance_dimension,si::system> illuminance; + +BOOST_UNITS_STATIC_CONSTANT(lux,illuminance); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_ILLUMINANCE_HPP diff --git a/boost/units/systems/si/impedance.hpp b/boost/units/systems/si/impedance.hpp new file mode 100644 index 0000000000..d2d7195e64 --- /dev/null +++ b/boost/units/systems/si/impedance.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_IMPEDANCE_HPP +#define BOOST_UNITS_SI_IMPEDANCE_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/impedance.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<impedance_dimension,si::system> impedance; + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_IMPEDANCE_HPP diff --git a/boost/units/systems/si/inductance.hpp b/boost/units/systems/si/inductance.hpp new file mode 100644 index 0000000000..a3f8f3ad31 --- /dev/null +++ b/boost/units/systems/si/inductance.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_INDUCTANCE_HPP +#define BOOST_UNITS_SI_INDUCTANCE_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/inductance.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<inductance_dimension,si::system> inductance; + +BOOST_UNITS_STATIC_CONSTANT(henry,inductance); +BOOST_UNITS_STATIC_CONSTANT(henrys,inductance); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_INDUCTANCE_HPP diff --git a/boost/units/systems/si/io.hpp b/boost/units/systems/si/io.hpp new file mode 100644 index 0000000000..3f096cae83 --- /dev/null +++ b/boost/units/systems/si/io.hpp @@ -0,0 +1,88 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_IO_HPP +#define BOOST_UNITS_SI_IO_HPP + +#include <boost/units/io.hpp> +#include <boost/units/reduce_unit.hpp> + +#include <boost/units/systems/si.hpp> + +namespace boost { + +namespace units { + +// gray and sievert are indistinguishable +inline std::string name_string(const reduce_unit<si::absorbed_dose>::type&) { return "gray"; } +inline std::string symbol_string(const reduce_unit<si::absorbed_dose>::type&) { return "Gy"; } + +// activity and frequency are indistinguishable - would need a "decays" base unit +//inline std::string name_string(const si::activity&) { return "becquerel"; } +//inline std::string symbol_string(const si::activity&) { return "Bq"; } + +inline std::string name_string(const reduce_unit<si::capacitance>::type&) { return "farad"; } +inline std::string symbol_string(const reduce_unit<si::capacitance>::type&) { return "F"; } + +inline std::string name_string(const reduce_unit<si::catalytic_activity>::type&) { return "katal"; } +inline std::string symbol_string(const reduce_unit<si::catalytic_activity>::type&) { return "kat"; } + +inline std::string name_string(const reduce_unit<si::conductance>::type&) { return "siemen"; } +inline std::string symbol_string(const reduce_unit<si::conductance>::type&) { return "S"; } + +// gray and sievert are indistinguishable +//inline std::string name_string(const si::dose_equivalent&) { return "sievert"; } +//inline std::string symbol_string(const si::dose_equivalent&) { return "Sv"; } + +inline std::string name_string(const reduce_unit<si::electric_charge>::type&) { return "coulomb"; } +inline std::string symbol_string(const reduce_unit<si::electric_charge>::type&) { return "C"; } + +inline std::string name_string(const reduce_unit<si::electric_potential>::type&) { return "volt"; } +inline std::string symbol_string(const reduce_unit<si::electric_potential>::type&) { return "V"; } + +inline std::string name_string(const reduce_unit<si::energy>::type&) { return "joule"; } +inline std::string symbol_string(const reduce_unit<si::energy>::type&) { return "J"; } + +inline std::string name_string(const reduce_unit<si::force>::type&) { return "newton"; } +inline std::string symbol_string(const reduce_unit<si::force>::type&) { return "N"; } + +inline std::string name_string(const reduce_unit<si::frequency>::type&) { return "hertz"; } +inline std::string symbol_string(const reduce_unit<si::frequency>::type&) { return "Hz"; } + +inline std::string name_string(const reduce_unit<si::illuminance>::type&) { return "lux"; } +inline std::string symbol_string(const reduce_unit<si::illuminance>::type&) { return "lx"; } + +inline std::string name_string(const reduce_unit<si::inductance>::type&) { return "henry"; } +inline std::string symbol_string(const reduce_unit<si::inductance>::type&) { return "H"; } + +inline std::string name_string(const reduce_unit<si::luminous_flux>::type&) { return "lumen"; } +inline std::string symbol_string(const reduce_unit<si::luminous_flux>::type&) { return "lm"; } + +inline std::string name_string(const reduce_unit<si::magnetic_flux>::type&) { return "weber"; } +inline std::string symbol_string(const reduce_unit<si::magnetic_flux>::type&) { return "Wb"; } + +inline std::string name_string(const reduce_unit<si::magnetic_flux_density>::type&) { return "tesla"; } +inline std::string symbol_string(const reduce_unit<si::magnetic_flux_density>::type&) { return "T"; } + +inline std::string name_string(const reduce_unit<si::power>::type&) { return "watt"; } +inline std::string symbol_string(const reduce_unit<si::power>::type&) { return "W"; } + +inline std::string name_string(const reduce_unit<si::pressure>::type&) { return "pascal"; } +inline std::string symbol_string(const reduce_unit<si::pressure>::type&) { return "Pa"; } + +inline std::string name_string(const reduce_unit<si::resistance>::type&) { return "ohm"; } +inline std::string symbol_string(const reduce_unit<si::resistance>::type&) { return "Ohm"; } + + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_IO_HPP diff --git a/boost/units/systems/si/kinematic_viscosity.hpp b/boost/units/systems/si/kinematic_viscosity.hpp new file mode 100644 index 0000000000..0224644c1e --- /dev/null +++ b/boost/units/systems/si/kinematic_viscosity.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_KINEMATIC_VISCOSITY_HPP +#define BOOST_UNITS_SI_KINEMATIC_VISCOSITY_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/kinematic_viscosity.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<kinematic_viscosity_dimension,si::system> kinematic_viscosity; + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_KINEMATIC_VISCOSITY_HPP diff --git a/boost/units/systems/si/length.hpp b/boost/units/systems/si/length.hpp new file mode 100644 index 0000000000..40eab13dbc --- /dev/null +++ b/boost/units/systems/si/length.hpp @@ -0,0 +1,35 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_LENGTH_HPP +#define BOOST_UNITS_SI_LENGTH_HPP + +#include <boost/units/systems/si/base.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<length_dimension,si::system> length; + +BOOST_UNITS_STATIC_CONSTANT(meter,length); +BOOST_UNITS_STATIC_CONSTANT(meters,length); +BOOST_UNITS_STATIC_CONSTANT(metre,length); +BOOST_UNITS_STATIC_CONSTANT(metres,length); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_LENGTH_HPP diff --git a/boost/units/systems/si/luminous_flux.hpp b/boost/units/systems/si/luminous_flux.hpp new file mode 100644 index 0000000000..99a1acf859 --- /dev/null +++ b/boost/units/systems/si/luminous_flux.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_LUMINOUS_FLUX_HPP +#define BOOST_UNITS_SI_LUMINOUS_FLUX_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/luminous_flux.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<luminous_flux_dimension,si::system> luminous_flux; + +BOOST_UNITS_STATIC_CONSTANT(lumen,luminous_flux); +BOOST_UNITS_STATIC_CONSTANT(lumens,luminous_flux); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_LUMINOUS_FLUX_HPP diff --git a/boost/units/systems/si/luminous_intensity.hpp b/boost/units/systems/si/luminous_intensity.hpp new file mode 100644 index 0000000000..2558c9e470 --- /dev/null +++ b/boost/units/systems/si/luminous_intensity.hpp @@ -0,0 +1,33 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_LUMINOUS_INTENSITY_HPP +#define BOOST_UNITS_SI_LUMINOUS_INTENSITY_HPP + +#include <boost/units/systems/si/base.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<luminous_intensity_dimension,si::system> luminous_intensity; + +BOOST_UNITS_STATIC_CONSTANT(candela,luminous_intensity); +BOOST_UNITS_STATIC_CONSTANT(candelas,luminous_intensity); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_LUMINOUS_INTENSITY_HPP diff --git a/boost/units/systems/si/magnetic_field_intensity.hpp b/boost/units/systems/si/magnetic_field_intensity.hpp new file mode 100644 index 0000000000..2f36d9054f --- /dev/null +++ b/boost/units/systems/si/magnetic_field_intensity.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_MAGNETIC_FIELD_INTENSITY_HPP +#define BOOST_UNITS_SI_MAGNETIC_FIELD_INTENSITY_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/magnetic_field_intensity.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<magnetic_field_intensity_dimension,si::system> magnetic_field_intensity; + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_MAGNETIC_FIELD_INTENSITY_HPP diff --git a/boost/units/systems/si/magnetic_flux.hpp b/boost/units/systems/si/magnetic_flux.hpp new file mode 100644 index 0000000000..602a380ea2 --- /dev/null +++ b/boost/units/systems/si/magnetic_flux.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_MAGNETIC_FLUX_HPP +#define BOOST_UNITS_SI_MAGNETIC_FLUX_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/magnetic_flux.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<magnetic_flux_dimension,si::system> magnetic_flux; + +BOOST_UNITS_STATIC_CONSTANT(weber,magnetic_flux); +BOOST_UNITS_STATIC_CONSTANT(webers,magnetic_flux); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_MAGNETIC_FLUX_HPP diff --git a/boost/units/systems/si/magnetic_flux_density.hpp b/boost/units/systems/si/magnetic_flux_density.hpp new file mode 100644 index 0000000000..fc89069b3f --- /dev/null +++ b/boost/units/systems/si/magnetic_flux_density.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_MAGNETIC_FLUX_DENSITY_HPP +#define BOOST_UNITS_SI_MAGNETIC_FLUX_DENSITY_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/magnetic_flux_density.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<magnetic_flux_density_dimension,si::system> magnetic_flux_density; + +BOOST_UNITS_STATIC_CONSTANT(tesla,magnetic_flux_density); +BOOST_UNITS_STATIC_CONSTANT(teslas,magnetic_flux_density); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_MAGNETIC_FLUX_DENSITY_HPP diff --git a/boost/units/systems/si/mass.hpp b/boost/units/systems/si/mass.hpp new file mode 100644 index 0000000000..5f35225c65 --- /dev/null +++ b/boost/units/systems/si/mass.hpp @@ -0,0 +1,35 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_MASS_HPP +#define BOOST_UNITS_SI_MASS_HPP + +#include <boost/units/systems/si/base.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<mass_dimension,si::system> mass; + +BOOST_UNITS_STATIC_CONSTANT(kilogram,mass); +BOOST_UNITS_STATIC_CONSTANT(kilograms,mass); +BOOST_UNITS_STATIC_CONSTANT(kilogramme,mass); +BOOST_UNITS_STATIC_CONSTANT(kilogrammes,mass); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_MASS_HPP diff --git a/boost/units/systems/si/mass_density.hpp b/boost/units/systems/si/mass_density.hpp new file mode 100644 index 0000000000..a321e084ff --- /dev/null +++ b/boost/units/systems/si/mass_density.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_MASS_DENSITY_HPP +#define BOOST_UNITS_SI_MASS_DENSITY_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/mass_density.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<mass_density_dimension,si::system> mass_density; + +BOOST_UNITS_STATIC_CONSTANT(kilogram_per_cubic_meter,mass_density); +BOOST_UNITS_STATIC_CONSTANT(kilograms_per_cubic_meter,mass_density); +BOOST_UNITS_STATIC_CONSTANT(kilogramme_per_cubic_metre,mass_density); +BOOST_UNITS_STATIC_CONSTANT(kilogrammes_per_cubic_metre,mass_density); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_MASS_DENSITY_HPP diff --git a/boost/units/systems/si/moment_of_inertia.hpp b/boost/units/systems/si/moment_of_inertia.hpp new file mode 100644 index 0000000000..b86c0e66f4 --- /dev/null +++ b/boost/units/systems/si/moment_of_inertia.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_MOMENT_OF_INERTIA_HPP +#define BOOST_UNITS_SI_MOMENT_OF_INERTIA_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/moment_of_inertia.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<moment_of_inertia_dimension,si::system> moment_of_inertia; + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_MOMENT_OF_INERTIA_HPP diff --git a/boost/units/systems/si/momentum.hpp b/boost/units/systems/si/momentum.hpp new file mode 100644 index 0000000000..fb6f2d344a --- /dev/null +++ b/boost/units/systems/si/momentum.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_MOMENTUM_HPP +#define BOOST_UNITS_SI_MOMENTUM_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/momentum.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<momentum_dimension,si::system> momentum; + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_MOMENTUM_HPP diff --git a/boost/units/systems/si/permeability.hpp b/boost/units/systems/si/permeability.hpp new file mode 100644 index 0000000000..72ee3336e5 --- /dev/null +++ b/boost/units/systems/si/permeability.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_PERMEABILITY_HPP +#define BOOST_UNITS_SI_PERMEABILITY_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/permeability.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<permeability_dimension,si::system> permeability; + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_PERMEABILITY_HPP diff --git a/boost/units/systems/si/permittivity.hpp b/boost/units/systems/si/permittivity.hpp new file mode 100644 index 0000000000..b46c7ae6f0 --- /dev/null +++ b/boost/units/systems/si/permittivity.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_PERMITTIVITY_HPP +#define BOOST_UNITS_SI_PERMITTIVITY_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/permittivity.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<permittivity_dimension,si::system> permittivity; + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_PERMITTIVITY_HPP diff --git a/boost/units/systems/si/plane_angle.hpp b/boost/units/systems/si/plane_angle.hpp new file mode 100644 index 0000000000..918900c6a4 --- /dev/null +++ b/boost/units/systems/si/plane_angle.hpp @@ -0,0 +1,33 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_PLANE_ANGLE_HPP +#define BOOST_UNITS_SI_PLANE_ANGLE_HPP + +#include <boost/units/systems/si/base.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<plane_angle_dimension,si::system> plane_angle; + +BOOST_UNITS_STATIC_CONSTANT(radian,plane_angle); +BOOST_UNITS_STATIC_CONSTANT(radians,plane_angle); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_PLANE_ANGLE_HPP diff --git a/boost/units/systems/si/power.hpp b/boost/units/systems/si/power.hpp new file mode 100644 index 0000000000..9d1b979bfd --- /dev/null +++ b/boost/units/systems/si/power.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_POWER_HPP +#define BOOST_UNITS_SI_POWER_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/power.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<power_dimension,si::system> power; + +BOOST_UNITS_STATIC_CONSTANT(watt,power); +BOOST_UNITS_STATIC_CONSTANT(watts,power); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_POWER_HPP diff --git a/boost/units/systems/si/prefixes.hpp b/boost/units/systems/si/prefixes.hpp new file mode 100644 index 0000000000..ec36fd0d8a --- /dev/null +++ b/boost/units/systems/si/prefixes.hpp @@ -0,0 +1,77 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_PREFIXES_HPP +#define BOOST_UNITS_SI_PREFIXES_HPP + +#include <boost/units/static_constant.hpp> + +#include <boost/units/make_scaled_unit.hpp> +#include <boost/units/systems/si/dimensionless.hpp> + +namespace boost { + +namespace units { + +namespace si { + +#define BOOST_UNITS_METRIC_PREFIX(exponent, name) \ + typedef make_scaled_unit<dimensionless, scale<10, static_rational<exponent> > >::type name ## _type;\ + BOOST_UNITS_STATIC_CONSTANT(name, name ## _type) + +BOOST_UNITS_METRIC_PREFIX(-24, yocto); +BOOST_UNITS_METRIC_PREFIX(-21, zepto); +BOOST_UNITS_METRIC_PREFIX(-18, atto); +BOOST_UNITS_METRIC_PREFIX(-15, femto); +BOOST_UNITS_METRIC_PREFIX(-12, pico); +BOOST_UNITS_METRIC_PREFIX(-9, nano); +BOOST_UNITS_METRIC_PREFIX(-6, micro); +BOOST_UNITS_METRIC_PREFIX(-3, milli); +BOOST_UNITS_METRIC_PREFIX(-2, centi); +BOOST_UNITS_METRIC_PREFIX(-1, deci); +BOOST_UNITS_METRIC_PREFIX(1, deka); +BOOST_UNITS_METRIC_PREFIX(2, hecto); +BOOST_UNITS_METRIC_PREFIX(3, kilo); +BOOST_UNITS_METRIC_PREFIX(6, mega); +BOOST_UNITS_METRIC_PREFIX(9, giga); +BOOST_UNITS_METRIC_PREFIX(12, tera); +BOOST_UNITS_METRIC_PREFIX(15, peta); +BOOST_UNITS_METRIC_PREFIX(18, exa); +BOOST_UNITS_METRIC_PREFIX(21, zetta); +BOOST_UNITS_METRIC_PREFIX(24, yotta); + +/*BOOST_UNITS_STATIC_CONSTANT(yocto,long double) = (1e-24); ///< metric prefix for 1.0e-24 +BOOST_UNITS_STATIC_CONSTANT(zepto,long double) = (1e-21); ///< metric prefix for 1.0e-21 +BOOST_UNITS_STATIC_CONSTANT(atto,long double) = (1e-18); ///< metric prefix for 1.0e-18 +BOOST_UNITS_STATIC_CONSTANT(femto,long double) = (1e-15); ///< metric prefix for 1.0e-15 +BOOST_UNITS_STATIC_CONSTANT(pico,long double) = (1e-12); ///< metric prefix for 1.0e-12 +BOOST_UNITS_STATIC_CONSTANT(nano,long double) = (1e-9); ///< metric prefix for 1.0e-9 +BOOST_UNITS_STATIC_CONSTANT(micro,long double) = (1e-6); ///< metric prefix for 1.0e-6 +BOOST_UNITS_STATIC_CONSTANT(milli,long double) = (1e-3); ///< metric prefix for 1.0e-3 +BOOST_UNITS_STATIC_CONSTANT(centi,long double) = (1e-2); ///< metric prefix for 1.0e-2 +BOOST_UNITS_STATIC_CONSTANT(deci,long double) = (1e-1); ///< metric prefix for 1.0e-1 +BOOST_UNITS_STATIC_CONSTANT(deka,long double) = (1e1); ///< metric prefix for 1.0e+1 +BOOST_UNITS_STATIC_CONSTANT(hecto,long double) = (1e2); ///< metric prefix for 1.0e+2 +BOOST_UNITS_STATIC_CONSTANT(kilo,long double) = (1e3); ///< metric prefix for 1.0e+3 +BOOST_UNITS_STATIC_CONSTANT(mega,long double) = (1e6); ///< metric prefix for 1.0e+6 +BOOST_UNITS_STATIC_CONSTANT(giga,long double) = (1e9); ///< metric prefix for 1.0e+9 +BOOST_UNITS_STATIC_CONSTANT(tera,long double) = (1e12); ///< metric prefix for 1.0e+12 +BOOST_UNITS_STATIC_CONSTANT(peta,long double) = (1e15); ///< metric prefix for 1.0e+15 +BOOST_UNITS_STATIC_CONSTANT(exa,long double) = (1e18); ///< metric prefix for 1.0e+18 +BOOST_UNITS_STATIC_CONSTANT(zetta,long double) = (1e21); ///< metric prefix for 1.0e+21 +BOOST_UNITS_STATIC_CONSTANT(yotta,long double) = (1e24); ///< metric prefix for 1.0e+24 */ + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_PREFIXES_HPP diff --git a/boost/units/systems/si/pressure.hpp b/boost/units/systems/si/pressure.hpp new file mode 100644 index 0000000000..b9105e44ec --- /dev/null +++ b/boost/units/systems/si/pressure.hpp @@ -0,0 +1,49 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_PRESSURE_HPP +#define BOOST_UNITS_SI_PRESSURE_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/pressure.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<pressure_dimension,si::system> pressure; + +// windef.h #defines pascal on Metrowerks compilers +#if defined(__MWERKS__) + #if !__option(only_std_keywords) + #define BOOST_UNITS_NO_PASCAL 1 + #elif defined(pascal) + #define BOOST_UNITS_NO_PASCAL 1 + #endif +#elif defined(pascal) + #define BOOST_UNITS_NO_PASCAL 1 +#elif BOOST_MSVC + #define BOOST_UNITS_NO_PASCAL 1 +#endif + +#ifndef BOOST_UNITS_NO_PASCAL +BOOST_UNITS_STATIC_CONSTANT(pascal,pressure); +#endif +BOOST_UNITS_STATIC_CONSTANT(pascals,pressure); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_PRESSURE_HPP diff --git a/boost/units/systems/si/reluctance.hpp b/boost/units/systems/si/reluctance.hpp new file mode 100644 index 0000000000..30014cc460 --- /dev/null +++ b/boost/units/systems/si/reluctance.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_RELUCTANCE_HPP +#define BOOST_UNITS_SI_RELUCTANCE_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/reluctance.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<reluctance_dimension,si::system> reluctance; + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_RELUCTANCE_HPP diff --git a/boost/units/systems/si/resistance.hpp b/boost/units/systems/si/resistance.hpp new file mode 100644 index 0000000000..4bcb13f6cd --- /dev/null +++ b/boost/units/systems/si/resistance.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_RESISTANCE_HPP +#define BOOST_UNITS_SI_RESISTANCE_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/resistance.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<resistance_dimension,si::system> resistance; + +BOOST_UNITS_STATIC_CONSTANT(ohm,resistance); +BOOST_UNITS_STATIC_CONSTANT(ohms,resistance); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_RESISTANCE_HPP diff --git a/boost/units/systems/si/resistivity.hpp b/boost/units/systems/si/resistivity.hpp new file mode 100644 index 0000000000..bebfc4a042 --- /dev/null +++ b/boost/units/systems/si/resistivity.hpp @@ -0,0 +1,31 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_RESISTIVITY_HPP +#define BOOST_UNITS_SI_RESISTIVITY_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/resistivity.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<resistivity_dimension,si::system> resistivity; + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_RESISTIVITY_HPP diff --git a/boost/units/systems/si/solid_angle.hpp b/boost/units/systems/si/solid_angle.hpp new file mode 100644 index 0000000000..a5036c7bf2 --- /dev/null +++ b/boost/units/systems/si/solid_angle.hpp @@ -0,0 +1,33 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_SOLID_ANGLE_HPP +#define BOOST_UNITS_SI_SOLID_ANGLE_HPP + +#include <boost/units/systems/si/base.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<solid_angle_dimension,si::system> solid_angle; + +BOOST_UNITS_STATIC_CONSTANT(steradian,solid_angle); +BOOST_UNITS_STATIC_CONSTANT(steradians,solid_angle); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_SOLID_ANGLE_HPP diff --git a/boost/units/systems/si/surface_density.hpp b/boost/units/systems/si/surface_density.hpp new file mode 100644 index 0000000000..f686c3d672 --- /dev/null +++ b/boost/units/systems/si/surface_density.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_SURFACE_DENSITY_HPP +#define BOOST_UNITS_SI_SURFACE_DENSITY_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/surface_density.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<surface_density_dimension,si::system> surface_density; + +BOOST_UNITS_STATIC_CONSTANT(kilogram_per_square_meter,surface_density); +BOOST_UNITS_STATIC_CONSTANT(kilograms_per_square_meter,surface_density); +BOOST_UNITS_STATIC_CONSTANT(kilogramme_per_square_metre,surface_density); +BOOST_UNITS_STATIC_CONSTANT(kilogrammes_per_square_metre,surface_density); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_SURFACE_DENSITY_HPP diff --git a/boost/units/systems/si/surface_tension.hpp b/boost/units/systems/si/surface_tension.hpp new file mode 100644 index 0000000000..b4b181f508 --- /dev/null +++ b/boost/units/systems/si/surface_tension.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_SURFACE_TENSION_HPP +#define BOOST_UNITS_SI_SURFACE_TENSION_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/surface_tension.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<surface_tension_dimension,si::system> surface_tension; + +BOOST_UNITS_STATIC_CONSTANT(newton_per_meter,surface_tension); +BOOST_UNITS_STATIC_CONSTANT(newtons_per_meter,surface_tension); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_SURFACE_TENSION_HPP diff --git a/boost/units/systems/si/temperature.hpp b/boost/units/systems/si/temperature.hpp new file mode 100644 index 0000000000..2bb70dd60b --- /dev/null +++ b/boost/units/systems/si/temperature.hpp @@ -0,0 +1,33 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_TEMPERATURE_HPP +#define BOOST_UNITS_SI_TEMPERATURE_HPP + +#include <boost/units/systems/si/base.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<temperature_dimension,si::system> temperature; + +BOOST_UNITS_STATIC_CONSTANT(kelvin,temperature); +BOOST_UNITS_STATIC_CONSTANT(kelvins,temperature); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_TEMPERATURE_HPP diff --git a/boost/units/systems/si/time.hpp b/boost/units/systems/si/time.hpp new file mode 100644 index 0000000000..1b22de51b6 --- /dev/null +++ b/boost/units/systems/si/time.hpp @@ -0,0 +1,33 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_TIME_HPP +#define BOOST_UNITS_SI_TIME_HPP + +#include <boost/units/systems/si/base.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<time_dimension,si::system> time; + +BOOST_UNITS_STATIC_CONSTANT(second,time); +BOOST_UNITS_STATIC_CONSTANT(seconds,time); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_TIME_HPP diff --git a/boost/units/systems/si/torque.hpp b/boost/units/systems/si/torque.hpp new file mode 100644 index 0000000000..de9e685707 --- /dev/null +++ b/boost/units/systems/si/torque.hpp @@ -0,0 +1,34 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_TORQUE_HPP +#define BOOST_UNITS_SI_TORQUE_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/torque.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<torque_dimension,si::system> torque; + +BOOST_UNITS_STATIC_CONSTANT(newton_meter,torque); +BOOST_UNITS_STATIC_CONSTANT(newton_meters,torque); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_TORQUE_HPP diff --git a/boost/units/systems/si/velocity.hpp b/boost/units/systems/si/velocity.hpp new file mode 100644 index 0000000000..44a5911c13 --- /dev/null +++ b/boost/units/systems/si/velocity.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_VELOCITY_HPP +#define BOOST_UNITS_SI_VELOCITY_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/velocity.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<velocity_dimension,si::system> velocity; + +BOOST_UNITS_STATIC_CONSTANT(meter_per_second,velocity); +BOOST_UNITS_STATIC_CONSTANT(meters_per_second,velocity); +BOOST_UNITS_STATIC_CONSTANT(metre_per_second,velocity); +BOOST_UNITS_STATIC_CONSTANT(metres_per_second,velocity); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_VELOCITY_HPP diff --git a/boost/units/systems/si/volume.hpp b/boost/units/systems/si/volume.hpp new file mode 100644 index 0000000000..2bc9dc22b9 --- /dev/null +++ b/boost/units/systems/si/volume.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_VOLUME_HPP +#define BOOST_UNITS_SI_VOLUME_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/volume.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<volume_dimension,si::system> volume; + +BOOST_UNITS_STATIC_CONSTANT(cubic_meter,volume); +BOOST_UNITS_STATIC_CONSTANT(cubic_meters,volume); +BOOST_UNITS_STATIC_CONSTANT(cubic_metre,volume); +BOOST_UNITS_STATIC_CONSTANT(cubic_metres,volume); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_VOLUME_HPP diff --git a/boost/units/systems/si/wavenumber.hpp b/boost/units/systems/si/wavenumber.hpp new file mode 100644 index 0000000000..a593d011bf --- /dev/null +++ b/boost/units/systems/si/wavenumber.hpp @@ -0,0 +1,36 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2008 Steven Watanabe +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_UNITS_SI_WAVENUMBER_HPP +#define BOOST_UNITS_SI_WAVENUMBER_HPP + +#include <boost/units/systems/si/base.hpp> +#include <boost/units/physical_dimensions/wavenumber.hpp> + +namespace boost { + +namespace units { + +namespace si { + +typedef unit<wavenumber_dimension,si::system> wavenumber; + +BOOST_UNITS_STATIC_CONSTANT(reciprocal_meter,wavenumber); +BOOST_UNITS_STATIC_CONSTANT(reciprocal_meters,wavenumber); +BOOST_UNITS_STATIC_CONSTANT(reciprocal_metre,wavenumber); +BOOST_UNITS_STATIC_CONSTANT(reciprocal_metres,wavenumber); + +} // namespace si + +} // namespace units + +} // namespace boost + +#endif // BOOST_UNITS_SI_WAVENUMBER_HPP |