Boost logo

Boost-Commit :

From: boost_at_[hidden]
Date: 2008-05-26 18:48:10


Author: matthiasschabel
Date: 2008-05-26 18:48:09 EDT (Mon, 26 May 2008)
New Revision: 45795
URL: http://svn.boost.org/trac/boost/changeset/45795

Log:
add angular momentum and moment of inertia
Added:
   sandbox/units/boost/units/physical_dimensions/angular_momentum.hpp (contents, props changed)
   sandbox/units/boost/units/physical_dimensions/moment_of_inertia.hpp (contents, props changed)
   sandbox/units/boost/units/systems/si/angular_momentum.hpp (contents, props changed)
   sandbox/units/boost/units/systems/si/moment_of_inertia.hpp (contents, props changed)

Added: sandbox/units/boost/units/physical_dimensions/angular_momentum.hpp
==============================================================================
--- (empty file)
+++ sandbox/units/boost/units/physical_dimensions/angular_momentum.hpp 2008-05-26 18:48:09 EDT (Mon, 26 May 2008)
@@ -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_ANGULAR_MOMENTUM_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_ANGULAR_MOMENTUM_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/plane_angle.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for angular momentum : L M T^-1 QP^-1
+typedef derived_dimension<length_base_dimension,1,
+ mass_base_dimension,1,
+ time_base_dimension,-1,
+ plane_angle_base_dimension,-1>::type angular_momentum_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_ANGULAR_MOMENTUM_DERIVED_DIMENSION_HPP

Added: sandbox/units/boost/units/physical_dimensions/moment_of_inertia.hpp
==============================================================================
--- (empty file)
+++ sandbox/units/boost/units/physical_dimensions/moment_of_inertia.hpp 2008-05-26 18:48:09 EDT (Mon, 26 May 2008)
@@ -0,0 +1,32 @@
+// 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_MOMENT_OF_INERTIA_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_MOMENT_OF_INERTIA_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/plane_angle.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for moment of inertia : L M QP^-2
+typedef derived_dimension<length_base_dimension,1,
+ mass_base_dimension,1,
+ plane_angle_base_dimension,-2>::type moment_of_inertia_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_MOMENT_OF_INERTIA_DERIVED_DIMENSION_HPP

Added: sandbox/units/boost/units/systems/si/angular_momentum.hpp
==============================================================================
--- (empty file)
+++ sandbox/units/boost/units/systems/si/angular_momentum.hpp 2008-05-26 18:48:09 EDT (Mon, 26 May 2008)
@@ -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

Added: sandbox/units/boost/units/systems/si/moment_of_inertia.hpp
==============================================================================
--- (empty file)
+++ sandbox/units/boost/units/systems/si/moment_of_inertia.hpp 2008-05-26 18:48:09 EDT (Mon, 26 May 2008)
@@ -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


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk