47 #ifndef OME_COMMON_UNITS_PRESSURE_H
48 #define OME_COMMON_UNITS_PRESSURE_H
50 #include <ome/common/config.h>
51 #include <ome/common/units/types.h>
53 #include <boost/units/base_units/metric/bar.hpp>
54 #include <boost/units/base_units/metric/atmosphere.hpp>
55 #include <boost/units/base_units/metric/torr.hpp>
56 #include <boost/units/base_units/metric/mmHg.hpp>
57 #include <boost/units/unit.hpp>
58 #include <boost/units/quantity.hpp>
59 #include <boost/units/systems/si.hpp>
62 #pragma push_macro("pascal")
76 typedef si::pressure pressure_unit;
78 typedef quantity<si::pressure> pressure_quantity;
81 typedef make_scaled_unit<si::pressure,scale<10,static_rational<-24> > >::type yoctopascal_unit;
83 typedef make_scaled_unit<si::pressure,scale<10,static_rational<-21> > >::type zeptopascal_unit;
85 typedef make_scaled_unit<si::pressure,scale<10,static_rational<-18> > >::type attopascal_unit;
87 typedef make_scaled_unit<si::pressure,scale<10,static_rational<-15> > >::type femtopascal_unit;
89 typedef make_scaled_unit<si::pressure,scale<10,static_rational<-12> > >::type picopascal_unit;
91 typedef make_scaled_unit<si::pressure,scale<10,static_rational< -9> > >::type nanopascal_unit;
93 typedef make_scaled_unit<si::pressure,scale<10,static_rational< -6> > >::type micropascal_unit;
95 typedef make_scaled_unit<si::pressure,scale<10,static_rational< -3> > >::type millipascal_unit;
97 typedef make_scaled_unit<si::pressure,scale<10,static_rational< -2> > >::type centipascal_unit;
99 typedef make_scaled_unit<si::pressure,scale<10,static_rational< -1> > >::type decipascal_unit;
101 typedef make_scaled_unit<si::pressure,scale<10,static_rational< 0> > >::type pascal_unit;
103 typedef make_scaled_unit<si::pressure,scale<10,static_rational< 1> > >::type dekapascal_unit;
105 typedef make_scaled_unit<si::pressure,scale<10,static_rational< 1> > >::type decapascal_unit;
107 typedef make_scaled_unit<si::pressure,scale<10,static_rational< 2> > >::type hectopascal_unit;
109 typedef make_scaled_unit<si::pressure,scale<10,static_rational< 3> > >::type kilopascal_unit;
111 typedef make_scaled_unit<si::pressure,scale<10,static_rational< 6> > >::type megapascal_unit;
113 typedef make_scaled_unit<si::pressure,scale<10,static_rational< 9> > >::type gigapascal_unit;
115 typedef make_scaled_unit<si::pressure,scale<10,static_rational< 12> > >::type terapascal_unit;
117 typedef make_scaled_unit<si::pressure,scale<10,static_rational< 15> > >::type petapascal_unit;
119 typedef make_scaled_unit<si::pressure,scale<10,static_rational< 18> > >::type exapascal_unit;
121 typedef make_scaled_unit<si::pressure,scale<10,static_rational< 21> > >::type zettapascal_unit;
123 typedef make_scaled_unit<si::pressure,scale<10,static_rational< 24> > >::type yottapascal_unit;
126 BOOST_UNITS_STATIC_CONSTANT(yoctopascal, yoctopascal_unit);
128 BOOST_UNITS_STATIC_CONSTANT(zeptopascal, zeptopascal_unit);
130 BOOST_UNITS_STATIC_CONSTANT(attopascal, attopascal_unit);
132 BOOST_UNITS_STATIC_CONSTANT(femtopascal, femtopascal_unit);
134 BOOST_UNITS_STATIC_CONSTANT(picopascal, picopascal_unit);
136 BOOST_UNITS_STATIC_CONSTANT(nanopascal, nanopascal_unit);
138 BOOST_UNITS_STATIC_CONSTANT(micropascal, micropascal_unit);
140 BOOST_UNITS_STATIC_CONSTANT(millipascal, millipascal_unit);
142 BOOST_UNITS_STATIC_CONSTANT(centipascal, centipascal_unit);
144 BOOST_UNITS_STATIC_CONSTANT(decipascal, decipascal_unit);
146 BOOST_UNITS_STATIC_CONSTANT(pascal, pascal_unit);
148 BOOST_UNITS_STATIC_CONSTANT(dekapascal, dekapascal_unit);
150 BOOST_UNITS_STATIC_CONSTANT(decapascal, decapascal_unit);
152 BOOST_UNITS_STATIC_CONSTANT(hectopascal, hectopascal_unit);
154 BOOST_UNITS_STATIC_CONSTANT(kilopascal, kilopascal_unit);
156 BOOST_UNITS_STATIC_CONSTANT(megapascal, megapascal_unit);
158 BOOST_UNITS_STATIC_CONSTANT(gigapascal, gigapascal_unit);
160 BOOST_UNITS_STATIC_CONSTANT(terapascal, terapascal_unit);
162 BOOST_UNITS_STATIC_CONSTANT(petapascal, petapascal_unit);
164 BOOST_UNITS_STATIC_CONSTANT(exapascal, exapascal_unit);
166 BOOST_UNITS_STATIC_CONSTANT(zettapascal, zettapascal_unit);
168 BOOST_UNITS_STATIC_CONSTANT(yottapascal, yottapascal_unit);
171 BOOST_UNITS_STATIC_CONSTANT(yoctopascals, yoctopascal_unit);
173 BOOST_UNITS_STATIC_CONSTANT(zeptopascals, zeptopascal_unit);
175 BOOST_UNITS_STATIC_CONSTANT(attopascals, attopascal_unit);
177 BOOST_UNITS_STATIC_CONSTANT(femtopascals, femtopascal_unit);
179 BOOST_UNITS_STATIC_CONSTANT(picopascals, picopascal_unit);
181 BOOST_UNITS_STATIC_CONSTANT(nanopascals, nanopascal_unit);
183 BOOST_UNITS_STATIC_CONSTANT(micropascals, micropascal_unit);
185 BOOST_UNITS_STATIC_CONSTANT(millipascals, millipascal_unit);
187 BOOST_UNITS_STATIC_CONSTANT(centipascals, centipascal_unit);
189 BOOST_UNITS_STATIC_CONSTANT(decipascals, decipascal_unit);
191 BOOST_UNITS_STATIC_CONSTANT(pascals, pascal_unit);
193 BOOST_UNITS_STATIC_CONSTANT(dekapascals, dekapascal_unit);
195 BOOST_UNITS_STATIC_CONSTANT(decapascals, decapascal_unit);
197 BOOST_UNITS_STATIC_CONSTANT(hectopascals, hectopascal_unit);
199 BOOST_UNITS_STATIC_CONSTANT(kilopascals, kilopascal_unit);
201 BOOST_UNITS_STATIC_CONSTANT(megapascals, megapascal_unit);
203 BOOST_UNITS_STATIC_CONSTANT(gigapascals, gigapascal_unit);
205 BOOST_UNITS_STATIC_CONSTANT(terapascals, terapascal_unit);
207 BOOST_UNITS_STATIC_CONSTANT(petapascals, petapascal_unit);
209 BOOST_UNITS_STATIC_CONSTANT(exapascals, exapascal_unit);
211 BOOST_UNITS_STATIC_CONSTANT(zettapascals, zettapascal_unit);
213 BOOST_UNITS_STATIC_CONSTANT(yottapascals, yottapascal_unit);
216 typedef quantity<yoctopascal_unit> yoctopascal_quantity;
218 typedef quantity<zeptopascal_unit> zeptopascal_quantity;
220 typedef quantity<attopascal_unit> attopascal_quantity;
222 typedef quantity<femtopascal_unit> femtopascal_quantity;
224 typedef quantity<picopascal_unit> picopascal_quantity;
226 typedef quantity<nanopascal_unit> nanopascal_quantity;
228 typedef quantity<micropascal_unit> micropascal_quantity;
230 typedef quantity<millipascal_unit> millipascal_quantity;
232 typedef quantity<centipascal_unit> centipascal_quantity;
234 typedef quantity<decipascal_unit> decipascal_quantity;
236 typedef quantity<pascal_unit> pascal_quantity;
238 typedef quantity<dekapascal_unit> dekapascal_quantity;
240 typedef quantity<decapascal_unit> decapascal_quantity;
242 typedef quantity<hectopascal_unit> hectopascal_quantity;
244 typedef quantity<kilopascal_unit> kilopascal_quantity;
246 typedef quantity<megapascal_unit> megapascal_quantity;
248 typedef quantity<gigapascal_unit> gigapascal_quantity;
250 typedef quantity<terapascal_unit> terapascal_quantity;
252 typedef quantity<petapascal_unit> petapascal_quantity;
254 typedef quantity<exapascal_unit> exapascal_quantity;
256 typedef quantity<zettapascal_unit> zettapascal_quantity;
258 typedef quantity<yottapascal_unit> yottapascal_quantity;
261 typedef scaled_base_unit<boost::units::metric::bar_base_unit,scale<10,static_rational< -3> > >::unit_type millibar_unit;
263 typedef scaled_base_unit<boost::units::metric::bar_base_unit,scale<10,static_rational< -2> > >::unit_type centibar_unit;
265 typedef scaled_base_unit<boost::units::metric::bar_base_unit,scale<10,static_rational< -1> > >::unit_type decibar_unit;
267 typedef scaled_base_unit<boost::units::metric::bar_base_unit,scale<10,static_rational< 0> > >::unit_type bar_unit;
269 typedef scaled_base_unit<boost::units::metric::bar_base_unit,scale<10,static_rational< 1> > >::unit_type dekabar_unit;
271 typedef scaled_base_unit<boost::units::metric::bar_base_unit,scale<10,static_rational< 1> > >::unit_type decabar_unit;
273 typedef scaled_base_unit<boost::units::metric::bar_base_unit,scale<10,static_rational< 2> > >::unit_type hectobar_unit;
275 typedef scaled_base_unit<boost::units::metric::bar_base_unit,scale<10,static_rational< 3> > >::unit_type kilobar_unit;
277 typedef scaled_base_unit<boost::units::metric::bar_base_unit,scale<10,static_rational< 6> > >::unit_type megabar_unit;
280 BOOST_UNITS_STATIC_CONSTANT(millibar, millibar_unit);
282 BOOST_UNITS_STATIC_CONSTANT(centibar, centibar_unit);
284 BOOST_UNITS_STATIC_CONSTANT(decibar, decibar_unit);
286 BOOST_UNITS_STATIC_CONSTANT(bar, bar_unit);
288 BOOST_UNITS_STATIC_CONSTANT(dekabar, dekabar_unit);
290 BOOST_UNITS_STATIC_CONSTANT(decabar, decabar_unit);
292 BOOST_UNITS_STATIC_CONSTANT(hectobar, hectobar_unit);
294 BOOST_UNITS_STATIC_CONSTANT(kilobar, kilobar_unit);
296 BOOST_UNITS_STATIC_CONSTANT(megabar, megabar_unit);
299 BOOST_UNITS_STATIC_CONSTANT(millibars, millibar_unit);
301 BOOST_UNITS_STATIC_CONSTANT(centibars, centibar_unit);
303 BOOST_UNITS_STATIC_CONSTANT(decibars, decibar_unit);
305 BOOST_UNITS_STATIC_CONSTANT(bars, bar_unit);
307 BOOST_UNITS_STATIC_CONSTANT(dekabars, dekabar_unit);
309 BOOST_UNITS_STATIC_CONSTANT(decabars, decabar_unit);
311 BOOST_UNITS_STATIC_CONSTANT(hectobars, hectobar_unit);
313 BOOST_UNITS_STATIC_CONSTANT(kilobars, kilobar_unit);
315 BOOST_UNITS_STATIC_CONSTANT(megabars, megabar_unit);
318 typedef quantity<millibar_unit> millibar_quantity;
320 typedef quantity<centibar_unit> centibar_quantity;
322 typedef quantity<decibar_unit> decibar_quantity;
324 typedef quantity<bar_unit> bar_quantity;
326 typedef quantity<dekabar_unit> dekabar_quantity;
328 typedef quantity<decabar_unit> decabar_quantity;
330 typedef quantity<hectobar_unit> hectobar_quantity;
332 typedef quantity<kilobar_unit> kilobar_quantity;
334 typedef quantity<megabar_unit> megabar_quantity;
337 typedef boost::units::metric::atmosphere_base_unit::unit_type atmosphere_unit;
339 BOOST_UNITS_STATIC_CONSTANT(atmosphere, atmosphere_unit);
341 BOOST_UNITS_STATIC_CONSTANT(atmospheres, atmosphere_unit);
343 typedef quantity<atmosphere_unit> atmosphere_quantity;
347 boost::units::pressure_dimension, 3> { };
349 typedef psi_base_unit::unit_type psi_unit;
351 BOOST_UNITS_STATIC_CONSTANT(psi, psi_unit);
353 typedef quantity<psi_unit> psi_quantity;
356 typedef boost::units::metric::torr_base_unit::unit_type torr_unit;
358 BOOST_UNITS_STATIC_CONSTANT(torr, torr_unit);
360 typedef quantity<torr_unit> torr_quantity;
363 typedef scaled_base_unit<boost::units::metric::torr_base_unit,scale<10,static_rational< -3> > >::unit_type millitorr_unit;
365 BOOST_UNITS_STATIC_CONSTANT(millitorr, millitorr_unit);
367 typedef quantity<millitorr_unit> millitorr_quantity;
370 typedef boost::units::metric::mmHg_base_unit::unit_type mmHg_unit;
372 BOOST_UNITS_STATIC_CONSTANT(mmHg, mmHg_unit);
374 typedef quantity<mmHg_unit> mmHg_quantity;
391 template<>
struct base_unit_info<ome::common::units::psi_base_unit>
394 static std::string
name() {
return "pound-force per square inch"; }
396 static std::string
symbol() {
return "lbf/in^2"; }
403 #pragma pop_macro("pascal")
406 #endif // OME_COMMON_UNITS_PRESSURE_H
Base unit for pound-force per square inch (psi) pressure.
Definition: pressure.h:346
BOOST_UNITS_DEFINE_CONVERSION_FACTOR(ome::common::units::psi_base_unit, si::pressure, double, 6894.7573)
Conversion factor for pound-force per square inch (psi) to pascal.
BOOST_UNITS_DEFAULT_CONVERSION(ome::common::units::psi_base_unit, si::pressure)
Default conversion for pound-force per square inch (psi) to is to SI pressure units (pascals)...
static std::string symbol()
Unit symbol.
Definition: pressure.h:396
static std::string name()
Unit name.
Definition: pressure.h:394