Boost logo

Boost-Commit :

From: boost_at_[hidden]
Date: 2008-05-19 03:35:55


Author: matthiasschabel
Date: 2008-05-19 03:35:55 EDT (Mon, 19 May 2008)
New Revision: 45535
URL: http://svn.boost.org/trac/boost/changeset/45535

Log:
add surface_tension physical_dimension
Added:
   sandbox/units/boost/units/physical_dimensions/surface_tension.hpp (contents, props changed)
   sandbox/units/boost/units/physical_dimensions/torque.hpp (contents, props changed)
   sandbox/units/boost/units/systems/si/surface_tension.hpp (contents, props changed)

Added: sandbox/units/boost/units/physical_dimensions/surface_tension.hpp
==============================================================================
--- (empty file)
+++ sandbox/units/boost/units/physical_dimensions/surface_tension.hpp 2008-05-19 03:35:55 EDT (Mon, 19 May 2008)
@@ -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_SURFACE_TENSION_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_SURFACE_TENSION_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>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for surface tension : M T^-2
+typedef derived_dimension<mass_base_dimension,1,time_base_dimension,-2>::type surface_tension_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SURFACE_TENSION_DERIVED_DIMENSION_HPP

Added: sandbox/units/boost/units/physical_dimensions/torque.hpp
==============================================================================
--- (empty file)
+++ sandbox/units/boost/units/physical_dimensions/torque.hpp 2008-05-19 03:35:55 EDT (Mon, 19 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_TORQUE_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_TORQUE_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>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for torque : L M T^-2 QP^-1
+typedef derived_dimension<length_base_dimension,1,mass_base_dimension,1,time_base_dimension,-2,plane_angle_base_dimension,-1>::type torque_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_TORQUE_DERIVED_DIMENSION_HPP

Added: sandbox/units/boost/units/systems/si/surface_tension.hpp
==============================================================================
--- (empty file)
+++ sandbox/units/boost/units/systems/si/surface_tension.hpp 2008-05-19 03:35:55 EDT (Mon, 19 May 2008)
@@ -0,0 +1,42 @@
+// 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 <iostream>
+#include <boost/units/io.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
+
+std::ostream& operator<<(std::ostream& os, const boost::units::si::surface_tension&)
+{
+ return(os << "N/m");
+}
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_SURFACE_TENSION_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