Skip to content

add physical dimensions #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions include/boost/units/physical_dimensions/amount_concentration.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2018 Eisuke Kawashima
//
// 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_AMOUNT_CONCENTRATION_DERIVED_DIMENSION_HPP
#define BOOST_UNITS_AMOUNT_CONCENTRATION_DERIVED_DIMENSION_HPP

#include <boost/units/derived_dimension.hpp>
#include <boost/units/physical_dimensions/length.hpp>
#include <boost/units/physical_dimensions/amount.hpp>

namespace boost {

namespace units {

/// derived dimension for amount concentration : L^-3 N
typedef derived_dimension<length_base_dimension,-3,
amount_base_dimension,1>::type amount_concentration_dimension;

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_AMOUNT_CONCENTRATION_DERIVED_DIMENSION_HPP
29 changes: 29 additions & 0 deletions include/boost/units/physical_dimensions/angular_frequency.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2018 Eisuke Kawashima
//
// 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_FREQUENCY_DERIVED_DIMENSION_HPP
#define BOOST_UNITS_ANGULAR_FREQUENCY_DERIVED_DIMENSION_HPP

#include <boost/units/derived_dimension.hpp>
#include <boost/units/physical_dimensions/time.hpp>
#include <boost/units/physical_dimensions/plane_angle.hpp>

namespace boost {

namespace units {

/// derived dimension for angular frequency : T^-1 QP
typedef derived_dimension<time_base_dimension,-1,
plane_angle_base_dimension,1>::type angular_frequency_dimension;

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_ANGULAR_FREQUENCY_DERIVED_DIMENSION_HPP
31 changes: 31 additions & 0 deletions include/boost/units/physical_dimensions/charge_density.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2018 Eisuke Kawashima
//
// 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_CHARGE_DENSITY_DERIVED_DIMENSION_HPP
#define BOOST_UNITS_CHARGE_DENSITY_DERIVED_DIMENSION_HPP

#include <boost/units/derived_dimension.hpp>
#include <boost/units/physical_dimensions/length.hpp>
#include <boost/units/physical_dimensions/time.hpp>
#include <boost/units/physical_dimensions/current.hpp>

namespace boost {

namespace units {

/// derived dimension for charge density : L^-3 T I
typedef derived_dimension<length_base_dimension,-3,
time_base_dimension,1,
current_base_dimension,1>::type charge_density_dimension;

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_CHARGE_DENSITY_DERIVED_DIMENSION_HPP
29 changes: 29 additions & 0 deletions include/boost/units/physical_dimensions/current_density.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2018 Eisuke Kawashima
//
// 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_CURRENT_DENSITY_DERIVED_DIMENSION_HPP
#define BOOST_UNITS_CURRENT_DENSITY_DERIVED_DIMENSION_HPP

#include <boost/units/derived_dimension.hpp>
#include <boost/units/physical_dimensions/length.hpp>
#include <boost/units/physical_dimensions/current.hpp>

namespace boost {

namespace units {

/// derived dimension for current density : L^-2 I
typedef derived_dimension<length_base_dimension,-2,
current_base_dimension,1>::type current_density_dimension;

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_CURRENT_DENSITY_DERIVED_DIMENSION_HPP
29 changes: 29 additions & 0 deletions include/boost/units/physical_dimensions/diffusion_coefficient.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2018 Eisuke Kawashima
//
// 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_DIFFUSION_COEFFICIENT_DERIVED_DIMENSION_HPP
#define BOOST_UNITS_DIFFUSION_COEFFICIENT_DERIVED_DIMENSION_HPP

#include <boost/units/derived_dimension.hpp>
#include <boost/units/physical_dimensions/length.hpp>
#include <boost/units/physical_dimensions/time.hpp>

namespace boost {

namespace units {

/// derived dimension for diffusion coefficient : L^2 T^-1
typedef derived_dimension<length_base_dimension,2,
time_base_dimension,-1>::type diffusion_coefficient_dimension;

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_DIFFUSION_COEFFICIENT_DERIVED_DIMENSION_HPP
31 changes: 31 additions & 0 deletions include/boost/units/physical_dimensions/diffusion_flux.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2018 Eisuke Kawashima
//
// 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_DIFFUSION_FLUX_DERIVED_DIMENSION_HPP
#define BOOST_UNITS_DIFFUSION_FLUX_DERIVED_DIMENSION_HPP

#include <boost/units/derived_dimension.hpp>
#include <boost/units/physical_dimensions/length.hpp>
#include <boost/units/physical_dimensions/time.hpp>
#include <boost/units/physical_dimensions/amount.hpp>

namespace boost {

namespace units {

/// derived dimension for diffusion flux : L^-2 T^-1 N
typedef derived_dimension<length_base_dimension,-2,
time_base_dimension,-1,
amount_base_dimension,1>::type diffusion_flux_dimension;

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_DIFFUSION_FLUX_DERIVED_DIMENSION_HPP
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2018 Eisuke Kawashima
//
// 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_ELECTRIC_FIELD_INTENSITY_DERIVED_DIMENSION_HPP
#define BOOST_UNITS_ELECTRIC_FIELD_INTENSITY_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/current.hpp>

namespace boost {

namespace units {

/// derived dimension for electric field intensity : L M T^-3 I^-1
typedef derived_dimension<length_base_dimension,1,
mass_base_dimension,1,
time_base_dimension,-3,
current_base_dimension,-1>::type electric_field_intensity_dimension;

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_ELECTRIC_FIELD_INTENSITY_DERIVED_DIMENSION_HPP
29 changes: 29 additions & 0 deletions include/boost/units/physical_dimensions/electric_flux.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2018 Eisuke Kawashima
//
// 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_ELECTRIC_FLUX_DERIVED_DIMENSION_HPP
#define BOOST_UNITS_ELECTRIC_FLUX_DERIVED_DIMENSION_HPP

#include <boost/units/derived_dimension.hpp>
#include <boost/units/physical_dimensions/time.hpp>
#include <boost/units/physical_dimensions/current.hpp>

namespace boost {

namespace units {

/// derived dimension for electric flux : T I
typedef derived_dimension<time_base_dimension,1,
current_base_dimension,1>::type electric_flux_dimension;

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_ELECTRIC_FLUX_DERIVED_DIMENSION_HPP
31 changes: 31 additions & 0 deletions include/boost/units/physical_dimensions/electric_flux_density.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2018 Eisuke Kawashima
//
// 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_ELECTRIC_FLUX_DENSITY_DERIVED_DIMENSION_HPP
#define BOOST_UNITS_ELECTRIC_FLUX_DENSITY_DERIVED_DIMENSION_HPP

#include <boost/units/derived_dimension.hpp>
#include <boost/units/physical_dimensions/length.hpp>
#include <boost/units/physical_dimensions/time.hpp>
#include <boost/units/physical_dimensions/current.hpp>

namespace boost {

namespace units {

/// derived dimension for electric flux density : L^-2 T I
typedef derived_dimension<length_base_dimension,-2,
time_base_dimension,1,
current_base_dimension,1>::type electric_flux_density_dimension;

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_ELECTRIC_FLUX_DENSITY_DERIVED_DIMENSION_HPP
33 changes: 33 additions & 0 deletions include/boost/units/physical_dimensions/entropy.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2018 Eisuke Kawashima
//
// 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_ENTROPY_DERIVED_DIMENSION_HPP
#define BOOST_UNITS_ENTROPY_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/temperature.hpp>

namespace boost {

namespace units {

/// derived dimension for entropy : L^2 M T^-2 Theta^-1
typedef derived_dimension<length_base_dimension,2,
mass_base_dimension,1,
time_base_dimension,-2,
temperature_base_dimension,-1>::type entropy_dimension;

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_ENTROPY_DERIVED_DIMENSION_HPP
29 changes: 29 additions & 0 deletions include/boost/units/physical_dimensions/heat_flux_density.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2018 Eisuke Kawashima
//
// 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_HEAT_FLUX_DENSITY_DERIVED_DIMENSION_HPP
#define BOOST_UNITS_HEAT_FLUX_DENSITY_DERIVED_DIMENSION_HPP

#include <boost/units/derived_dimension.hpp>
#include <boost/units/physical_dimensions/mass.hpp>
#include <boost/units/physical_dimensions/time.hpp>

namespace boost {

namespace units {

/// derived dimension for heat flux density : M T^-3
typedef derived_dimension<mass_base_dimension,1,
time_base_dimension,-3>::type heat_flux_density_dimension;

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_HEAT_FLUX_DENSITY_DERIVED_DIMENSION_HPP
33 changes: 33 additions & 0 deletions include/boost/units/physical_dimensions/magnetic_moment.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2018 Eisuke Kawashima
//
// 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_MAGNETIC_MOMENT_DERIVED_DIMENSION_HPP
#define BOOST_UNITS_MAGNETIC_MOMENT_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/current.hpp>

namespace boost {

namespace units {

/// derived dimension for magnetic moment : L^3 M T^-2 I^-1
typedef derived_dimension<length_base_dimension,3,
mass_base_dimension,1,
time_base_dimension,-2,
current_base_dimension,-1>::type magnetic_moment_dimension;

} // namespace units

} // namespace boost

#endif // BOOST_UNITS_MAGNETIC_MOMENT_DERIVED_DIMENSION_HPP
Loading