*** MAJOR ***

potentially breaking changes : rename SI/CGS namespaces to lowercase
remove some non-SI units (mostly obscure)

move base_units into boost/units
move physical_dimensions into boost/units
improved base_units for non-SI 

[SVN r45508]
This commit is contained in:
Matthias Schabel
2008-05-19 00:30:13 +00:00
parent 3f56c7330a
commit e4bcde0076
127 changed files with 1528 additions and 699 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ namespace units {
//[composite_output_snippet_1
std::ostream& operator<<(std::ostream& os, const boost::units::SI::force&) {
std::ostream& operator<<(std::ostream& os, const boost::units::si::force&) {
return(os << "N");
}
@@ -30,5 +30,5 @@ std::ostream& operator<<(std::ostream& os, const boost::units::SI::force&) {
}
int main() {
std::cout << 2.0 * boost::units::SI::newton << std::endl;
std::cout << 2.0 * boost::units::si::newton << std::endl;
}
+15 -15
View File
@@ -65,21 +65,21 @@ int main()
{
// implicit value_type conversions
//[conversion_snippet_1
quantity<SI::length> L1 = quantity<SI::length,int>(int(2.5)*SI::meters);
quantity<SI::length,int> L2(quantity<SI::length,double>(2.5*SI::meters));
quantity<si::length> L1 = quantity<si::length,int>(int(2.5)*si::meters);
quantity<si::length,int> L2(quantity<si::length,double>(2.5*si::meters));
//]
//[conversion_snippet_3
quantity<SI::length,int> L3 = static_cast<quantity<SI::length,int> >(L1);
quantity<si::length,int> L3 = static_cast<quantity<si::length,int> >(L1);
//]
//[conversion_snippet_4
quantity<CGS::length> L4 = static_cast<quantity<CGS::length> >(L1);
quantity<cgs::length> L4 = static_cast<quantity<cgs::length> >(L1);
//]
quantity<SI::length,int> L5(4*SI::meters),
L6(5*SI::meters);
quantity<CGS::length> L7(L1);
quantity<si::length,int> L5(4*si::meters),
L6(5*si::meters);
quantity<cgs::length> L7(L1);
swap(L5,L6);
@@ -96,16 +96,16 @@ int main()
// test explicit unit system conversion
{
//[conversion_snippet_5
quantity<SI::volume> vs(1.0*pow<3>(SI::meter));
quantity<CGS::volume> vc(vs);
quantity<SI::volume> vs2(vc);
quantity<si::volume> vs(1.0*pow<3>(si::meter));
quantity<cgs::volume> vc(vs);
quantity<si::volume> vs2(vc);
quantity<SI::energy> es(1.0*SI::joule);
quantity<CGS::energy> ec(es);
quantity<SI::energy> es2(ec);
quantity<si::energy> es(1.0*si::joule);
quantity<cgs::energy> ec(es);
quantity<si::energy> es2(ec);
quantity<SI::velocity> v1 = 2.0*SI::meters/SI::second,
v2(2.0*CGS::centimeters/CGS::second);
quantity<si::velocity> v1 = 2.0*si::meters/si::second,
v2(2.0*cgs::centimeters/cgs::second);
//]
sstream1 << "volume (m^3) = " << vs << std::endl
+5 -5
View File
@@ -51,23 +51,23 @@ int main()
//[conversion_factor_snippet_1
double dyne_to_newton =
conversion_factor(CGS::dyne,SI::newton);
conversion_factor(cgs::dyne,si::newton);
std::cout << dyne_to_newton << std::endl;
double force_over_mass_conversion =
conversion_factor(SI::newton/SI::kilogram,CGS::dyne/CGS::gram);
conversion_factor(si::newton/si::kilogram,cgs::dyne/cgs::gram);
std::cout << force_over_mass_conversion << std::endl;
double momentum_conversion =
conversion_factor(CGS::momentum(),SI::momentum());
conversion_factor(cgs::momentum(),si::momentum());
std::cout << momentum_conversion << std::endl;
double momentum_over_mass_conversion =
conversion_factor(SI::momentum()/SI::mass(),CGS::momentum()/CGS::gram);
conversion_factor(si::momentum()/si::mass(),cgs::momentum()/cgs::gram);
std::cout << momentum_over_mass_conversion << std::endl;
double acceleration_conversion =
conversion_factor(CGS::gal,SI::meter_per_second_squared);
conversion_factor(cgs::gal,si::meter_per_second_squared);
std::cout << acceleration_conversion << std::endl;
//]
+7 -7
View File
@@ -59,8 +59,8 @@ int main()
std::stringstream sstream1, sstream2;
//[heterogeneous_unit_snippet_1
quantity<SI::length> L(1.5*SI::meter);
quantity<CGS::mass> M(1.0*CGS::gram);
quantity<si::length> L(1.5*si::meter);
quantity<cgs::mass> M(1.0*cgs::gram);
sstream1 << L << std::endl
<< M << std::endl
@@ -68,17 +68,17 @@ int main()
<< L/M << std::endl
<< std::endl;
sstream1 << 1.0*SI::meter*SI::kilogram/pow<2>(SI::second) << std::endl
<< 1.0*SI::meter*SI::kilogram/pow<2>(SI::second)/SI::meter
sstream1 << 1.0*si::meter*si::kilogram/pow<2>(si::second) << std::endl
<< 1.0*si::meter*si::kilogram/pow<2>(si::second)/si::meter
<< std::endl << std::endl;
sstream1 << 1.0*CGS::centimeter*SI::kilogram/pow<2>(SI::second) << std::endl
<< 1.0*CGS::centimeter*SI::kilogram/pow<2>(SI::second)/SI::meter
sstream1 << 1.0*cgs::centimeter*si::kilogram/pow<2>(si::second) << std::endl
<< 1.0*cgs::centimeter*si::kilogram/pow<2>(si::second)/si::meter
<< std::endl << std::endl;
//]
//heterogeneous_unit_snippet_2
quantity<SI::area> A(1.5*SI::meter*CGS::centimeter);
quantity<si::area> A(1.5*si::meter*cgs::centimeter);
sstream1 << A << std::endl
<< std::endl;
+7 -7
View File
@@ -190,14 +190,14 @@ work(quantity<unit<force_dimension,System>,Y> F,
//]
//[kitchen_sink_function_snippet_4
/// the ideal gas law in SI units
/// the ideal gas law in si units
template<class Y>
quantity<SI::amount,Y>
idealGasLaw(const quantity<SI::pressure,Y>& P,
const quantity<SI::volume,Y>& V,
const quantity<SI::temperature,Y>& T)
quantity<si::amount,Y>
idealGasLaw(const quantity<si::pressure,Y>& P,
const quantity<si::volume,Y>& V,
const quantity<si::temperature,Y>& T)
{
using namespace boost::units::SI;
using namespace boost::units::si;
#if BOOST_UNITS_HAS_TYPEOF
return (P*V/(constants::CODATA::R*T));
@@ -214,7 +214,7 @@ idealGasLaw(const quantity<SI::pressure,Y>& P,
int main()
{
using namespace boost::units;
using namespace boost::units::SI;
using namespace boost::units::si;
std::stringstream sstream1, sstream2;
+1 -1
View File
@@ -31,7 +31,7 @@ Output:
#include <boost/units/conversion.hpp>
#include <boost/units/unit.hpp>
#include <boost/units/quantity.hpp>
#include <boost/units/systems/physical_dimensions.hpp>
#include <boost/units/physical_dimensions.hpp>
#include <boost/units/base_unit.hpp>
#include <boost/units/make_system.hpp>
+15 -15
View File
@@ -200,11 +200,11 @@ struct f {
return(1.0 - x + 4.0 * y);
}
boost::units::quantity<boost::units::SI::velocity>
operator()(const quantity<SI::time>& x,
const quantity<SI::length>& y) const {
boost::units::quantity<boost::units::si::velocity>
operator()(const quantity<si::time>& x,
const quantity<si::length>& y) const {
using namespace boost::units;
using namespace SI;
using namespace si;
return(1.0 * meters / second -
x * meters / pow<2>(seconds) +
4.0 * y / seconds );
@@ -217,8 +217,8 @@ struct f::result<double,double> {
};
template<>
struct f::result<quantity<SI::time>, quantity<SI::length> > {
typedef quantity<SI::velocity> type;
struct f::result<quantity<si::time>, quantity<si::length> > {
typedef quantity<si::velocity> type;
};
@@ -260,7 +260,7 @@ int main() {
std::cout << timer.elapsed() << " seconds" << std::endl;
}
typedef boost::numeric::ublas::matrix<
boost::units::quantity<boost::units::SI::dimensionless>
boost::units::quantity<boost::units::si::dimensionless>
> matrix_type;
matrix_type ublas_resultq;
{
@@ -301,19 +301,19 @@ int main() {
std::cout << timer.elapsed() << " seconds" << std::endl;
}
std::vector<
boost::units::quantity<boost::units::SI::energy>
boost::units::quantity<boost::units::si::energy>
> cresultq(max_value * max_value);
{
std::vector<
boost::units::quantity<boost::units::SI::force>
boost::units::quantity<boost::units::si::force>
> m1(max_value * max_value);
std::vector<
boost::units::quantity<boost::units::SI::length>
boost::units::quantity<boost::units::si::length>
> m2(max_value * max_value);
std::srand(1492);
for(int i = 0; i < max_value * max_value; ++i) {
m1[i] = std::rand() * boost::units::SI::newtons;
m2[i] = std::rand() * boost::units::SI::meters;
m1[i] = std::rand() * boost::units::si::newtons;
m2[i] = std::rand() * boost::units::si::meters;
}
std::cout << "tiled_matrix_multiply<quantity>("
<< max_value << ", " << max_value << ") : ";
@@ -364,12 +364,12 @@ int main() {
}
{
using namespace boost::units;
using namespace SI;
using namespace si;
std::vector<quantity<length> > values(1000);
std::cout << "solving y' = 1 - x + 4 * y with quantity: ";
boost::timer timer;
for(int i = 0; i < 1000; ++i) {
quantity<SI::time> x = .1 * i * seconds;
quantity<si::time> x = .1 * i * seconds;
values[i] = solve_differential_equation(
f(),
0.0 * seconds,
@@ -380,7 +380,7 @@ int main() {
std::cout << timer.elapsed() << " seconds" << std::endl;
for(int i = 0; i < 1000; ++i) {
double x = .1 * i;
quantity<SI::length> value =
quantity<si::length> value =
(1.0/4.0 * x - 3.0/16.0 + 19.0/16.0 * std::exp(4 * x)) * meters;
if(abs(values[i] - value) > value / 1e9) {
std::cout << std::setprecision(15) << "i = : " << i
+8 -8
View File
@@ -65,14 +65,14 @@ static const length mile,miles;
} // namespace nautical
// helper for conversions between nautical length and SI length
// helper for conversions between nautical length and si length
} // namespace units
} // namespace boost
BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::nautical::length_base_unit,
boost::units::SI::meter_base_unit,
boost::units::si::meter_base_unit,
double, 1.852e3);
namespace boost {
@@ -104,7 +104,7 @@ static const length foot,feet;
} // namespace boost
BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::imperial::length_base_unit,
boost::units::SI::meter_base_unit,
boost::units::si::meter_base_unit,
double, 1.0/3.28083989501312);
namespace boost {
@@ -157,18 +157,18 @@ radar_beam_height(const quantity<nautical::length>& range)
int main(void)
{
using namespace boost::units;
using namespace boost::units::SI;
using namespace boost::units::si;
using namespace boost::units::nautical;
std::stringstream sstream1, sstream2;
//[radar_beam_height_snippet_1
const quantity<nautical::length> radar_range(300.0*miles);
const quantity<SI::length> earth_radius(6371.0087714*kilo*meters);
const quantity<si::length> earth_radius(6371.0087714*kilo*meters);
const quantity<SI::length> beam_height_1(radar_beam_height(quantity<SI::length>(radar_range),earth_radius));
const quantity<si::length> beam_height_1(radar_beam_height(quantity<si::length>(radar_range),earth_radius));
const quantity<nautical::length> beam_height_2(radar_beam_height(radar_range,quantity<nautical::length>(earth_radius)));
const quantity<SI::length> beam_height_3(radar_beam_height< quantity<SI::length> >(radar_range,earth_radius));
const quantity<si::length> beam_height_3(radar_beam_height< quantity<si::length> >(radar_range,earth_radius));
const quantity<nautical::length> beam_height_4(radar_beam_height< quantity<nautical::length> >(radar_range,earth_radius));
//]
@@ -181,7 +181,7 @@ int main(void)
<< "beam height approx : " << radar_beam_height(radar_range)
<< std::endl
<< "beam height approx : "
<< quantity<SI::length>(radar_beam_height(radar_range))
<< quantity<si::length>(radar_beam_height(radar_range))
<< std::endl << std::endl;
sstream2 << "radar range : 300 nmi" << std::endl;
+7 -8
View File
@@ -14,8 +14,7 @@
#include <boost/units/quantity.hpp>
#include <boost/units/cmath.hpp>
#include <boost/units/systems/si/length.hpp>
#include <boost/units/systems/base_units.hpp>
#include <boost/units/systems/imperial/base_units/foot.hpp>
#include <boost/units/base_units/imperial/foot.hpp>
//[runtime_unit_snippet_1
@@ -24,19 +23,19 @@ namespace {
using namespace boost::units;
using imperial::foot_base_unit;
std::map<std::string, quantity<SI::length> > known_units;
std::map<std::string, quantity<si::length> > known_units;
}
quantity<SI::length> calculate(const quantity<SI::length>& t) {
return(boost::units::hypot(t, 2.0 * SI::meters));
quantity<si::length> calculate(const quantity<si::length>& t) {
return(boost::units::hypot(t, 2.0 * si::meters));
}
int main() {
known_units["meter"] = 1.0 * SI::meters;
known_units["centimeter"] = .01 * SI::meters;;
known_units["meter"] = 1.0 * si::meters;
known_units["centimeter"] = .01 * si::meters;;
known_units["foot"] =
conversion_factor(foot_base_unit::unit_type(), SI::meter) * SI::meter;
conversion_factor(foot_base_unit::unit_type(), si::meter) * si::meter;
std::string output_type("meter");
std::string input;
while((std::cout << ">") && (std::cin >> input)) {
+994 -182
View File
File diff suppressed because it is too large Load Diff
+9 -9
View File
@@ -44,7 +44,7 @@ Output:
#include <boost/units/systems/si/temperature.hpp>
#include <boost/units/detail/utility.hpp>
#include <boost/units/systems/temperature/base_units/fahrenheit.hpp>
#include <boost/units/base_units/temperature/fahrenheit.hpp>
using namespace boost::units;
@@ -68,14 +68,14 @@ BOOST_UNITS_STATIC_CONSTANT(degrees,temperature);
//[temperature_snippet_2
template<>
struct is_implicitly_convertible<unit<temperature_dimension,fahrenheit::system>,
unit<temperature_dimension,SI::system> > :
unit<temperature_dimension,si::system> > :
public mpl::true_
{ };
template<>
struct is_implicitly_convertible<
absolute< unit<temperature_dimension,fahrenheit::system> >,
absolute< unit<temperature_dimension,SI::system> > > :
absolute< unit<temperature_dimension,si::system> > > :
public mpl::true_
{ };
//]
@@ -94,18 +94,18 @@ int main()
quantity<fahrenheit::temperature> T1v(
32.0*fahrenheit::degrees);
quantity<absolute<SI::temperature> > T2p(T1p);
quantity<absolute<SI::temperature> > T3p = T1p;
quantity<SI::temperature> T2v(T1v);
quantity<SI::temperature> T3v = T1v;
quantity<absolute<si::temperature> > T2p(T1p);
quantity<absolute<si::temperature> > T3p = T1p;
quantity<si::temperature> T2v(T1v);
quantity<si::temperature> T3v = T1v;
//]
typedef conversion_helper<
quantity<absolute<fahrenheit::temperature> >,
quantity<absolute<SI::temperature> > > absolute_conv_type;
quantity<absolute<si::temperature> > > absolute_conv_type;
typedef conversion_helper<
quantity<fahrenheit::temperature>,
quantity<SI::temperature> > relative_conv_type;
quantity<si::temperature> > relative_conv_type;
sstream1 << T1p << std::endl
<< absolute_conv_type::convert(T1p) << std::endl
+2 -2
View File
@@ -14,7 +14,7 @@
\brief tutorial.cpp
\detailed
Basic tutorial using SI units.
Basic tutorial using si units.
Output:
@verbatim
@@ -49,7 +49,7 @@ I*Z == V? true
#include <boost/units/systems/si/resistance.hpp>
using namespace boost::units;
using namespace boost::units::SI;
using namespace boost::units::si;
quantity<energy>
work(const quantity<force>& F,const quantity<length>& dx)
+16
View File
@@ -136,6 +136,22 @@ struct conversion_helper
} \
void boost_units_require_semicolon()
/// template that defines a base_unit and conversion to another dimensionally-consistent unit
#define BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(namespace_, name_, name_string_, symbol_string_, factor, unit, id)\
namespace boost { \
namespace units { \
namespace namespace_ { \
struct name_ ## _base_unit \
: base_unit<name_ ## _base_unit, unit::dimension_type, id> { \
static const char* name() { return(name_string_); } \
static const char* symbol() { return(symbol_string_); }; \
}; \
} \
} \
} \
BOOST_UNITS_DEFINE_CONVERSION_FACTOR(namespace_::name_ ## _base_unit, unit, double, factor); \
BOOST_UNITS_DEFAULT_CONVERSION(namespace_::name_ ## _base_unit, unit)
/// Find the conversion factor between two units.
template<class FromUnit,class ToUnit>
inline
+1
View File
@@ -11,6 +11,7 @@
#ifndef BOOST_UNITS_POW_HPP
#define BOOST_UNITS_POW_HPP
#include <boost/math_fwd.hpp>
#include <boost/type_traits/is_integral.hpp>
#include <boost/units/operators.hpp>
+9 -9
View File
@@ -19,15 +19,15 @@
#include <boost/units/make_system.hpp>
#include <boost/units/base_unit.hpp>
#include <boost/units/systems/physical_dimensions/amount.hpp>
#include <boost/units/systems/physical_dimensions/current.hpp>
#include <boost/units/systems/physical_dimensions/length.hpp>
#include <boost/units/systems/physical_dimensions/luminous_intensity.hpp>
#include <boost/units/systems/physical_dimensions/mass.hpp>
#include <boost/units/systems/physical_dimensions/plane_angle.hpp>
#include <boost/units/systems/physical_dimensions/solid_angle.hpp>
#include <boost/units/systems/physical_dimensions/temperature.hpp>
#include <boost/units/systems/physical_dimensions/time.hpp>
#include <boost/units/physical_dimensions/amount.hpp>
#include <boost/units/physical_dimensions/current.hpp>
#include <boost/units/physical_dimensions/length.hpp>
#include <boost/units/physical_dimensions/luminous_intensity.hpp>
#include <boost/units/physical_dimensions/mass.hpp>
#include <boost/units/physical_dimensions/plane_angle.hpp>
#include <boost/units/physical_dimensions/solid_angle.hpp>
#include <boost/units/physical_dimensions/temperature.hpp>
#include <boost/units/physical_dimensions/time.hpp>
namespace boost {
+1 -1
View File
@@ -12,7 +12,7 @@
#define BOOST_UNITS_CGS_HPP
/// \file
/// Includes all the CGS unit headers
/// Includes all the cgs unit headers
#include <string>
@@ -12,20 +12,20 @@
#define BOOST_UNITS_CGS_ACCELERATION_HPP
#include <boost/units/systems/cgs/base.hpp>
#include <boost/units/systems/physical_dimensions/acceleration.hpp>
#include <boost/units/physical_dimensions/acceleration.hpp>
namespace boost {
namespace units {
namespace CGS {
namespace cgs {
typedef unit<acceleration_dimension,CGS::system> acceleration;
typedef unit<acceleration_dimension,cgs::system> acceleration;
BOOST_UNITS_STATIC_CONSTANT(gal,acceleration);
BOOST_UNITS_STATIC_CONSTANT(gals,acceleration);
} // namespace CGS
} // namespace cgs
} // namespace units
+4 -4
View File
@@ -12,22 +12,22 @@
#define BOOST_UNITS_CGS_AREA_HPP
#include <boost/units/systems/cgs/base.hpp>
#include <boost/units/systems/physical_dimensions/area.hpp>
#include <boost/units/physical_dimensions/area.hpp>
namespace boost {
namespace units {
namespace CGS {
namespace cgs {
typedef unit<area_dimension,CGS::system> area;
typedef unit<area_dimension,cgs::system> area;
BOOST_UNITS_STATIC_CONSTANT(square_centimeter,area);
BOOST_UNITS_STATIC_CONSTANT(square_centimeters,area);
BOOST_UNITS_STATIC_CONSTANT(square_centimetre,area);
BOOST_UNITS_STATIC_CONSTANT(square_centimetres,area);
} // namespace CGS
} // namespace cgs
} // namespace units
+8 -8
View File
@@ -18,27 +18,27 @@
#include <boost/units/unit.hpp>
#include <boost/units/make_system.hpp>
#include <boost/units/systems/CGS/base_units/centimeter.hpp>
#include <boost/units/systems/CGS/base_units/gram.hpp>
#include <boost/units/systems/SI/base_units/second.hpp>
#include <boost/units/systems/CGS/base_units/biot.hpp>
#include <boost/units/base_units/cgs/centimeter.hpp>
#include <boost/units/base_units/cgs/gram.hpp>
#include <boost/units/base_units/si/second.hpp>
#include <boost/units/base_units/cgs/biot.hpp>
namespace boost {
namespace units {
namespace CGS {
namespace cgs {
/// placeholder class defining CGS unit system
/// placeholder class defining cgs unit system
typedef make_system<centimeter_base_unit,
gram_base_unit,
boost::units::SI::second_base_unit,
boost::units::si::second_base_unit,
biot_base_unit>::type system;
/// various unit typedefs for convenience
typedef unit<dimensionless_type,system> dimensionless;
} // namespace CGS
} // namespace cgs
} // namespace units
+3 -3
View File
@@ -17,14 +17,14 @@ namespace boost {
namespace units {
namespace CGS {
namespace cgs {
typedef unit<current_dimension,CGS::system> current;
typedef unit<current_dimension,cgs::system> current;
BOOST_UNITS_STATIC_CONSTANT(ampere,current);
BOOST_UNITS_STATIC_CONSTANT(amperes,current);
} // namespace CGS
} // namespace cgs
} // namespace units
@@ -17,11 +17,11 @@ namespace boost {
namespace units {
namespace CGS {
namespace cgs {
BOOST_UNITS_STATIC_CONSTANT(cgs_dimensionless,dimensionless);
} // namespace CGS
} // namespace cgs
} // namespace units
@@ -12,19 +12,19 @@
#define BOOST_UNITS_CGS_DYNAMIC_VISCOSITY_HPP
#include <boost/units/systems/cgs/base.hpp>
#include <boost/units/systems/physical_dimensions/dynamic_viscosity.hpp>
#include <boost/units/physical_dimensions/dynamic_viscosity.hpp>
namespace boost {
namespace units {
namespace CGS {
namespace cgs {
typedef unit<dynamic_viscosity_dimension,CGS::system> dynamic_viscosity;
typedef unit<dynamic_viscosity_dimension,cgs::system> dynamic_viscosity;
BOOST_UNITS_STATIC_CONSTANT(poise,dynamic_viscosity);
} // namespace CGS
} // namespace cgs
} // namespace units
+4 -4
View File
@@ -12,20 +12,20 @@
#define BOOST_UNITS_CGS_ENERGY_HPP
#include <boost/units/systems/cgs/base.hpp>
#include <boost/units/systems/physical_dimensions/energy.hpp>
#include <boost/units/physical_dimensions/energy.hpp>
namespace boost {
namespace units {
namespace CGS {
namespace cgs {
typedef unit<energy_dimension,CGS::system> energy;
typedef unit<energy_dimension,cgs::system> energy;
BOOST_UNITS_STATIC_CONSTANT(erg,energy);
BOOST_UNITS_STATIC_CONSTANT(ergs,energy);
} // namespace CGS
} // namespace cgs
} // namespace units
+4 -4
View File
@@ -12,20 +12,20 @@
#define BOOST_UNITS_CGS_FORCE_HPP
#include <boost/units/systems/cgs/base.hpp>
#include <boost/units/systems/physical_dimensions/force.hpp>
#include <boost/units/physical_dimensions/force.hpp>
namespace boost {
namespace units {
namespace CGS {
namespace cgs {
typedef unit<force_dimension,CGS::system> force;
typedef unit<force_dimension,cgs::system> force;
BOOST_UNITS_STATIC_CONSTANT(dyne,force);
BOOST_UNITS_STATIC_CONSTANT(dynes,force);
} // namespace CGS
} // namespace cgs
} // namespace units
@@ -12,17 +12,17 @@
#define BOOST_UNITS_CGS_FREQUENCY_HPP
#include <boost/units/systems/cgs/base.hpp>
#include <boost/units/systems/physical_dimensions/frequency.hpp>
#include <boost/units/physical_dimensions/frequency.hpp>
namespace boost {
namespace units {
namespace CGS {
namespace cgs {
typedef unit<frequency_dimension,CGS::system> frequency;
typedef unit<frequency_dimension,cgs::system> frequency;
} // namespace CGS
} // namespace cgs
} // namespace units
@@ -12,20 +12,20 @@
#define BOOST_UNITS_CGS_KINEMATIC_VISCOSITY_HPP
#include <boost/units/systems/cgs/base.hpp>
#include <boost/units/systems/physical_dimensions/kinematic_viscosity.hpp>
#include <boost/units/physical_dimensions/kinematic_viscosity.hpp>
namespace boost {
namespace units {
namespace CGS {
namespace cgs {
typedef unit<kinematic_viscosity_dimension,CGS::system> kinematic_viscosity;
typedef unit<kinematic_viscosity_dimension,cgs::system> kinematic_viscosity;
BOOST_UNITS_STATIC_CONSTANT(stoke,kinematic_viscosity);
BOOST_UNITS_STATIC_CONSTANT(stokes,kinematic_viscosity);
} // namespace CGS
} // namespace cgs
} // namespace units
+3 -3
View File
@@ -17,16 +17,16 @@ namespace boost {
namespace units {
namespace CGS {
namespace cgs {
typedef unit<length_dimension,CGS::system> length;
typedef unit<length_dimension,cgs::system> length;
BOOST_UNITS_STATIC_CONSTANT(centimeter,length);
BOOST_UNITS_STATIC_CONSTANT(centimeters,length);
BOOST_UNITS_STATIC_CONSTANT(centimetre,length);
BOOST_UNITS_STATIC_CONSTANT(centimetres,length);
} // namespace CGS
} // namespace cgs
} // namespace units
+3 -3
View File
@@ -17,9 +17,9 @@ namespace boost {
namespace units {
namespace CGS {
namespace cgs {
typedef unit<mass_dimension,CGS::system> mass;
typedef unit<mass_dimension,cgs::system> mass;
BOOST_UNITS_STATIC_CONSTANT(gram,mass);
BOOST_UNITS_STATIC_CONSTANT(grams,mass);
@@ -27,7 +27,7 @@ BOOST_UNITS_STATIC_CONSTANT(gramme,mass);
BOOST_UNITS_STATIC_CONSTANT(grammes,mass);
} // namespace CGS
} // namespace cgs
} // namespace units
@@ -12,17 +12,17 @@
#define BOOST_UNITS_CGS_MASS_DENSITY_HPP
#include <boost/units/systems/cgs/base.hpp>
#include <boost/units/systems/physical_dimensions/mass_density.hpp>
#include <boost/units/physical_dimensions/mass_density.hpp>
namespace boost {
namespace units {
namespace CGS {
namespace cgs {
typedef unit<mass_density_dimension,CGS::system> mass_density;
typedef unit<mass_density_dimension,cgs::system> mass_density;
} // namespace CGS
} // namespace cgs
} // namespace units
+4 -4
View File
@@ -12,17 +12,17 @@
#define BOOST_UNITS_CGS_MOMENTUM_HPP
#include <boost/units/systems/cgs/base.hpp>
#include <boost/units/systems/physical_dimensions/momentum.hpp>
#include <boost/units/physical_dimensions/momentum.hpp>
namespace boost {
namespace units {
namespace CGS {
namespace cgs {
typedef unit<momentum_dimension,CGS::system> momentum;
typedef unit<momentum_dimension,cgs::system> momentum;
} // namespace CGS
} // namespace cgs
} // namespace units
+4 -4
View File
@@ -12,17 +12,17 @@
#define BOOST_UNITS_CGS_POWER_HPP
#include <boost/units/systems/cgs/base.hpp>
#include <boost/units/systems/physical_dimensions/power.hpp>
#include <boost/units/physical_dimensions/power.hpp>
namespace boost {
namespace units {
namespace CGS {
namespace cgs {
typedef unit<power_dimension,CGS::system> power;
typedef unit<power_dimension,cgs::system> power;
} // namespace CGS
} // namespace cgs
} // namespace units
+4 -4
View File
@@ -12,20 +12,20 @@
#define BOOST_UNITS_CGS_PRESSURE_HPP
#include <boost/units/systems/cgs/base.hpp>
#include <boost/units/systems/physical_dimensions/pressure.hpp>
#include <boost/units/physical_dimensions/pressure.hpp>
namespace boost {
namespace units {
namespace CGS {
namespace cgs {
typedef unit<pressure_dimension,CGS::system> pressure;
typedef unit<pressure_dimension,cgs::system> pressure;
BOOST_UNITS_STATIC_CONSTANT(barye,pressure);
BOOST_UNITS_STATIC_CONSTANT(baryes,pressure);
} // namespace CGS
} // namespace cgs
} // namespace units
+3 -3
View File
@@ -17,14 +17,14 @@ namespace boost {
namespace units {
namespace CGS {
namespace cgs {
typedef unit<time_dimension,CGS::system> time;
typedef unit<time_dimension,cgs::system> time;
BOOST_UNITS_STATIC_CONSTANT(second,time);
BOOST_UNITS_STATIC_CONSTANT(seconds,time);
} // namespace CGS
} // namespace cgs
} // namespace units
+4 -4
View File
@@ -12,22 +12,22 @@
#define BOOST_UNITS_CGS_VELOCITY_HPP
#include <boost/units/systems/cgs/base.hpp>
#include <boost/units/systems/physical_dimensions/velocity.hpp>
#include <boost/units/physical_dimensions/velocity.hpp>
namespace boost {
namespace units {
namespace CGS {
namespace cgs {
typedef unit<velocity_dimension,CGS::system> velocity;
typedef unit<velocity_dimension,cgs::system> velocity;
BOOST_UNITS_STATIC_CONSTANT(centimeter_per_second,velocity);
BOOST_UNITS_STATIC_CONSTANT(centimeters_per_second,velocity);
BOOST_UNITS_STATIC_CONSTANT(centimetre_per_second,velocity);
BOOST_UNITS_STATIC_CONSTANT(centimetres_per_second,velocity);
} // namespace CGS
} // namespace cgs
} // namespace units
+4 -4
View File
@@ -12,22 +12,22 @@
#define BOOST_UNITS_CGS_VOLUME_HPP
#include <boost/units/systems/cgs/base.hpp>
#include <boost/units/systems/physical_dimensions/volume.hpp>
#include <boost/units/physical_dimensions/volume.hpp>
namespace boost {
namespace units {
namespace CGS {
namespace cgs {
typedef unit<volume_dimension,CGS::system> volume;
typedef unit<volume_dimension,cgs::system> volume;
BOOST_UNITS_STATIC_CONSTANT(cubic_centimeter,volume);
BOOST_UNITS_STATIC_CONSTANT(cubic_centimeters,volume);
BOOST_UNITS_STATIC_CONSTANT(cubic_centimetre,volume);
BOOST_UNITS_STATIC_CONSTANT(cubic_centimetres,volume);
} // namespace CGS
} // namespace cgs
} // namespace units
@@ -12,15 +12,15 @@
#define BOOST_UNITS_CGS_WAVENUMBER_HPP
#include <boost/units/systems/cgs/base.hpp>
#include <boost/units/systems/physical_dimensions/wavenumber.hpp>
#include <boost/units/physical_dimensions/wavenumber.hpp>
namespace boost {
namespace units {
namespace CGS {
namespace cgs {
typedef unit<wavenumber_dimension,CGS::system> wavenumber;
typedef unit<wavenumber_dimension,cgs::system> wavenumber;
BOOST_UNITS_STATIC_CONSTANT(kayser,wavenumber);
BOOST_UNITS_STATIC_CONSTANT(kaysers,wavenumber);
@@ -29,7 +29,7 @@ BOOST_UNITS_STATIC_CONSTANT(reciprocal_centimeters,wavenumber);
BOOST_UNITS_STATIC_CONSTANT(reciprocal_centimetre,wavenumber);
BOOST_UNITS_STATIC_CONSTANT(reciprocal_centimetres,wavenumber);
} // namespace CGS
} // namespace cgs
} // namespace units
+1 -1
View File
@@ -12,7 +12,7 @@
#define BOOST_UNITS_SI_HPP
/// \file
/// Includes all the SI unit headers
/// Includes all the si unit headers
#include <string>
@@ -12,20 +12,20 @@
#define BOOST_UNITS_SI_ABSORBED_DOSE_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/absorbed_dose.hpp>
#include <boost/units/physical_dimensions/absorbed_dose.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<absorbed_dose_dimension,SI::system> absorbed_dose;
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 si
} // namespace units
@@ -12,22 +12,22 @@
#define BOOST_UNITS_SI_ACCELERATION_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/acceleration.hpp>
#include <boost/units/physical_dimensions/acceleration.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<acceleration_dimension,SI::system> acceleration;
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 si
} // namespace units
+4 -4
View File
@@ -12,17 +12,17 @@
#define BOOST_UNITS_SI_ACTION_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/action.hpp>
#include <boost/units/physical_dimensions/action.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<action_dimension,SI::system> action;
typedef unit<action_dimension,si::system> action;
} // namespace SI
} // namespace si
} // namespace units
+4 -4
View File
@@ -12,20 +12,20 @@
#define BOOST_UNITS_SI_ACTIVITY_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/activity.hpp>
#include <boost/units/physical_dimensions/activity.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<activity_dimension,SI::system> activity;
typedef unit<activity_dimension,si::system> activity;
BOOST_UNITS_STATIC_CONSTANT(becquerel,activity);
BOOST_UNITS_STATIC_CONSTANT(becquerels,activity);
} // namespace SI
} // namespace si
} // namespace units
+3 -3
View File
@@ -17,14 +17,14 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<amount_dimension,SI::system> amount;
typedef unit<amount_dimension,si::system> amount;
BOOST_UNITS_STATIC_CONSTANT(mole,amount);
BOOST_UNITS_STATIC_CONSTANT(moles,amount);
} // namespace SI
} // namespace si
} // namespace units
@@ -12,20 +12,20 @@
#define BOOST_UNITS_SI_ANGULAR_VELOCITY_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/angular_velocity.hpp>
#include <boost/units/physical_dimensions/angular_velocity.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<angular_velocity_dimension,SI::system> angular_velocity;
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 si
} // namespace units
+4 -4
View File
@@ -12,22 +12,22 @@
#define BOOST_UNITS_SI_AREA_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/area.hpp>
#include <boost/units/physical_dimensions/area.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<area_dimension,SI::system> area;
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 si
} // namespace units
+13 -13
View File
@@ -18,23 +18,23 @@
#include <boost/units/unit.hpp>
#include <boost/units/make_system.hpp>
#include <boost/units/systems/SI/base_units/meter.hpp>
#include <boost/units/systems/SI/base_units/kilogram.hpp>
#include <boost/units/systems/SI/base_units/second.hpp>
#include <boost/units/systems/SI/base_units/ampere.hpp>
#include <boost/units/systems/SI/base_units/kelvin.hpp>
#include <boost/units/systems/SI/base_units/mole.hpp>
#include <boost/units/systems/SI/base_units/candela.hpp>
#include <boost/units/systems/angle/base_units/radian.hpp>
#include <boost/units/systems/angle/base_units/steradian.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 {
namespace si {
/// placeholder class defining SI unit system
/// placeholder class defining si unit system
typedef make_system<meter_base_unit,
kilogram_base_unit,
second_base_unit,
@@ -45,10 +45,10 @@ typedef make_system<meter_base_unit,
boost::units::angle::radian_base_unit,
boost::units::angle::steradian_base_unit>::type system;
/// dimensionless SI unit
/// dimensionless si unit
typedef unit<dimensionless_type,system> dimensionless;
} // namespace SI
} // namespace si
} // namespace units
@@ -18,17 +18,17 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
/// capacitance : L^-2 M^-1 T^4 I^2
typedef derived_dimension<length_base_dimension,-2,mass_base_dimension,-1,time_base_dimension,4,current_base_dimension,2>::type capacitance_type;
typedef unit<SI::capacitance_type,SI::system> capacitance;
typedef unit<si::capacitance_type,si::system> capacitance;
BOOST_UNITS_STATIC_CONSTANT(farad,capacitance);
BOOST_UNITS_STATIC_CONSTANT(farads,capacitance);
} // namespace SI
} // namespace si
} // namespace units
@@ -18,17 +18,17 @@ namespace boost {
namespace units {
namespace SI {
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;
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 si
} // namespace units
@@ -35,7 +35,7 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
namespace constants {
@@ -56,7 +56,7 @@ BOOST_UNITS_PHYSICAL_CONSTANT(M_alpha,quantity<mass_over_amount>,4.001506179127e
} // namespace constants
} // namespace SI
} // namespace si
} // namespace units
@@ -25,7 +25,7 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
namespace constants {
@@ -47,7 +47,7 @@ BOOST_UNITS_PHYSICAL_CONSTANT(E_h,quantity<energy>,4.35974394e-18*joules,2.2e-25
} // namespace constants
} // namespace SI
} // namespace si
} // namespace units
@@ -35,7 +35,7 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
namespace constants {
@@ -72,7 +72,7 @@ BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_n,quantity<dimensionless>,-0.44820652
} // namespace constants
} // namespace SI
} // namespace si
} // namespace units
@@ -34,7 +34,7 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
namespace constants {
@@ -64,7 +64,7 @@ BOOST_UNITS_PHYSICAL_CONSTANT(mu_N,quantity<energy_over_magnetic_flux_density>,5
} // namespace constants
} // namespace SI
} // namespace si
} // namespace units
@@ -35,7 +35,7 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
namespace constants {
@@ -96,7 +96,7 @@ BOOST_UNITS_PHYSICAL_CONSTANT(gamma_e,quantity<frequency_over_magnetic_flux_dens
} // namespace constants
} // namespace SI
} // namespace si
} // namespace units
@@ -35,7 +35,7 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
namespace constants {
@@ -68,7 +68,7 @@ BOOST_UNITS_PHYSICAL_CONSTANT(gamma_h_prime,quantity<frequency_over_magnetic_flu
} // namespace constants
} // namespace SI
} // namespace si
} // namespace units
@@ -35,7 +35,7 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
namespace constants {
@@ -74,7 +74,7 @@ BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu_over_mu_p,quantity<dimensionless>,-3.1833451
} // namespace constants
} // namespace SI
} // namespace si
} // namespace units
@@ -35,7 +35,7 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
namespace constants {
@@ -74,7 +74,7 @@ BOOST_UNITS_PHYSICAL_CONSTANT(gamma_n,quantity<frequency_over_magnetic_flux_dens
} // namespace constants
} // namespace SI
} // namespace si
} // namespace units
@@ -35,7 +35,7 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
namespace constants {
@@ -69,7 +69,7 @@ BOOST_UNITS_PHYSICAL_CONSTANT(b_prime,quantity<frequency_over_temperature>,5.878
} // namespace constants
} // namespace SI
} // namespace si
} // namespace units
@@ -35,7 +35,7 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
namespace constants {
@@ -88,7 +88,7 @@ BOOST_UNITS_PHYSICAL_CONSTANT(gamma_p_prime,quantity<frequency_over_magnetic_flu
} // namespace constants
} // namespace SI
} // namespace si
} // namespace units
@@ -35,7 +35,7 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
namespace constants {
@@ -62,7 +62,7 @@ BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_tau,quantity<length>,0.69772e-15*meters,1
} // namespace constants
} // namespace SI
} // namespace si
} // namespace units
@@ -35,7 +35,7 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
namespace constants {
@@ -70,7 +70,7 @@ BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_n,quantity<dimensionless>,-1.55718553
} // namespace constants
} // namespace SI
} // namespace si
} // namespace units
@@ -34,7 +34,7 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
namespace constants {
@@ -50,9 +50,9 @@ 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;
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;
@@ -60,9 +60,9 @@ typedef divide_typeof_helper<frequency,temperature>::type frequency_over_tempera
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;
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;
@@ -70,7 +70,7 @@ typedef divide_typeof_helper<electric_charge,amount>::type electric_charge_over_
} // namespace constants
} // namespace SI
} // namespace si
} // namespace units
@@ -35,7 +35,7 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
namespace constants {
@@ -71,7 +71,7 @@ BOOST_UNITS_PHYSICAL_CONSTANT(t_P,quantity<time>,5.39124e-44*seconds,2.7e-48*sec
} // namespace constants
} // namespace SI
} // namespace si
} // namespace units
@@ -18,19 +18,19 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
/// conductance : L^-2 M^-1 T^3 I^2
typedef derived_dimension<length_base_dimension,-2,mass_base_dimension,-1,time_base_dimension,3,current_base_dimension,2>::type conductance_type;
typedef unit<SI::conductance_type,SI::system> conductance;
typedef unit<si::conductance_type,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 si
} // namespace units
@@ -18,14 +18,14 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
/// conductivity : L^-3 M^-1 T^3 I^2
typedef derived_dimension<length_base_dimension,-3,mass_base_dimension,-1,time_base_dimension,3,current_base_dimension,2>::type conductivity_type;
typedef unit<SI::conductivity_type,SI::system> conductivity;
typedef unit<si::conductivity_type,si::system> conductivity;
} // namespace SI
} // namespace si
} // namespace units
+3 -3
View File
@@ -17,14 +17,14 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<current_dimension,SI::system> current;
typedef unit<current_dimension,si::system> current;
BOOST_UNITS_STATIC_CONSTANT(ampere,current);
BOOST_UNITS_STATIC_CONSTANT(amperes,current);
} // namespace SI
} // namespace si
} // namespace units
@@ -17,11 +17,11 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
BOOST_UNITS_STATIC_CONSTANT(si_dimensionless,dimensionless);
} // namespace SI
} // namespace si
} // namespace units
@@ -12,20 +12,20 @@
#define BOOST_UNITS_SI_DOSE_EQUIVALENT_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/dose_equivalent.hpp>
#include <boost/units/physical_dimensions/dose_equivalent.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<dose_equivalent_dimension,SI::system> dose_equivalent;
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 si
} // namespace units
@@ -12,17 +12,17 @@
#define BOOST_UNITS_SI_DYNAMIC_VISCOSITY_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/dynamic_viscosity.hpp>
#include <boost/units/physical_dimensions/dynamic_viscosity.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<dynamic_viscosity_dimension,SI::system> dynamic_viscosity;
typedef unit<dynamic_viscosity_dimension,si::system> dynamic_viscosity;
} // namespace SI
} // namespace si
} // namespace units
@@ -18,17 +18,17 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
/// electric charge : T^1 I^1
typedef derived_dimension<time_base_dimension,1,current_base_dimension,1>::type electric_charge_type;
typedef unit<SI::electric_charge_type,SI::system> electric_charge;
typedef unit<si::electric_charge_type,si::system> electric_charge;
BOOST_UNITS_STATIC_CONSTANT(coulomb,electric_charge);
BOOST_UNITS_STATIC_CONSTANT(coulombs,electric_charge);
} // namespace SI
} // namespace si
} // namespace units
@@ -18,17 +18,17 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
/// electric potential : L^2 M T^-3 I^-1
typedef derived_dimension<length_base_dimension,2,mass_base_dimension,1,time_base_dimension,-3,current_base_dimension,-1>::type electric_potential_type;
typedef unit<SI::electric_potential_type,SI::system> electric_potential;
typedef unit<si::electric_potential_type,si::system> electric_potential;
BOOST_UNITS_STATIC_CONSTANT(volt,electric_potential);
BOOST_UNITS_STATIC_CONSTANT(volts,electric_potential);
} // namespace SI
} // namespace si
} // namespace units
+4 -4
View File
@@ -12,20 +12,20 @@
#define BOOST_UNITS_SI_ENERGY_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/energy.hpp>
#include <boost/units/physical_dimensions/energy.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<energy_dimension,SI::system> energy;
typedef unit<energy_dimension,si::system> energy;
BOOST_UNITS_STATIC_CONSTANT(joule,energy);
BOOST_UNITS_STATIC_CONSTANT(joules,energy);
} // namespace SI
} // namespace si
} // namespace units
+4 -4
View File
@@ -12,20 +12,20 @@
#define BOOST_UNITS_SI_FORCE_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/force.hpp>
#include <boost/units/physical_dimensions/force.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<force_dimension,SI::system> force;
typedef unit<force_dimension,si::system> force;
BOOST_UNITS_STATIC_CONSTANT(newton,force);
BOOST_UNITS_STATIC_CONSTANT(newtons,force);
} // namespace SI
} // namespace si
} // namespace units
+4 -4
View File
@@ -12,19 +12,19 @@
#define BOOST_UNITS_SI_FREQUENCY_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/frequency.hpp>
#include <boost/units/physical_dimensions/frequency.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<frequency_dimension,SI::system> frequency;
typedef unit<frequency_dimension,si::system> frequency;
BOOST_UNITS_STATIC_CONSTANT(hertz,frequency);
} // namespace SI
} // namespace si
} // namespace units
@@ -12,19 +12,19 @@
#define BOOST_UNITS_SI_ILLUMINANCE_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/illuminance.hpp>
#include <boost/units/physical_dimensions/illuminance.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<illuminance_dimension,SI::system> illuminance;
typedef unit<illuminance_dimension,si::system> illuminance;
BOOST_UNITS_STATIC_CONSTANT(lux,illuminance);
} // namespace SI
} // namespace si
} // namespace units
+3 -3
View File
@@ -18,14 +18,14 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
/// impedance : L^2 M T^-3 I^-2
typedef derived_dimension<length_base_dimension,2,mass_base_dimension,1,time_base_dimension,-3,current_base_dimension,-2>::type impedance_type;
typedef unit<SI::impedance_type,SI::system> impedance;
typedef unit<si::impedance_type,si::system> impedance;
} // namespace SI
} // namespace si
} // namespace units
@@ -18,17 +18,17 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
/// inductance : L^2 M T^-2 I^-2
typedef derived_dimension<length_base_dimension,2,mass_base_dimension,1,time_base_dimension,-2,current_base_dimension,-2>::type inductance_type;
typedef unit<SI::inductance_type,SI::system> inductance;
typedef unit<si::inductance_type,si::system> inductance;
BOOST_UNITS_STATIC_CONSTANT(henry,inductance);
BOOST_UNITS_STATIC_CONSTANT(henrys,inductance);
} // namespace SI
} // namespace si
} // namespace units
@@ -12,17 +12,17 @@
#define BOOST_UNITS_SI_KINEMATIC_VISCOSITY_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/kinematic_viscosity.hpp>
#include <boost/units/physical_dimensions/kinematic_viscosity.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<kinematic_viscosity_dimension,SI::system> kinematic_viscosity;
typedef unit<kinematic_viscosity_dimension,si::system> kinematic_viscosity;
} // namespace SI
} // namespace si
} // namespace units
+3 -3
View File
@@ -17,16 +17,16 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<length_dimension,SI::system> length;
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 si
} // namespace units
@@ -12,20 +12,20 @@
#define BOOST_UNITS_SI_LUMINOUS_FLUX_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/luminous_flux.hpp>
#include <boost/units/physical_dimensions/luminous_flux.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<luminous_flux_dimension,SI::system> luminous_flux;
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 si
} // namespace units
@@ -17,14 +17,14 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<luminous_intensity_dimension,SI::system> luminous_intensity;
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 si
} // namespace units
@@ -18,14 +18,14 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
/// magnetic field intensity : L^-1 I
typedef derived_dimension<length_base_dimension,-1,current_base_dimension,1>::type magnetic_field_intensity_type;
typedef unit<SI::magnetic_field_intensity_type,SI::system> magnetic_field_intensity;
typedef unit<si::magnetic_field_intensity_type,si::system> magnetic_field_intensity;
} // namespace SI
} // namespace si
} // namespace units
@@ -18,17 +18,17 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
/// magnetic flux : L^2 M T^-2 I^-1
typedef derived_dimension<length_base_dimension,2,mass_base_dimension,1,time_base_dimension,-2,current_base_dimension,-1>::type magnetic_flux_type;
typedef unit<SI::magnetic_flux_type,SI::system> magnetic_flux;
typedef unit<si::magnetic_flux_type,si::system> magnetic_flux;
BOOST_UNITS_STATIC_CONSTANT(weber,magnetic_flux);
BOOST_UNITS_STATIC_CONSTANT(webers,magnetic_flux);
} // namespace SI
} // namespace si
} // namespace units
@@ -18,17 +18,17 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
/// magnetic flux density : M T^-2 I^-1
typedef derived_dimension<mass_base_dimension,1,time_base_dimension,-2,current_base_dimension,-1>::type magnetic_flux_density_type;
typedef unit<SI::magnetic_flux_density_type,SI::system> magnetic_flux_density;
typedef unit<si::magnetic_flux_density_type,si::system> magnetic_flux_density;
BOOST_UNITS_STATIC_CONSTANT(tesla,magnetic_flux_density);
BOOST_UNITS_STATIC_CONSTANT(teslas,magnetic_flux_density);
} // namespace SI
} // namespace si
} // namespace units
+3 -3
View File
@@ -17,16 +17,16 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<mass_dimension,SI::system> mass;
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 si
} // namespace units
@@ -12,22 +12,22 @@
#define BOOST_UNITS_SI_MASS_DENSITY_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/mass_density.hpp>
#include <boost/units/physical_dimensions/mass_density.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<mass_density_dimension,SI::system> mass_density;
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 si
} // namespace units
+4 -4
View File
@@ -12,17 +12,17 @@
#define BOOST_UNITS_SI_MOMENTUM_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/momentum.hpp>
#include <boost/units/physical_dimensions/momentum.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<momentum_dimension,SI::system> momentum;
typedef unit<momentum_dimension,si::system> momentum;
} // namespace SI
} // namespace si
} // namespace units
@@ -18,14 +18,14 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
/// permeability : L M T^-2 I^-2
typedef derived_dimension<length_base_dimension,1,mass_base_dimension,1,time_base_dimension,-2,current_base_dimension,-2>::type permeability_type;
typedef unit<SI::permeability_type,SI::system> permeability;
typedef unit<si::permeability_type,si::system> permeability;
} // namespace SI
} // namespace si
} // namespace units
@@ -18,14 +18,14 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
/// permittivity : L^-3 M^-1 T^4 I^2
typedef derived_dimension<length_base_dimension,-3,mass_base_dimension,-1,time_base_dimension,4,current_base_dimension,2>::type permittivity_type;
typedef unit<SI::permittivity_type,SI::system> permittivity;
typedef unit<si::permittivity_type,si::system> permittivity;
} // namespace SI
} // namespace si
} // namespace units
@@ -17,14 +17,14 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<plane_angle_dimension,SI::system> plane_angle;
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 si
} // namespace units
+4 -4
View File
@@ -12,20 +12,20 @@
#define BOOST_UNITS_SI_POWER_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/power.hpp>
#include <boost/units/physical_dimensions/power.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<power_dimension,SI::system> power;
typedef unit<power_dimension,si::system> power;
BOOST_UNITS_STATIC_CONSTANT(watt,power);
BOOST_UNITS_STATIC_CONSTANT(watts,power);
} // namespace SI
} // namespace si
} // namespace units
+2 -2
View File
@@ -17,7 +17,7 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
//#define BOOST_UNITS_METRIC_PREFIX(exponent, name) \
// typedef make_scaled_unit<dimensionless, scale<10, static_rational<exponent> > >::type name ## _type;\
@@ -65,7 +65,7 @@ BOOST_UNITS_STATIC_CONSTANT(exa,long double) = (1e18); ///< metric pref
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 si
} // namespace units
+4 -4
View File
@@ -12,15 +12,15 @@
#define BOOST_UNITS_SI_PRESSURE_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/pressure.hpp>
#include <boost/units/physical_dimensions/pressure.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<pressure_dimension,SI::system> pressure;
typedef unit<pressure_dimension,si::system> pressure;
// windef.h #defines pascal on Metrowerks compilers
#if defined(__MWERKS__)
@@ -40,7 +40,7 @@ BOOST_UNITS_STATIC_CONSTANT(pascal,pressure);
#endif
BOOST_UNITS_STATIC_CONSTANT(pascals,pressure);
} // namespace SI
} // namespace si
} // namespace units
@@ -18,14 +18,14 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
/// reluctance : L^-2 M^-1 T^2 I^2
typedef derived_dimension<length_base_dimension,-2,mass_base_dimension,-1,time_base_dimension,2,current_base_dimension,2>::type reluctance_type;
typedef unit<SI::reluctance_type,SI::system> reluctance;
typedef unit<si::reluctance_type,si::system> reluctance;
} // namespace SI
} // namespace si
} // namespace units
@@ -18,17 +18,17 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
/// resistance : L^2 M T^-3 I^-2
typedef derived_dimension<length_base_dimension,2,mass_base_dimension,1,time_base_dimension,-3,current_base_dimension,-2>::type resistance_type;
typedef unit<SI::resistance_type,SI::system> resistance;
typedef unit<si::resistance_type,si::system> resistance;
BOOST_UNITS_STATIC_CONSTANT(ohm,resistance);
BOOST_UNITS_STATIC_CONSTANT(ohms,resistance);
} // namespace SI
} // namespace si
} // namespace units
@@ -18,14 +18,14 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
/// resistivity : L^3 M T^-3 I^-2
typedef derived_dimension<length_base_dimension,3,mass_base_dimension,1,time_base_dimension,-3,current_base_dimension,-2>::type resistivity_type;
typedef unit<SI::resistivity_type,SI::system> resistivity;
typedef unit<si::resistivity_type,si::system> resistivity;
} // namespace SI
} // namespace si
} // namespace units
@@ -17,14 +17,14 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<solid_angle_dimension,SI::system> solid_angle;
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 si
} // namespace units
@@ -12,22 +12,22 @@
#define BOOST_UNITS_SI_SURFACE_DENSITY_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/surface_density.hpp>
#include <boost/units/physical_dimensions/surface_density.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<surface_density_dimension,SI::system> surface_density;
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 si
} // namespace units
@@ -17,14 +17,14 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<temperature_dimension,SI::system> temperature;
typedef unit<temperature_dimension,si::system> temperature;
BOOST_UNITS_STATIC_CONSTANT(kelvin,temperature);
BOOST_UNITS_STATIC_CONSTANT(kelvins,temperature);
} // namespace SI
} // namespace si
} // namespace units
+3 -3
View File
@@ -17,14 +17,14 @@ namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<time_dimension,SI::system> time;
typedef unit<time_dimension,si::system> time;
BOOST_UNITS_STATIC_CONSTANT(second,time);
BOOST_UNITS_STATIC_CONSTANT(seconds,time);
} // namespace SI
} // namespace si
} // namespace units
+4 -4
View File
@@ -12,22 +12,22 @@
#define BOOST_UNITS_SI_VELOCITY_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/velocity.hpp>
#include <boost/units/physical_dimensions/velocity.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<velocity_dimension,SI::system> velocity;
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 si
} // namespace units
+4 -4
View File
@@ -12,22 +12,22 @@
#define BOOST_UNITS_SI_VOLUME_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/systems/physical_dimensions/volume.hpp>
#include <boost/units/physical_dimensions/volume.hpp>
namespace boost {
namespace units {
namespace SI {
namespace si {
typedef unit<volume_dimension,SI::system> volume;
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 si
} // namespace units

Some files were not shown because too many files have changed in this diff Show More