|
From: Matthias S. <mat...@us...> - 2007-04-03 17:12:27
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9916/systems Modified Files: abstract.hpp cgs.hpp physical_units.hpp si.hpp trig.hpp Log Message: extended SI unit system to improve compliance with standard Index: cgs.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/cgs.hpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- cgs.hpp 2 Apr 2007 20:12:51 -0000 1.6 +++ cgs.hpp 3 Apr 2007 17:12:25 -0000 1.7 @@ -35,8 +35,10 @@ #include <boost/units/systems/cgs/power.hpp> #include <boost/units/systems/cgs/pressure.hpp> #include <boost/units/systems/cgs/velocity.hpp> -#include <boost/units/systems/cgs/viscosity.hpp> #include <boost/units/systems/cgs/volume.hpp> #include <boost/units/systems/cgs/wavenumber.hpp> +#include <boost/units/systems/cgs/dynamic_viscosity.hpp> +#include <boost/units/systems/cgs/kinematic_viscosity.hpp> + #endif // BOOST_UNITS_CGS_HPP Index: si.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/si.hpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- si.hpp 2 Apr 2007 20:12:51 -0000 1.6 +++ si.hpp 3 Apr 2007 17:12:25 -0000 1.7 @@ -27,6 +27,7 @@ #include <boost/units/systems/si/current.hpp> #include <boost/units/systems/si/temperature.hpp> #include <boost/units/systems/si/amount.hpp> +#include <boost/units/systems/si/luminous_intensity.hpp> #include <boost/units/systems/si/acceleration.hpp> #include <boost/units/systems/si/area.hpp> @@ -38,9 +39,11 @@ #include <boost/units/systems/si/power.hpp> #include <boost/units/systems/si/pressure.hpp> #include <boost/units/systems/si/velocity.hpp> -#include <boost/units/systems/si/viscosity.hpp> #include <boost/units/systems/si/volume.hpp> +#include <boost/units/systems/si/dynamic_viscosity.hpp> +#include <boost/units/systems/si/kinematic_viscosity.hpp> + #include <boost/units/systems/si/capacitance.hpp> #include <boost/units/systems/si/conductance.hpp> #include <boost/units/systems/si/conductivity.hpp> Index: abstract.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/abstract.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- abstract.hpp 29 Mar 2007 19:10:39 -0000 1.3 +++ abstract.hpp 3 Apr 2007 17:12:25 -0000 1.4 @@ -46,17 +46,17 @@ namespace abstract { -typedef homogeneous_system<system_tag> system; +typedef homogeneous_system<system_tag> system; -typedef unit<length_type,system> length; ///< abstract unit of length -typedef unit<mass_type,system> mass; ///< abstract unit of mass -typedef unit<time_type,system> time; ///< abstract unit of time -typedef unit<current_type,system> current; ///< abstract unit of current -typedef unit<temperature_type,system> temperature; ///< abstract unit of temperature -typedef unit<amount_type,system> amount; ///< abstract unit of amount -//typedef unit<intensity_type,system> intensity; ///< abstract unit of intensity -typedef unit<angle_type,system> angle; ///< abstract unit of angle -typedef unit<solid_angle_type,system> solid_angle; ///< abstract unit of solid angle +typedef unit<length_type,system> length; ///< abstract unit of length +typedef unit<mass_type,system> mass; ///< abstract unit of mass +typedef unit<time_type,system> time; ///< abstract unit of time +typedef unit<current_type,system> current; ///< abstract unit of current +typedef unit<temperature_type,system> temperature; ///< abstract unit of temperature +typedef unit<amount_type,system> amount; ///< abstract unit of amount +typedef unit<luminous_intensity_type,system> luminous_intensity; ///< abstract unit of intensity +typedef unit<plane_angle_type,system> angle; ///< abstract unit of angle +typedef unit<solid_angle_type,system> solid_angle; ///< abstract unit of solid angle } // namespace abstract @@ -103,14 +103,14 @@ }; template<> -struct base_unit_info<intensity_tag,abstract::system_tag> +struct base_unit_info<luminous_intensity_tag,abstract::system_tag> { - static std::string name() { return "[Intensity]"; } + static std::string name() { return "[Luminous Intensity]"; } static std::string symbol() { return "[I]"; } }; template<> -struct base_unit_info<angle_tag,abstract::system_tag> +struct base_unit_info<plane_angle_tag,abstract::system_tag> { static std::string name() { return "[Planar Angle]"; } static std::string symbol() { return "[QP]"; } Index: trig.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/trig.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- trig.hpp 2 Apr 2007 03:15:11 -0000 1.5 +++ trig.hpp 3 Apr 2007 17:12:25 -0000 1.6 @@ -78,10 +78,10 @@ /// acos of dimensionless quantity returning angle in same system template<class Y,class System> -quantity<unit<angle_type,System>,Y> +quantity<unit<plane_angle_type,System>,Y> acos(const quantity<unit<dimensionless_type,System>,Y>& val) { - return quantity<unit<angle_type,System>,Y>(std::acos(val)*radians); + return quantity<unit<plane_angle_type,System>,Y>(std::acos(val)*radians); } /// asin of @c value_type returning angle in radians @@ -94,10 +94,10 @@ /// asin of dimensionless quantity returning angle in same system template<class Y,class System> -quantity<unit<angle_type,System>,Y> +quantity<unit<plane_angle_type,System>,Y> asin(const quantity<unit<dimensionless_type,System>,Y>& val) { - return quantity<unit<angle_type,System>,Y>(std::asin(val)*radians); + return quantity<unit<plane_angle_type,System>,Y>(std::asin(val)*radians); } /// atan of @c value_type returning angle in radians @@ -110,10 +110,10 @@ /// atan of dimensionless quantity returning angle in same system template<class Y,class System> -quantity<unit<angle_type,System>,Y> +quantity<unit<plane_angle_type,System>,Y> atan(const quantity<unit<dimensionless_type,System>,Y>& val) { - return quantity<unit<angle_type,System>,Y>(std::atan(val)*radians); + return quantity<unit<plane_angle_type,System>,Y>(std::atan(val)*radians); } /// atan2 of @c value_type returning angle in radians Index: physical_units.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/systems/physical_units.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- physical_units.hpp 2 Apr 2007 20:12:51 -0000 1.4 +++ physical_units.hpp 3 Apr 2007 17:12:25 -0000 1.5 @@ -28,28 +28,28 @@ namespace units { /// tag representing length -struct length_tag : public ordinal<-8> { }; +struct length_tag : public ordinal<-9> { }; /// tag representing mass -struct mass_tag : public ordinal<-7> { }; +struct mass_tag : public ordinal<-8> { }; /// tag representing time -struct time_tag : public ordinal<-6> { }; +struct time_tag : public ordinal<-7> { }; /// tag representing electrical current -struct current_tag : public ordinal<-5> { }; +struct current_tag : public ordinal<-6> { }; /// tag representing temperature -struct temperature_tag : public ordinal<-4> { }; +struct temperature_tag : public ordinal<-5> { }; /// tag representing amount of substance -struct amount_tag : public ordinal<-3> { }; +struct amount_tag : public ordinal<-4> { }; /// tag representing luminous intensity - demoted from status as a fundamental SI unit in 1979 -struct intensity_tag : public ordinal<-3> { }; +struct luminous_intensity_tag : public ordinal<-3> { }; /// tag representing plane angle -struct angle_tag : public ordinal<-2> { }; +struct plane_angle_tag : public ordinal<-2> { }; /// tag representing solid angle struct solid_angle_tag : public ordinal<-1> { }; @@ -68,8 +68,8 @@ BOOST_TYPEOF_REGISTER_TYPE(boost::units::current_tag) BOOST_TYPEOF_REGISTER_TYPE(boost::units::temperature_tag) BOOST_TYPEOF_REGISTER_TYPE(boost::units::amount_tag) -BOOST_TYPEOF_REGISTER_TYPE(boost::units::intensity_tag) -BOOST_TYPEOF_REGISTER_TYPE(boost::units::angle_tag) +BOOST_TYPEOF_REGISTER_TYPE(boost::units::luminous_intensity_tag) +BOOST_TYPEOF_REGISTER_TYPE(boost::units::plane_angle_tag) BOOST_TYPEOF_REGISTER_TYPE(boost::units::solid_angle_tag) #endif @@ -79,73 +79,95 @@ namespace units { /// fundamental dimension of length (L) -typedef fundamental_dimension<length_tag>::type length_type; +typedef fundamental_dimension<length_tag>::type length_type; /// fundamental dimension of mass (M) -typedef fundamental_dimension<mass_tag>::type mass_type; +typedef fundamental_dimension<mass_tag>::type mass_type; /// fundamental dimension of time (T) -typedef fundamental_dimension<time_tag>::type time_type; +typedef fundamental_dimension<time_tag>::type time_type; /// fundamental dimension of electric current (C) -typedef fundamental_dimension<current_tag>::type current_type; +typedef fundamental_dimension<current_tag>::type current_type; /// fundamental dimension of temperature (K) -typedef fundamental_dimension<temperature_tag>::type temperature_type; +typedef fundamental_dimension<temperature_tag>::type temperature_type; /// fundamental dimension of amount of substance (A) -typedef fundamental_dimension<amount_tag>::type amount_type; +typedef fundamental_dimension<amount_tag>::type amount_type; /// fundamental dimension of luminous intensity (I, deprecated by SI) -typedef fundamental_dimension<intensity_tag>::type intensity_type; +typedef fundamental_dimension<luminous_intensity_tag>::type luminous_intensity_type; /// fundamental dimension of planar angle (QP) -typedef fundamental_dimension<angle_tag>::type angle_type; +typedef fundamental_dimension<plane_angle_tag>::type plane_angle_type; /// fundamental dimension of solid angle (QS) -typedef fundamental_dimension<solid_angle_tag>::type solid_angle_type; +typedef fundamental_dimension<solid_angle_tag>::type solid_angle_type; + +/// composite dimension for absorbed dose : L^2 T^-2 +typedef composite_dimension<length_tag,2,time_tag,-2>::type absorbed_dose_type; + /// composite dimension for acceleration : L T^-2 -typedef composite_dimension<length_tag,1,time_tag,-2>::type acceleration_type; +typedef composite_dimension<length_tag,1,time_tag,-2>::type acceleration_type; + +/// composite dimension for activity : T^-1 +typedef composite_dimension<time_tag,-1>::type activity_type; /// composite dimension for area : L^2 -typedef composite_dimension<length_tag,2>::type area_type; +typedef composite_dimension<length_tag,2>::type area_type; + +/// composite dimension for dose equivalent : L^2 T^-2 +typedef composite_dimension<length_tag,2,time_tag,-2>::type dose_equivalent_type; + +/// composite dimension for dynamic viscosity : M L^-1 T^-1 +typedef composite_dimension<mass_tag,1,length_tag,-1,time_tag,-1>::type dynamic_viscosity_type; /// composite dimension for energy : L^2 M T^-2 -typedef composite_dimension<length_tag,2,mass_tag,1,time_tag,-2>::type energy_type; +typedef composite_dimension<length_tag,2,mass_tag,1,time_tag,-2>::type energy_type; /// composite dimension for force : L M T^-2 -typedef composite_dimension<length_tag,1,mass_tag,1,time_tag,-2>::type force_type; +typedef composite_dimension<length_tag,1,mass_tag,1,time_tag,-2>::type force_type; /// composite dimension for frequency : T^-1 -typedef composite_dimension<time_tag,-1>::type frequency_type; +typedef composite_dimension<time_tag,-1>::type frequency_type; + +/// composite dimension for illuminance : L^-2 I QS +typedef composite_dimension<length_tag,-2,luminous_intensity_tag,1,solid_angle_tag,1>::type illuminance_type; + +/// composite dimension for kinematic viscosity : L^2 T^-1 +typedef composite_dimension<length_tag,2,time_tag,-1>::type kinematic_viscosity_type; + +/// composite dimension for luminous flux : I QS +typedef composite_dimension<luminous_intensity_tag,1,solid_angle_tag,1>::type luminous_flux_type; /// composite dimension for mass density : L^-3 M -typedef composite_dimension<length_tag,-3,mass_tag,1>::type mass_density_type; +typedef composite_dimension<length_tag,-3,mass_tag,1>::type mass_density_type; /// composite dimension for linear momentum : L M T^-1 -typedef composite_dimension<length_tag,1,mass_tag,1,time_tag,-1>::type momentum_type; +typedef composite_dimension<length_tag,1,mass_tag,1,time_tag,-1>::type momentum_type; /// composite dimension for power : L^2 M T^-3 -typedef composite_dimension<length_tag,2,mass_tag,1,time_tag,-3>::type power_type; +typedef composite_dimension<length_tag,2,mass_tag,1,time_tag,-3>::type power_type; /// composite dimension for pressure : L^-1 M T^-2 -typedef composite_dimension<length_tag,-1,mass_tag,1,time_tag,-2>::type pressure_type; +typedef composite_dimension<length_tag,-1,mass_tag,1,time_tag,-2>::type pressure_type; /// composite dimension for stress : L^-1 M T^-2 -typedef composite_dimension<length_tag,-1,mass_tag,1,time_tag,-2>::type stress_type; +typedef composite_dimension<length_tag,-1,mass_tag,1,time_tag,-2>::type stress_type; -/// composite dimension for velocity : L T^-1 -typedef composite_dimension<length_tag,1,time_tag,-1>::type velocity_type; +/// composite dimension for surface density : L^-2 M +typedef composite_dimension<length_tag,-2,mass_tag,1>::type surface_density_type; -/// composite dimension for viscosity : M L^-1 T^-1 -typedef composite_dimension<mass_tag,1,length_tag,-1,time_tag,-1>::type viscosity_type; +/// composite dimension for velocity : L T^-1 +typedef composite_dimension<length_tag,1,time_tag,-1>::type velocity_type; /// composite dimension for volume : l^3 -typedef composite_dimension<length_tag,3>::type volume_type; +typedef composite_dimension<length_tag,3>::type volume_type; /// composite dimension for wavenumber : L^-1 -typedef composite_dimension<length_tag,-1>::type wavenumber_type; +typedef composite_dimension<length_tag,-1>::type wavenumber_type; } // namespace units |