diff --git a/README.md b/README.md index de6a0096..02c730b2 100644 --- a/README.md +++ b/README.md @@ -28,11 +28,11 @@ analysis and unit/quantity manipulation. The basic idea and design heavily bases Here is a small example of possible operations: ```cpp -#include -#include -#include +#include +#include +#include -using namespace units::physical::si; +using namespace units::isq::si; // simple numeric operations static_assert(10_q_km / 2 == 5_q_km); @@ -62,12 +62,12 @@ the below example for a quick preview of basic library features: ```cpp #include -#include -#include +#include +#include #include #include -using namespace units::physical; +using namespace units::isq; constexpr Speed auto avg_speed(Length auto d, Time auto t) { @@ -76,8 +76,8 @@ constexpr Speed auto avg_speed(Length auto d, Time auto t) int main() { - using namespace units::physical::si::literals; - using namespace units::physical::si::unit_constants; + using namespace units::isq::si::literals; + using namespace units::isq::si::unit_constants; constexpr Speed auto v1 = 110 * km / h; constexpr Speed auto v2 = avg_speed(220_q_km, 2_q_h); diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 0b1d18d1..b830eb1e 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -124,104 +124,104 @@ set(unitsSphinxDocs "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/generic/dimensionless.rst" "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/generic/unknown.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/natural.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/natural/constants.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/natural/dimensions.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/natural/units.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/natural.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/natural/constants.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/natural/dimensions.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/natural/units.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si_cgs.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/cgs/length.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/cgs/acceleration.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/cgs/area.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/cgs/energy.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/cgs/force.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/cgs/length.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/cgs/mass.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/cgs/power.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/cgs/pressure.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/cgs/speed.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/cgs/time.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si_cgs.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/cgs/length.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/cgs/acceleration.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/cgs/area.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/cgs/energy.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/cgs/force.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/cgs/length.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/cgs/mass.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/cgs/power.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/cgs/pressure.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/cgs/speed.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/cgs/time.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/dimensions_and_concepts.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/dimensions_and_concepts.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si_fps.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/fps/length.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/fps/acceleration.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/fps/area.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/fps/density.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/fps/energy.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/fps/force.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/fps/length.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/fps/mass.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/fps/power.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/fps/pressure.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/fps/speed.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/fps/time.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/fps/volume.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si_fps.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/fps/length.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/fps/acceleration.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/fps/area.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/fps/density.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/fps/energy.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/fps/force.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/fps/length.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/fps/mass.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/fps/power.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/fps/pressure.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/fps/speed.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/fps/time.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/fps/volume.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si_iau.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/iau/length.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si_iau.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/iau/length.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si_imperial.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/imperial/length.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si_imperial.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/imperial/length.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si_international.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/international/area.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/international/length.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/international/speed.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/international/volume.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si_international.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/international/area.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/international/length.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/international/speed.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/international/volume.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/absorbed_dose.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/acceleration.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/amount_of_substance.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/area.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/capacitance.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/catalytic_activity.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/charge_density.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/concentration.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/conductance.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/constants.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/current_density.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/density.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/dynamic_viscosity.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/electric_charge.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/electric_current.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/electric_field_strength.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/energy.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/force.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/frequency.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/heat_capacity.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/inductance.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/length.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/luminance.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/luminous_intensity.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/magnetic_flux.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/magnetic_induction.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/mass.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/molar_energy.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/momentum.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/permeability.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/permittivity.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/power.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/prefixes.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/pressure.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/resistance.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/speed.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/surface_tension.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/thermal_conductivity.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/thermodynamic_temperature.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/time.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/voltage.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/volume.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/absorbed_dose.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/acceleration.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/amount_of_substance.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/area.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/capacitance.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/catalytic_activity.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/charge_density.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/concentration.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/conductance.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/constants.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/current_density.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/density.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/dynamic_viscosity.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/electric_charge.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/electric_current.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/electric_field_strength.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/energy.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/force.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/frequency.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/heat_capacity.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/inductance.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/length.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/luminance.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/luminous_intensity.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/magnetic_flux.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/magnetic_induction.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/mass.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/molar_energy.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/momentum.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/permeability.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/permittivity.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/power.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/prefixes.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/pressure.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/resistance.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/speed.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/surface_tension.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/thermal_conductivity.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/thermodynamic_temperature.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/time.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/voltage.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/volume.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si_typographic.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/typographic/length.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si_typographic.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/typographic/length.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si_us.rst" - "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/physical/si/us/length.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si_us.rst" + "${CMAKE_CURRENT_SOURCE_DIR}/reference/systems/isq/si/us/length.rst" "${CMAKE_CURRENT_SOURCE_DIR}/references.rst" diff --git a/docs/design.rst b/docs/design.rst index 1f79773d..0c379c38 100644 --- a/docs/design.rst +++ b/docs/design.rst @@ -6,7 +6,7 @@ Design Deep Dive For brevity all the code examples in this chapter assume:: using namespace units; - using namespace units::physical; + using namespace units::isq; .. toctree:: :maxdepth: 2 diff --git a/docs/design/directories.rst b/docs/design/directories.rst index 77b121cc..4f7a6703 100644 --- a/docs/design/directories.rst +++ b/docs/design/directories.rst @@ -63,4 +63,4 @@ Library Directories Structure While working with predefined systems please always include a header file with all the definitions for the current system to limit the possibility of an ODR violation - (e.g. *units/physical/si/si.h*). + (e.g. *units/isq/si/si.h*). diff --git a/docs/design/downcasting.rst b/docs/design/downcasting.rst index 13cd66fa..c804c5c5 100644 --- a/docs/design/downcasting.rst +++ b/docs/design/downcasting.rst @@ -23,9 +23,9 @@ The above solution does provide a good developer's experience but a really poor user. If we will get a compilation error message containing ``dim_capacitance`` in most cases the compiler will print the following type instead of the alias:: - units::detail::derived_dimension_base, - units::exponent, units::exponent, units::exponent > + units::detail::derived_dimension_base, + units::exponent, units::exponent, units::exponent > You can notice that in case of **mp-units** even this long syntax was carefully selected to provide quite good user experience (some other units libraries produce a type that cannot easily diff --git a/docs/faq.rst b/docs/faq.rst index e2836e49..d1784c86 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -30,10 +30,10 @@ different dimensions (i.e. height, width, and depth) all of them will just be measured in meters. -Why other systems are defined in the `physical::si` namespace? +Why other systems are defined in the `isq::si` namespace? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -All systems defined in the `physical::si` namespace are defined in terms of +All systems defined in the `isq::si` namespace are defined in terms of base units that are convertible to the :term:`SI` units. This enables conversions of units of the same physical dimension between different systems. @@ -125,7 +125,7 @@ error: reference to ‘time’ is ambiguous ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Unfortunately, if `using-directives `_ -(i.e. ``using namespace units::physical::si``) are being used, `units::physical::si::time` +(i.e. ``using namespace units::isq::si``) are being used, `units::isq::si::time` will collide with C `time `_ function. In such a case the library's ``time`` function needs to be prefixed with at least one (or all) namespace names. diff --git a/docs/framework.rst b/docs/framework.rst index 1c94f436..494f7150 100644 --- a/docs/framework.rst +++ b/docs/framework.rst @@ -6,7 +6,7 @@ Framework Basics For brevity all the code examples in this chapter assume:: using namespace units; - using namespace units::physical; + using namespace units::isq; .. toctree:: :maxdepth: 2 diff --git a/docs/framework/dimensions.rst b/docs/framework/dimensions.rst index d81c8258..46dbc83b 100644 --- a/docs/framework/dimensions.rst +++ b/docs/framework/dimensions.rst @@ -171,7 +171,7 @@ provided. For example the SI base dimension of length can be defined as:: } In the above code sample ``"L"`` is an base dimension's unique identifier -and `physical::si::metre` is a :term:`base unit` of this base dimension. We can +and `isq::si::metre` is a :term:`base unit` of this base dimension. We can obtain those back easily with:: static_assert(si::dim_length::symbol == "L"); @@ -206,8 +206,8 @@ The above dimensions can be defined in the library with the } -In the above code sample `physical::si::square_metre` and -`physical::si::metre_per_second` are the +In the above code sample `isq::si::square_metre` and +`isq::si::metre_per_second` are the :term:`coherent derived units ` of those derived dimensions. Coherent unit argument is followed by the list of exponents that form this diff --git a/docs/framework/quantities.rst b/docs/framework/quantities.rst index 0204984e..f7003143 100644 --- a/docs/framework/quantities.rst +++ b/docs/framework/quantities.rst @@ -69,7 +69,7 @@ values the library provides :abbr:`UDL (User Defined Literal)` s for each Thanks to them the same code can be as simple as:: - using namespace units::physical::si::literals; + using namespace units::isq::si::literals; auto d = 123._q_km; // si::length auto v = 70_q_km_per_h; // si::speed @@ -98,7 +98,7 @@ They are defined using a special `one_rep` representation type:: With the above our code can look as follows:: - using namespace units::physical::si::unit_constants; + using namespace units::isq::si::unit_constants; auto d = 123. * km; // si::length auto v = 70 * km / h; // si::speed @@ -121,13 +121,13 @@ UDLs are helpful but they also have some disadvantages compared to Unit Constant - UDLs:: - using namespace units::physical::si::literals; + using namespace units::isq::si::literals; auto v1 = 120_q_km / 2_q_h; auto v2 = length(distance) / time(duration); - Unit Constants:: - using namespace units::physical::si::unit_constants; + using namespace units::isq::si::unit_constants; auto v1 = 120 * km / (2 * h); auto v2 = distance * km / (duration * h); @@ -139,14 +139,14 @@ UDLs are helpful but they also have some disadvantages compared to Unit Constant - UDLs:: - using namespace units::physical::si::literals; - using namespace units::physical::si::cgs::literals; + using namespace units::isq::si::literals; + using namespace units::isq::si::cgs::literals; auto d = 1_q_cm; // FAILS TO COMPILE - Unit Constants:: - inline constexpr auto si_cm = units::physical::si::unit_constants::cm; - inline constexpr auto cgs_cm = units::physical::si::cgs::unit_constants::cm; + inline constexpr auto si_cm = units::isq::si::unit_constants::cm; + inline constexpr auto cgs_cm = units::isq::si::cgs::unit_constants::cm; auto d1 = 1. * si_cm; // si::length auto d2 = 1. * cgs_cm; // si::cgs::length @@ -156,7 +156,7 @@ UDLs are helpful but they also have some disadvantages compared to Unit Constant - UDLs:: - using namespace units::physical::si::literals; + using namespace units::isq::si::literals; auto d1 = 123._q_km; // si::length auto d2 = 123_q_km; // si::length @@ -164,7 +164,7 @@ UDLs are helpful but they also have some disadvantages compared to Unit Constant - Unit Constants:: - using namespace units::physical::si::unit_constants; + using namespace units::isq::si::unit_constants; auto d1 = 123. * km; // si::length auto d2 = 123 * km; // si::length auto d3 = 123.f * km; // si::length @@ -194,7 +194,7 @@ UDLs are helpful but they also have some disadvantages compared to Unit Constant The only issue we are aware of with Unit Constants is a potential problem of specifying a quantity in denominator:: - using namespace units::physical::si::unit_constants; + using namespace units::isq::si::unit_constants; Speed auto v = 220 * km / 2 * h; // FAILS TO COMPILE (not a quantity of a speed dimension) The above code can be fixed in one of the below ways: @@ -220,7 +220,7 @@ In case the user does not care about the specific unit and representation but requires quantity of a concrete dimension than dimension-specific concepts can be used:: - using namespace units::physical::si::literals; + using namespace units::isq::si::literals; constexpr Length auto d = 123_q_km; // si::length .. note:: @@ -235,8 +235,8 @@ assume that the user wants to implement an ``avg_speed`` function that will be calculating the average speed based on provided distance and duration quantities. The usage of such a function can look as follows:: - using namespace units::physical::si::literals; - using namespace units::physical::si::international::literals; + using namespace units::isq::si::literals; + using namespace units::isq::si::international::literals; constexpr Speed auto v1 = avg_speed(220_q_km, 2_q_h); constexpr Speed auto v2 = avg_speed(140_q_mi, 2_q_h); diff --git a/docs/framework/text_output.rst b/docs/framework/text_output.rst index 678b85fd..45c0c54b 100644 --- a/docs/framework/text_output.rst +++ b/docs/framework/text_output.rst @@ -21,8 +21,8 @@ Output Streams The easiest way to print a quantity is to provide its object to the output stream:: - using namespace units::physical::si::literals; - using namespace units::physical::si::international::literals; + using namespace units::isq::si::literals; + using namespace units::isq::si::international::literals; constexpr Speed auto v1 = avg_speed(220._q_km, 2_q_h); constexpr Speed auto v2 = avg_speed(140._q_mi, 2_q_h); std::cout << v1 << '\n'; // 110 km/h diff --git a/docs/framework/units.rst b/docs/framework/units.rst index 6e6adac6..d1449351 100644 --- a/docs/framework/units.rst +++ b/docs/framework/units.rst @@ -388,7 +388,7 @@ and user should not instantiate it by him/her-self. However the user can sometim observe this type in case an unit/dimension conversion expression will end up with an unknown/undefined unit type like in the below example:: - using namespace units::physical::si::literals; + using namespace units::isq::si::literals; Length auto l = 100_q_km_per_h * 10_q_s; diff --git a/docs/quick_start.rst b/docs/quick_start.rst index 419c2ab1..9155501e 100644 --- a/docs/quick_start.rst +++ b/docs/quick_start.rst @@ -3,11 +3,11 @@ Quick Start Here is a small example of possible operations:: - #include - #include - #include + #include + #include + #include - using namespace units::physical::si; + using namespace units::isq::si; // simple numeric operations static_assert(10_q_km / 2 == 5_q_km); @@ -38,12 +38,12 @@ performed without sacrificing on accuracy. Please see the below example for a qu of basic library features:: #include - #include - #include + #include + #include #include #include - using namespace units::physical; + using namespace units::isq; constexpr Speed auto avg_speed(Length auto d, Time auto t) { @@ -52,8 +52,8 @@ of basic library features:: int main() { - using namespace units::physical::si::literals; - using namespace units::physical::si::unit_constants; + using namespace units::isq::si::literals; + using namespace units::isq::si::unit_constants; constexpr Speed auto v1 = 110 * km / h; constexpr Speed auto v2 = avg_speed(220_q_km, 2_q_h); diff --git a/docs/reference/systems.rst b/docs/reference/systems.rst index aa5ce92b..c8e864ac 100644 --- a/docs/reference/systems.rst +++ b/docs/reference/systems.rst @@ -9,7 +9,7 @@ Systems .. toctree:: :maxdepth: 2 - systems/physical + systems/isq .. toctree:: :maxdepth: 1 diff --git a/docs/reference/systems/physical.rst b/docs/reference/systems/isq.rst similarity index 76% rename from docs/reference/systems/physical.rst rename to docs/reference/systems/isq.rst index 8faa2480..fe2b6256 100644 --- a/docs/reference/systems/physical.rst +++ b/docs/reference/systems/isq.rst @@ -1,5 +1,5 @@ -Physical -======== +International System of Quantities (ISQ) +======================================== .. toctree:: :maxdepth: 2 diff --git a/docs/reference/systems/physical/dimensions_and_concepts.rst b/docs/reference/systems/isq/dimensions_and_concepts.rst similarity index 100% rename from docs/reference/systems/physical/dimensions_and_concepts.rst rename to docs/reference/systems/isq/dimensions_and_concepts.rst diff --git a/docs/reference/systems/physical/natural.rst b/docs/reference/systems/isq/natural.rst similarity index 100% rename from docs/reference/systems/physical/natural.rst rename to docs/reference/systems/isq/natural.rst diff --git a/docs/reference/systems/physical/natural/constants.rst b/docs/reference/systems/isq/natural/constants.rst similarity index 100% rename from docs/reference/systems/physical/natural/constants.rst rename to docs/reference/systems/isq/natural/constants.rst diff --git a/docs/reference/systems/physical/natural/dimensions.rst b/docs/reference/systems/isq/natural/dimensions.rst similarity index 100% rename from docs/reference/systems/physical/natural/dimensions.rst rename to docs/reference/systems/isq/natural/dimensions.rst diff --git a/docs/reference/systems/physical/natural/units.rst b/docs/reference/systems/isq/natural/units.rst similarity index 100% rename from docs/reference/systems/physical/natural/units.rst rename to docs/reference/systems/isq/natural/units.rst diff --git a/docs/reference/systems/physical/si.rst b/docs/reference/systems/isq/si.rst similarity index 92% rename from docs/reference/systems/physical/si.rst rename to docs/reference/systems/isq/si.rst index f3f43239..122fa55f 100644 --- a/docs/reference/systems/physical/si.rst +++ b/docs/reference/systems/isq/si.rst @@ -1,5 +1,5 @@ -SI -== +International System of Units (SI) +================================== .. toctree:: :maxdepth: 2 diff --git a/docs/reference/systems/physical/si/absorbed_dose.rst b/docs/reference/systems/isq/si/absorbed_dose.rst similarity index 100% rename from docs/reference/systems/physical/si/absorbed_dose.rst rename to docs/reference/systems/isq/si/absorbed_dose.rst diff --git a/docs/reference/systems/physical/si/acceleration.rst b/docs/reference/systems/isq/si/acceleration.rst similarity index 100% rename from docs/reference/systems/physical/si/acceleration.rst rename to docs/reference/systems/isq/si/acceleration.rst diff --git a/docs/reference/systems/physical/si/amount_of_substance.rst b/docs/reference/systems/isq/si/amount_of_substance.rst similarity index 100% rename from docs/reference/systems/physical/si/amount_of_substance.rst rename to docs/reference/systems/isq/si/amount_of_substance.rst diff --git a/docs/reference/systems/physical/si/area.rst b/docs/reference/systems/isq/si/area.rst similarity index 100% rename from docs/reference/systems/physical/si/area.rst rename to docs/reference/systems/isq/si/area.rst diff --git a/docs/reference/systems/physical/si/capacitance.rst b/docs/reference/systems/isq/si/capacitance.rst similarity index 100% rename from docs/reference/systems/physical/si/capacitance.rst rename to docs/reference/systems/isq/si/capacitance.rst diff --git a/docs/reference/systems/physical/si/catalytic_activity.rst b/docs/reference/systems/isq/si/catalytic_activity.rst similarity index 100% rename from docs/reference/systems/physical/si/catalytic_activity.rst rename to docs/reference/systems/isq/si/catalytic_activity.rst diff --git a/docs/reference/systems/physical/si/cgs/acceleration.rst b/docs/reference/systems/isq/si/cgs/acceleration.rst similarity index 100% rename from docs/reference/systems/physical/si/cgs/acceleration.rst rename to docs/reference/systems/isq/si/cgs/acceleration.rst diff --git a/docs/reference/systems/physical/si/cgs/area.rst b/docs/reference/systems/isq/si/cgs/area.rst similarity index 100% rename from docs/reference/systems/physical/si/cgs/area.rst rename to docs/reference/systems/isq/si/cgs/area.rst diff --git a/docs/reference/systems/physical/si/cgs/energy.rst b/docs/reference/systems/isq/si/cgs/energy.rst similarity index 100% rename from docs/reference/systems/physical/si/cgs/energy.rst rename to docs/reference/systems/isq/si/cgs/energy.rst diff --git a/docs/reference/systems/physical/si/cgs/force.rst b/docs/reference/systems/isq/si/cgs/force.rst similarity index 100% rename from docs/reference/systems/physical/si/cgs/force.rst rename to docs/reference/systems/isq/si/cgs/force.rst diff --git a/docs/reference/systems/physical/si/cgs/length.rst b/docs/reference/systems/isq/si/cgs/length.rst similarity index 100% rename from docs/reference/systems/physical/si/cgs/length.rst rename to docs/reference/systems/isq/si/cgs/length.rst diff --git a/docs/reference/systems/physical/si/cgs/mass.rst b/docs/reference/systems/isq/si/cgs/mass.rst similarity index 100% rename from docs/reference/systems/physical/si/cgs/mass.rst rename to docs/reference/systems/isq/si/cgs/mass.rst diff --git a/docs/reference/systems/physical/si/cgs/power.rst b/docs/reference/systems/isq/si/cgs/power.rst similarity index 100% rename from docs/reference/systems/physical/si/cgs/power.rst rename to docs/reference/systems/isq/si/cgs/power.rst diff --git a/docs/reference/systems/physical/si/cgs/pressure.rst b/docs/reference/systems/isq/si/cgs/pressure.rst similarity index 100% rename from docs/reference/systems/physical/si/cgs/pressure.rst rename to docs/reference/systems/isq/si/cgs/pressure.rst diff --git a/docs/reference/systems/physical/si/cgs/speed.rst b/docs/reference/systems/isq/si/cgs/speed.rst similarity index 100% rename from docs/reference/systems/physical/si/cgs/speed.rst rename to docs/reference/systems/isq/si/cgs/speed.rst diff --git a/docs/reference/systems/physical/si/cgs/time.rst b/docs/reference/systems/isq/si/cgs/time.rst similarity index 100% rename from docs/reference/systems/physical/si/cgs/time.rst rename to docs/reference/systems/isq/si/cgs/time.rst diff --git a/docs/reference/systems/physical/si/charge_density.rst b/docs/reference/systems/isq/si/charge_density.rst similarity index 100% rename from docs/reference/systems/physical/si/charge_density.rst rename to docs/reference/systems/isq/si/charge_density.rst diff --git a/docs/reference/systems/physical/si/concentration.rst b/docs/reference/systems/isq/si/concentration.rst similarity index 100% rename from docs/reference/systems/physical/si/concentration.rst rename to docs/reference/systems/isq/si/concentration.rst diff --git a/docs/reference/systems/physical/si/conductance.rst b/docs/reference/systems/isq/si/conductance.rst similarity index 100% rename from docs/reference/systems/physical/si/conductance.rst rename to docs/reference/systems/isq/si/conductance.rst diff --git a/docs/reference/systems/physical/si/constants.rst b/docs/reference/systems/isq/si/constants.rst similarity index 100% rename from docs/reference/systems/physical/si/constants.rst rename to docs/reference/systems/isq/si/constants.rst diff --git a/docs/reference/systems/physical/si/current_density.rst b/docs/reference/systems/isq/si/current_density.rst similarity index 100% rename from docs/reference/systems/physical/si/current_density.rst rename to docs/reference/systems/isq/si/current_density.rst diff --git a/docs/reference/systems/physical/si/density.rst b/docs/reference/systems/isq/si/density.rst similarity index 100% rename from docs/reference/systems/physical/si/density.rst rename to docs/reference/systems/isq/si/density.rst diff --git a/docs/reference/systems/physical/si/dynamic_viscosity.rst b/docs/reference/systems/isq/si/dynamic_viscosity.rst similarity index 100% rename from docs/reference/systems/physical/si/dynamic_viscosity.rst rename to docs/reference/systems/isq/si/dynamic_viscosity.rst diff --git a/docs/reference/systems/physical/si/electric_charge.rst b/docs/reference/systems/isq/si/electric_charge.rst similarity index 100% rename from docs/reference/systems/physical/si/electric_charge.rst rename to docs/reference/systems/isq/si/electric_charge.rst diff --git a/docs/reference/systems/physical/si/electric_current.rst b/docs/reference/systems/isq/si/electric_current.rst similarity index 100% rename from docs/reference/systems/physical/si/electric_current.rst rename to docs/reference/systems/isq/si/electric_current.rst diff --git a/docs/reference/systems/physical/si/electric_field_strength.rst b/docs/reference/systems/isq/si/electric_field_strength.rst similarity index 100% rename from docs/reference/systems/physical/si/electric_field_strength.rst rename to docs/reference/systems/isq/si/electric_field_strength.rst diff --git a/docs/reference/systems/physical/si/energy.rst b/docs/reference/systems/isq/si/energy.rst similarity index 100% rename from docs/reference/systems/physical/si/energy.rst rename to docs/reference/systems/isq/si/energy.rst diff --git a/docs/reference/systems/physical/si/force.rst b/docs/reference/systems/isq/si/force.rst similarity index 100% rename from docs/reference/systems/physical/si/force.rst rename to docs/reference/systems/isq/si/force.rst diff --git a/docs/reference/systems/physical/si/fps/acceleration.rst b/docs/reference/systems/isq/si/fps/acceleration.rst similarity index 100% rename from docs/reference/systems/physical/si/fps/acceleration.rst rename to docs/reference/systems/isq/si/fps/acceleration.rst diff --git a/docs/reference/systems/physical/si/fps/area.rst b/docs/reference/systems/isq/si/fps/area.rst similarity index 100% rename from docs/reference/systems/physical/si/fps/area.rst rename to docs/reference/systems/isq/si/fps/area.rst diff --git a/docs/reference/systems/physical/si/fps/density.rst b/docs/reference/systems/isq/si/fps/density.rst similarity index 100% rename from docs/reference/systems/physical/si/fps/density.rst rename to docs/reference/systems/isq/si/fps/density.rst diff --git a/docs/reference/systems/physical/si/fps/energy.rst b/docs/reference/systems/isq/si/fps/energy.rst similarity index 100% rename from docs/reference/systems/physical/si/fps/energy.rst rename to docs/reference/systems/isq/si/fps/energy.rst diff --git a/docs/reference/systems/physical/si/fps/force.rst b/docs/reference/systems/isq/si/fps/force.rst similarity index 100% rename from docs/reference/systems/physical/si/fps/force.rst rename to docs/reference/systems/isq/si/fps/force.rst diff --git a/docs/reference/systems/physical/si/fps/length.rst b/docs/reference/systems/isq/si/fps/length.rst similarity index 100% rename from docs/reference/systems/physical/si/fps/length.rst rename to docs/reference/systems/isq/si/fps/length.rst diff --git a/docs/reference/systems/physical/si/fps/mass.rst b/docs/reference/systems/isq/si/fps/mass.rst similarity index 100% rename from docs/reference/systems/physical/si/fps/mass.rst rename to docs/reference/systems/isq/si/fps/mass.rst diff --git a/docs/reference/systems/physical/si/fps/power.rst b/docs/reference/systems/isq/si/fps/power.rst similarity index 100% rename from docs/reference/systems/physical/si/fps/power.rst rename to docs/reference/systems/isq/si/fps/power.rst diff --git a/docs/reference/systems/physical/si/fps/pressure.rst b/docs/reference/systems/isq/si/fps/pressure.rst similarity index 100% rename from docs/reference/systems/physical/si/fps/pressure.rst rename to docs/reference/systems/isq/si/fps/pressure.rst diff --git a/docs/reference/systems/physical/si/fps/speed.rst b/docs/reference/systems/isq/si/fps/speed.rst similarity index 100% rename from docs/reference/systems/physical/si/fps/speed.rst rename to docs/reference/systems/isq/si/fps/speed.rst diff --git a/docs/reference/systems/physical/si/fps/time.rst b/docs/reference/systems/isq/si/fps/time.rst similarity index 100% rename from docs/reference/systems/physical/si/fps/time.rst rename to docs/reference/systems/isq/si/fps/time.rst diff --git a/docs/reference/systems/physical/si/fps/volume.rst b/docs/reference/systems/isq/si/fps/volume.rst similarity index 100% rename from docs/reference/systems/physical/si/fps/volume.rst rename to docs/reference/systems/isq/si/fps/volume.rst diff --git a/docs/reference/systems/physical/si/frequency.rst b/docs/reference/systems/isq/si/frequency.rst similarity index 100% rename from docs/reference/systems/physical/si/frequency.rst rename to docs/reference/systems/isq/si/frequency.rst diff --git a/docs/reference/systems/physical/si/heat_capacity.rst b/docs/reference/systems/isq/si/heat_capacity.rst similarity index 100% rename from docs/reference/systems/physical/si/heat_capacity.rst rename to docs/reference/systems/isq/si/heat_capacity.rst diff --git a/docs/reference/systems/physical/si/iau/length.rst b/docs/reference/systems/isq/si/iau/length.rst similarity index 100% rename from docs/reference/systems/physical/si/iau/length.rst rename to docs/reference/systems/isq/si/iau/length.rst diff --git a/docs/reference/systems/physical/si/imperial/length.rst b/docs/reference/systems/isq/si/imperial/length.rst similarity index 100% rename from docs/reference/systems/physical/si/imperial/length.rst rename to docs/reference/systems/isq/si/imperial/length.rst diff --git a/docs/reference/systems/physical/si/inductance.rst b/docs/reference/systems/isq/si/inductance.rst similarity index 100% rename from docs/reference/systems/physical/si/inductance.rst rename to docs/reference/systems/isq/si/inductance.rst diff --git a/docs/reference/systems/physical/si/international/area.rst b/docs/reference/systems/isq/si/international/area.rst similarity index 100% rename from docs/reference/systems/physical/si/international/area.rst rename to docs/reference/systems/isq/si/international/area.rst diff --git a/docs/reference/systems/physical/si/international/length.rst b/docs/reference/systems/isq/si/international/length.rst similarity index 100% rename from docs/reference/systems/physical/si/international/length.rst rename to docs/reference/systems/isq/si/international/length.rst diff --git a/docs/reference/systems/physical/si/international/speed.rst b/docs/reference/systems/isq/si/international/speed.rst similarity index 100% rename from docs/reference/systems/physical/si/international/speed.rst rename to docs/reference/systems/isq/si/international/speed.rst diff --git a/docs/reference/systems/physical/si/international/volume.rst b/docs/reference/systems/isq/si/international/volume.rst similarity index 100% rename from docs/reference/systems/physical/si/international/volume.rst rename to docs/reference/systems/isq/si/international/volume.rst diff --git a/docs/reference/systems/physical/si/length.rst b/docs/reference/systems/isq/si/length.rst similarity index 100% rename from docs/reference/systems/physical/si/length.rst rename to docs/reference/systems/isq/si/length.rst diff --git a/docs/reference/systems/physical/si/luminance.rst b/docs/reference/systems/isq/si/luminance.rst similarity index 100% rename from docs/reference/systems/physical/si/luminance.rst rename to docs/reference/systems/isq/si/luminance.rst diff --git a/docs/reference/systems/physical/si/luminous_intensity.rst b/docs/reference/systems/isq/si/luminous_intensity.rst similarity index 100% rename from docs/reference/systems/physical/si/luminous_intensity.rst rename to docs/reference/systems/isq/si/luminous_intensity.rst diff --git a/docs/reference/systems/physical/si/magnetic_flux.rst b/docs/reference/systems/isq/si/magnetic_flux.rst similarity index 100% rename from docs/reference/systems/physical/si/magnetic_flux.rst rename to docs/reference/systems/isq/si/magnetic_flux.rst diff --git a/docs/reference/systems/physical/si/magnetic_induction.rst b/docs/reference/systems/isq/si/magnetic_induction.rst similarity index 100% rename from docs/reference/systems/physical/si/magnetic_induction.rst rename to docs/reference/systems/isq/si/magnetic_induction.rst diff --git a/docs/reference/systems/physical/si/mass.rst b/docs/reference/systems/isq/si/mass.rst similarity index 100% rename from docs/reference/systems/physical/si/mass.rst rename to docs/reference/systems/isq/si/mass.rst diff --git a/docs/reference/systems/physical/si/molar_energy.rst b/docs/reference/systems/isq/si/molar_energy.rst similarity index 100% rename from docs/reference/systems/physical/si/molar_energy.rst rename to docs/reference/systems/isq/si/molar_energy.rst diff --git a/docs/reference/systems/physical/si/momentum.rst b/docs/reference/systems/isq/si/momentum.rst similarity index 100% rename from docs/reference/systems/physical/si/momentum.rst rename to docs/reference/systems/isq/si/momentum.rst diff --git a/docs/reference/systems/physical/si/permeability.rst b/docs/reference/systems/isq/si/permeability.rst similarity index 100% rename from docs/reference/systems/physical/si/permeability.rst rename to docs/reference/systems/isq/si/permeability.rst diff --git a/docs/reference/systems/physical/si/permittivity.rst b/docs/reference/systems/isq/si/permittivity.rst similarity index 100% rename from docs/reference/systems/physical/si/permittivity.rst rename to docs/reference/systems/isq/si/permittivity.rst diff --git a/docs/reference/systems/physical/si/power.rst b/docs/reference/systems/isq/si/power.rst similarity index 100% rename from docs/reference/systems/physical/si/power.rst rename to docs/reference/systems/isq/si/power.rst diff --git a/docs/reference/systems/physical/si/prefixes.rst b/docs/reference/systems/isq/si/prefixes.rst similarity index 100% rename from docs/reference/systems/physical/si/prefixes.rst rename to docs/reference/systems/isq/si/prefixes.rst diff --git a/docs/reference/systems/physical/si/pressure.rst b/docs/reference/systems/isq/si/pressure.rst similarity index 100% rename from docs/reference/systems/physical/si/pressure.rst rename to docs/reference/systems/isq/si/pressure.rst diff --git a/docs/reference/systems/physical/si/resistance.rst b/docs/reference/systems/isq/si/resistance.rst similarity index 100% rename from docs/reference/systems/physical/si/resistance.rst rename to docs/reference/systems/isq/si/resistance.rst diff --git a/docs/reference/systems/physical/si/speed.rst b/docs/reference/systems/isq/si/speed.rst similarity index 100% rename from docs/reference/systems/physical/si/speed.rst rename to docs/reference/systems/isq/si/speed.rst diff --git a/docs/reference/systems/physical/si/surface_tension.rst b/docs/reference/systems/isq/si/surface_tension.rst similarity index 100% rename from docs/reference/systems/physical/si/surface_tension.rst rename to docs/reference/systems/isq/si/surface_tension.rst diff --git a/docs/reference/systems/physical/si/thermal_conductivity.rst b/docs/reference/systems/isq/si/thermal_conductivity.rst similarity index 100% rename from docs/reference/systems/physical/si/thermal_conductivity.rst rename to docs/reference/systems/isq/si/thermal_conductivity.rst diff --git a/docs/reference/systems/physical/si/thermodynamic_temperature.rst b/docs/reference/systems/isq/si/thermodynamic_temperature.rst similarity index 100% rename from docs/reference/systems/physical/si/thermodynamic_temperature.rst rename to docs/reference/systems/isq/si/thermodynamic_temperature.rst diff --git a/docs/reference/systems/physical/si/time.rst b/docs/reference/systems/isq/si/time.rst similarity index 100% rename from docs/reference/systems/physical/si/time.rst rename to docs/reference/systems/isq/si/time.rst diff --git a/docs/reference/systems/physical/si/typographic/length.rst b/docs/reference/systems/isq/si/typographic/length.rst similarity index 100% rename from docs/reference/systems/physical/si/typographic/length.rst rename to docs/reference/systems/isq/si/typographic/length.rst diff --git a/docs/reference/systems/physical/si/us/length.rst b/docs/reference/systems/isq/si/us/length.rst similarity index 100% rename from docs/reference/systems/physical/si/us/length.rst rename to docs/reference/systems/isq/si/us/length.rst diff --git a/docs/reference/systems/physical/si/voltage.rst b/docs/reference/systems/isq/si/voltage.rst similarity index 100% rename from docs/reference/systems/physical/si/voltage.rst rename to docs/reference/systems/isq/si/voltage.rst diff --git a/docs/reference/systems/physical/si/volume.rst b/docs/reference/systems/isq/si/volume.rst similarity index 100% rename from docs/reference/systems/physical/si/volume.rst rename to docs/reference/systems/isq/si/volume.rst diff --git a/docs/reference/systems/physical/si_cgs.rst b/docs/reference/systems/isq/si_cgs.rst similarity index 100% rename from docs/reference/systems/physical/si_cgs.rst rename to docs/reference/systems/isq/si_cgs.rst diff --git a/docs/reference/systems/physical/si_fps.rst b/docs/reference/systems/isq/si_fps.rst similarity index 100% rename from docs/reference/systems/physical/si_fps.rst rename to docs/reference/systems/isq/si_fps.rst diff --git a/docs/reference/systems/physical/si_iau.rst b/docs/reference/systems/isq/si_iau.rst similarity index 100% rename from docs/reference/systems/physical/si_iau.rst rename to docs/reference/systems/isq/si_iau.rst diff --git a/docs/reference/systems/physical/si_imperial.rst b/docs/reference/systems/isq/si_imperial.rst similarity index 100% rename from docs/reference/systems/physical/si_imperial.rst rename to docs/reference/systems/isq/si_imperial.rst diff --git a/docs/reference/systems/physical/si_international.rst b/docs/reference/systems/isq/si_international.rst similarity index 100% rename from docs/reference/systems/physical/si_international.rst rename to docs/reference/systems/isq/si_international.rst diff --git a/docs/reference/systems/physical/si_typographic.rst b/docs/reference/systems/isq/si_typographic.rst similarity index 100% rename from docs/reference/systems/physical/si_typographic.rst rename to docs/reference/systems/isq/si_typographic.rst diff --git a/docs/reference/systems/physical/si_us.rst b/docs/reference/systems/isq/si_us.rst similarity index 100% rename from docs/reference/systems/physical/si_us.rst rename to docs/reference/systems/isq/si_us.rst diff --git a/docs/use_cases.rst b/docs/use_cases.rst index 29bcb2d9..6c84ef70 100644 --- a/docs/use_cases.rst +++ b/docs/use_cases.rst @@ -6,7 +6,7 @@ Use Cases For brevity all the code examples in this chapter assume:: using namespace units; - using namespace units::physical; + using namespace units::isq; .. toctree:: :maxdepth: 1 diff --git a/docs/use_cases/extensions.rst b/docs/use_cases/extensions.rst index 83693c8d..97752d64 100644 --- a/docs/use_cases/extensions.rst +++ b/docs/use_cases/extensions.rst @@ -57,7 +57,7 @@ Enabling a Unit for Prefixing ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ In case I decide it is reasonable to express my desks with SI prefixes the only thing I have -to change in the above code is to replace `no_prefix` with `physical::si::prefix`:: +to change in the above code is to replace `no_prefix` with `isq::si::prefix`:: struct desk : named_scaled_unit {}; @@ -231,8 +231,8 @@ different systems: namespace si { - struct metre : named_unit {}; - struct kilometre : prefixed_unit {}; + struct metre : named_unit {}; + struct kilometre : prefixed_unit {}; struct dim_length : base_dimension<"L", metre> {}; diff --git a/docs/use_cases/interoperability.rst b/docs/use_cases/interoperability.rst index f5e31a3c..764f3c14 100644 --- a/docs/use_cases/interoperability.rst +++ b/docs/use_cases/interoperability.rst @@ -16,14 +16,14 @@ provide the following: For example, to provide support for the ``std::chrono::duration`` it is enough to define:: #include - #include + #include #include namespace units { template struct quantity_like_traits> { - using dimension = physical::si::dim_time; + using dimension = isq::si::dim_time; using unit = downcast_unit; using rep = Rep; [[nodiscard]] static constexpr rep count(const std::chrono::duration& q) { return q.count(); } diff --git a/docs/use_cases/legacy_interfaces.rst b/docs/use_cases/legacy_interfaces.rst index 4b6834b4..70e51b8c 100644 --- a/docs/use_cases/legacy_interfaces.rst +++ b/docs/use_cases/legacy_interfaces.rst @@ -25,10 +25,10 @@ and pass it to the library's output: .. code-block:: #include "legacy.h" - #include + #include #include - using namespace units::physical; + using namespace units::isq; constexpr Speed auto avg_speed(Length auto d, Time auto t) { diff --git a/docs/use_cases/unknown_dimensions.rst b/docs/use_cases/unknown_dimensions.rst index a79db984..705b34d5 100644 --- a/docs/use_cases/unknown_dimensions.rst +++ b/docs/use_cases/unknown_dimensions.rst @@ -22,9 +22,9 @@ The same applies to the resulting unit. For example: .. code-block:: :emphasize-lines: 1,7,9 - #include + #include - using namespace units::physical::si; + using namespace units::isq::si; constexpr auto result = 144_q_km / 2_q_h; static_assert(std::is_same_v - #include + #include + #include - using namespace units::physical::si; + using namespace units::isq::si; constexpr auto result = 144_q_km / 2_q_h; static_assert(std::is_same_v +#include namespace units{ namespace experimental{ @@ -9,7 +9,7 @@ namespace experimental{ namespace acceleration { template -using m_per_s2 = units::physical::si::acceleration; +using m_per_s2 = units::isq::si::acceleration; template constexpr m_per_s2 g{static_cast(9.80665)}; diff --git a/example/alternative_namespaces/area.h b/example/alternative_namespaces/area.h index fb1a9ab9..5a813674 100644 --- a/example/alternative_namespaces/area.h +++ b/example/alternative_namespaces/area.h @@ -1,14 +1,14 @@ #pragma once -#include +#include namespace area { template -using m2 = units::physical::si::area; +using m2 = units::isq::si::area; template -using fm2 = units::physical::si::area; +using fm2 = units::isq::si::area; } // namespace area diff --git a/example/alternative_namespaces/box_example.cpp b/example/alternative_namespaces/box_example.cpp index 18e597a9..06ae1aa1 100644 --- a/example/alternative_namespaces/box_example.cpp +++ b/example/alternative_namespaces/box_example.cpp @@ -53,7 +53,7 @@ struct Box { #include -using namespace units::physical::si::literals; +using namespace units::isq::si::literals; int main() { diff --git a/example/alternative_namespaces/capacitor_time_curve.cpp b/example/alternative_namespaces/capacitor_time_curve.cpp index 1492db7e..e5a7285d 100644 --- a/example/alternative_namespaces/capacitor_time_curve.cpp +++ b/example/alternative_namespaces/capacitor_time_curve.cpp @@ -20,16 +20,16 @@ physical_quantities */ -#include -#include -#include +#include +#include +#include #include #include #include "./voltage.h" #include using namespace units::experimental; -using namespace units::physical::si::literals; +using namespace units::isq::si::literals; int main() { diff --git a/example/alternative_namespaces/clcpp_response.cpp b/example/alternative_namespaces/clcpp_response.cpp index ac2336ba..06f77d7c 100644 --- a/example/alternative_namespaces/clcpp_response.cpp +++ b/example/alternative_namespaces/clcpp_response.cpp @@ -25,8 +25,8 @@ #include "./area.h" #include "./units_str.h" -using namespace units::physical::si::literals; -using namespace units::physical::si::international; +using namespace units::isq::si::literals; +using namespace units::isq::si::international; using namespace units::experimental; void simple_quantities() diff --git a/example/alternative_namespaces/conversion_factor.cpp b/example/alternative_namespaces/conversion_factor.cpp index 685f45b4..c08eb4a2 100644 --- a/example/alternative_namespaces/conversion_factor.cpp +++ b/example/alternative_namespaces/conversion_factor.cpp @@ -41,7 +41,7 @@ inline constexpr std::common_type_t } // namespace -using namespace units::physical::si::literals; +using namespace units::isq::si::literals; using namespace units::experimental; int main() diff --git a/example/alternative_namespaces/density.h b/example/alternative_namespaces/density.h index 870da078..12a9dc78 100644 --- a/example/alternative_namespaces/density.h +++ b/example/alternative_namespaces/density.h @@ -2,7 +2,7 @@ #pragma once -#include +#include namespace units{ namespace experimental{ @@ -10,7 +10,7 @@ namespace experimental{ namespace density { template -using kg_per_m3 = units::physical::si::density; +using kg_per_m3 = units::isq::si::density; } diff --git a/example/alternative_namespaces/force.h b/example/alternative_namespaces/force.h index ad0945e5..346035d7 100644 --- a/example/alternative_namespaces/force.h +++ b/example/alternative_namespaces/force.h @@ -1,7 +1,7 @@ #pragma once -#include +#include namespace units{ namespace experimental{ @@ -9,7 +9,7 @@ namespace experimental{ namespace force { template -using N = units::physical::si::force; +using N = units::isq::si::force; } diff --git a/example/alternative_namespaces/length.h b/example/alternative_namespaces/length.h index d9a40687..9d96dd60 100644 --- a/example/alternative_namespaces/length.h +++ b/example/alternative_namespaces/length.h @@ -2,12 +2,12 @@ #pragma once -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include namespace units{ namespace experimental{ @@ -15,70 +15,70 @@ namespace experimental{ namespace length { template -using m = units::physical::si::length; +using m = units::isq::si::length; template -using mm = units::physical::si::length; +using mm = units::isq::si::length; template -using fm = units::physical::si::length; +using fm = units::isq::si::length; template -using km = units::physical::si::length; +using km = units::isq::si::length; template -using AU = units::physical::si::length; +using AU = units::isq::si::length; template -using in = units::physical::si::length; +using in = units::isq::si::length; template -using angstrom = units::physical::si::length; +using angstrom = units::isq::si::length; template -using ch = units::physical::si::length; +using ch = units::isq::si::length; template -using fathom = units::physical::si::length; +using fathom = units::isq::si::length; template -using fathom_us = units::physical::si::length; +using fathom_us = units::isq::si::length; template -using ft = units::physical::si::length; +using ft = units::isq::si::length; template -using ft_us = units::physical::si::length; +using ft_us = units::isq::si::length; template -using ly = units::physical::si::length; +using ly = units::isq::si::length; template -using mi = units::physical::si::length; +using mi = units::isq::si::length; template -using mi_naut = units::physical::si::length; +using mi_naut = units::isq::si::length; template -using pc = units::physical::si::length; +using pc = units::isq::si::length; template -using pica_comp = units::physical::si::length; +using pica_comp = units::isq::si::length; template -using pica_prn = units::physical::si::length; +using pica_prn = units::isq::si::length; template -using point_comp = units::physical::si::length; +using point_comp = units::isq::si::length; template -using point_prn = units::physical::si::length; +using point_prn = units::isq::si::length; template -using rd = units::physical::si::length; +using rd = units::isq::si::length; template -using yd = units::physical::si::length; +using yd = units::isq::si::length; } // namespace length diff --git a/example/alternative_namespaces/mass.h b/example/alternative_namespaces/mass.h index 57816bc7..e8f4e60e 100644 --- a/example/alternative_namespaces/mass.h +++ b/example/alternative_namespaces/mass.h @@ -2,7 +2,7 @@ #pragma once -#include +#include namespace units{ namespace experimental{ @@ -10,7 +10,7 @@ namespace experimental{ namespace mass { template -using kg = units::physical::si::mass; +using kg = units::isq::si::mass; } diff --git a/example/alternative_namespaces/time.h b/example/alternative_namespaces/time.h index f1d6650f..cd9cfa2d 100644 --- a/example/alternative_namespaces/time.h +++ b/example/alternative_namespaces/time.h @@ -1,21 +1,21 @@ #pragma once -#include +#include // named qtime due to conflict with time_t time(time_t*) namespace q_time { template -using s = units::physical::si::time; +using s = units::isq::si::time; template -using ms = units::physical::si::time; +using ms = units::isq::si::time; template -using min = units::physical::si::time; +using min = units::isq::si::time; template -using h = units::physical::si::time; +using h = units::isq::si::time; } // namespace time diff --git a/example/alternative_namespaces/timer.cpp b/example/alternative_namespaces/timer.cpp index 50bd4984..c99848bd 100644 --- a/example/alternative_namespaces/timer.cpp +++ b/example/alternative_namespaces/timer.cpp @@ -8,7 +8,7 @@ */ using namespace units::experimental; -using namespace units::physical::si::literals; +using namespace units::isq::si::literals; int main() { diff --git a/example/alternative_namespaces/units_str.h b/example/alternative_namespaces/units_str.h index ba68a736..44e9883f 100644 --- a/example/alternative_namespaces/units_str.h +++ b/example/alternative_namespaces/units_str.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include // get at the units text of the quantity, without its numeric value inline auto constexpr units_str(const units::Quantity auto& q) diff --git a/example/alternative_namespaces/voltage.h b/example/alternative_namespaces/voltage.h index 258f597c..3e772e6e 100644 --- a/example/alternative_namespaces/voltage.h +++ b/example/alternative_namespaces/voltage.h @@ -2,7 +2,7 @@ #pragma once -#include +#include namespace units{ namespace experimental{ @@ -10,19 +10,19 @@ namespace experimental{ namespace voltage { template -using V = units::physical::si::voltage; +using V = units::isq::si::voltage; template -using mV = units::physical::si::voltage; +using mV = units::isq::si::voltage; template -using uV = units::physical::si::voltage; +using uV = units::isq::si::voltage; template -using nV = units::physical::si::voltage; +using nV = units::isq::si::voltage; template -using pV = units::physical::si::voltage; +using pV = units::isq::si::voltage; } // namespace voltage diff --git a/example/alternative_namespaces/volume.h b/example/alternative_namespaces/volume.h index 9a201e49..0729eee0 100644 --- a/example/alternative_namespaces/volume.h +++ b/example/alternative_namespaces/volume.h @@ -2,7 +2,7 @@ #pragma once -#include +#include namespace units{ namespace experimental{ @@ -10,7 +10,7 @@ namespace experimental{ namespace volume { template -using m3 = units::physical::si::volume; +using m3 = units::isq::si::volume; } diff --git a/example/avg_speed.cpp b/example/avg_speed.cpp index 1ae667d9..e760d8ea 100644 --- a/example/avg_speed.cpp +++ b/example/avg_speed.cpp @@ -20,15 +20,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -#include -#include -#include +#include +#include +#include #include #include namespace { -using namespace units::physical; +using namespace units::isq; constexpr si::speed fixed_int_si_avg_speed(si::length d, @@ -68,7 +68,7 @@ void example() { // SI (int) { - using namespace units::physical::si::literals; + using namespace units::isq::si::literals; constexpr Length auto distance = 220_q_km; // constructed from a UDL constexpr si::time duration(2); // constructed from a value @@ -82,7 +82,7 @@ void example() // SI (double) { - using namespace units::physical::si::literals; + using namespace units::isq::si::literals; constexpr Length auto distance = 220._q_km; // constructed from a UDL constexpr si::time duration(2); // constructed from a value @@ -98,7 +98,7 @@ void example() // Customary Units (int) { - using namespace units::physical::si::international::literals; + using namespace units::isq::si::international::literals; constexpr Length auto distance = 140_q_mi; // constructed from a UDL constexpr si::time duration(2); // constructed from a value @@ -114,7 +114,7 @@ void example() // Customary Units (double) { - using namespace units::physical::si::international::literals; + using namespace units::isq::si::international::literals; constexpr Length auto distance = 140._q_mi; // constructed from a UDL constexpr si::time duration(2); // constructed from a value @@ -132,7 +132,7 @@ void example() // CGS (int) { - using namespace units::physical::si::cgs::literals; + using namespace units::isq::si::cgs::literals; constexpr Length auto distance = 22'000'000_q_cm; // constructed from a UDL constexpr si::cgs::time duration(2); // constructed from a value @@ -151,7 +151,7 @@ void example() // CGS (double) { - using namespace units::physical::si::cgs::literals; + using namespace units::isq::si::cgs::literals; constexpr Length auto distance = 22'000'000._q_cm; // constructed from a UDL constexpr si::cgs::time duration(2); // constructed from a value diff --git a/example/box_example.cpp b/example/box_example.cpp index 5ed8de99..9ac3b645 100644 --- a/example/box_example.cpp +++ b/example/box_example.cpp @@ -1,18 +1,18 @@ -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include namespace { -using namespace units::physical; +using namespace units::isq; using m = si::metre; using m2 = si::square_metre; diff --git a/example/capacitor_time_curve.cpp b/example/capacitor_time_curve.cpp index bc6ee838..af75e6d2 100644 --- a/example/capacitor_time_curve.cpp +++ b/example/capacitor_time_curve.cpp @@ -20,18 +20,18 @@ physical_quantities */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include int main() { - using namespace units::physical; - using namespace units::physical::si; + using namespace units::isq; + using namespace units::isq::si; std::cout << "mp-units capacitor time curve example...\n"; std::cout.setf(std::ios_base::fixed, std::ios_base::floatfield); diff --git a/example/clcpp_response.cpp b/example/clcpp_response.cpp index 83827f66..a098d920 100644 --- a/example/clcpp_response.cpp +++ b/example/clcpp_response.cpp @@ -16,15 +16,15 @@ */ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -34,11 +34,11 @@ using namespace units; void simple_quantities() { - using namespace units::physical::si; - using namespace units::physical::si::international; + using namespace units::isq::si; + using namespace units::isq::si::international; using distance = length; - using duration = physical::si::time; + using duration = isq::si::time; constexpr distance km = 1.0_q_km; constexpr distance miles = 1.0_q_mi; @@ -58,9 +58,9 @@ void simple_quantities() void quantities_with_typed_units() { - using namespace units::physical; - using namespace units::physical::si; - using namespace units::physical::si::international; + using namespace units::isq; + using namespace units::isq::si; + using namespace units::isq::si::international; constexpr length km = 1.0_q_km; constexpr length miles = 1.0_q_mi; @@ -106,7 +106,7 @@ void quantities_with_typed_units() void calcs_comparison() { - using namespace units::physical::si; + using namespace units::isq::si; std::cout << "\nA distinct unit for each type is efficient and accurate\n" "when adding two values of the same very big\n" diff --git a/example/conversion_factor.cpp b/example/conversion_factor.cpp index ffe2abb1..c2d1bb00 100644 --- a/example/conversion_factor.cpp +++ b/example/conversion_factor.cpp @@ -15,7 +15,7 @@ along with this program. If not, see http://www.gnu.org/licenses./ */ -#include +#include #include #include #include @@ -42,7 +42,7 @@ inline constexpr std::common_type_t int main() { - using namespace units::physical::si; + using namespace units::isq::si; std::cout << "conversion factor in mp-units...\n\n"; diff --git a/example/custom_systems.cpp b/example/custom_systems.cpp index ea2c47ba..82f911c2 100644 --- a/example/custom_systems.cpp +++ b/example/custom_systems.cpp @@ -21,7 +21,7 @@ // SOFTWARE. #include -#include +#include #include using namespace units; @@ -40,8 +40,8 @@ using length = quantity; namespace si { -struct metre : named_unit {}; -struct kilometre : prefixed_unit {}; +struct metre : named_unit {}; +struct kilometre : prefixed_unit {}; struct dim_length : base_dimension<"L", metre> {}; diff --git a/example/experimental_angle.cpp b/example/experimental_angle.cpp index 116660e4..4080bf81 100644 --- a/example/experimental_angle.cpp +++ b/example/experimental_angle.cpp @@ -22,14 +22,14 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include using namespace units; -using namespace units::physical::si::literals; +using namespace units::isq::si::literals; int main() { diff --git a/example/foot_pound_second.cpp b/example/foot_pound_second.cpp index 81d64649..ea54a1ae 100644 --- a/example/foot_pound_second.cpp +++ b/example/foot_pound_second.cpp @@ -22,21 +22,21 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include -using namespace units::physical; +using namespace units::isq; // Some basic specs for the warship @@ -64,7 +64,7 @@ auto fmt_line(const Q a) // Print the ship details in the units as defined in the Ship struct, in other si::imperial units, and in SI void print_details(std::string_view description, const Ship& ship) { - using namespace units::physical::si::fps::literals; + using namespace units::isq::si::fps::literals; const auto waterDensity = 62.4_q_lb_per_ft3; std::cout << fmt::format("{}\n", description); std::cout << fmt::format("{:20} : {}\n", "length", fmt_line, si::length>(ship.length)) @@ -81,8 +81,8 @@ void print_details(std::string_view description, const Ship& ship) int main() { - using namespace units::physical::si::literals; - using namespace units::physical::si::fps::literals; + using namespace units::isq::si::literals; + using namespace units::isq::si::fps::literals; // KMS Bismark, using the units the Germans would use, taken from Wiki auto bismark = Ship{.length{251._q_m}, .draft{9.3_q_m}, .beam{36_q_m}, .speed{56_q_km_per_h}, .mass{50'300_q_t}, .mainGuns{380_q_mm}, .shellMass{800_q_kg}, .shellSpeed{820._q_m_per_s}, .power{110.45_q_kW}}; diff --git a/example/geographic.cpp b/example/geographic.cpp index 214775d7..a287d3f3 100644 --- a/example/geographic.cpp +++ b/example/geographic.cpp @@ -26,7 +26,7 @@ namespace { -using namespace units::physical::si::unit_constants; +using namespace units::isq::si::unit_constants; inline constexpr auto earth_radius = 6371 * km; } // namespace diff --git a/example/geographic.h b/example/geographic.h index ed0c9edb..6bd33522 100644 --- a/example/geographic.h +++ b/example/geographic.h @@ -23,7 +23,7 @@ #pragma once #include -#include +#include #include #include @@ -116,8 +116,8 @@ struct fmt::formatter : formatter {}; -using distance = units::quantity_kind; +struct horizontal_kind : units::kind {}; +using distance = units::quantity_kind; struct position { latitude lat; diff --git a/example/glide_computer.h b/example/glide_computer.h index cedbb893..f1b94008 100644 --- a/example/glide_computer.h +++ b/example/glide_computer.h @@ -25,8 +25,8 @@ #include "geographic.h" #include #include -#include -#include +#include +#include #include // An example of a really simplified tactical glide computer @@ -44,7 +44,7 @@ // - flight path exactly on a shortest possible line to destination using namespace units; -using namespace units::physical; +using namespace units::isq; template struct fmt::formatter : formatter { @@ -95,11 +95,11 @@ std::basic_ostream& operator<<(std::basic_ostream& } // namespace glide_computer template<> -struct fmt::formatter : formatter> { +struct fmt::formatter : formatter> { template auto format(glide_computer::altitude a, FormatContext& ctx) { - formatter>::format(a.relative().common(), ctx); + formatter>::format(a.relative().common(), ctx); return format_to(ctx.out(), " AMSL"); } }; diff --git a/example/glide_computer_example.cpp b/example/glide_computer_example.cpp index b770c58c..e48951ce 100644 --- a/example/glide_computer_example.cpp +++ b/example/glide_computer_example.cpp @@ -53,7 +53,7 @@ auto get_weather_conditions() auto get_waypoints() { using namespace geographic::literals; - using namespace units::physical::si::international::unit_constants; + using namespace units::isq::si::international::unit_constants; static const std::array waypoints = { waypoint{"EPPR", {54.24772_N, 18.6745_E}, altitude(16 * ft)}, // N54°14'51.8" E18°40'28.2" waypoint{"EPGI", {53.52442_N, 18.84947_E}, altitude(115 * ft)} // N53°31'27.9" E18°50'58.1" diff --git a/example/hello_units.cpp b/example/hello_units.cpp index 60a3099f..3d45255e 100644 --- a/example/hello_units.cpp +++ b/example/hello_units.cpp @@ -21,12 +21,12 @@ // SOFTWARE. #include -#include -#include +#include +#include #include #include -using namespace units::physical; +using namespace units::isq; constexpr Speed auto avg_speed(Length auto d, Time auto t) { @@ -35,8 +35,8 @@ constexpr Speed auto avg_speed(Length auto d, Time auto t) int main() { - using namespace units::physical::si::literals; - using namespace units::physical::si::unit_constants; + using namespace units::isq::si::literals; + using namespace units::isq::si::unit_constants; constexpr Speed auto v1 = 110 * km / h; constexpr Speed auto v2 = avg_speed(220_q_km, 2_q_h); diff --git a/example/kalman_filter-alpha_beta_filter_example2.cpp b/example/kalman_filter-alpha_beta_filter_example2.cpp index c0e47acc..f970d2d9 100644 --- a/example/kalman_filter-alpha_beta_filter_example2.cpp +++ b/example/kalman_filter-alpha_beta_filter_example2.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include @@ -16,8 +16,8 @@ struct state_variable { Q predicted_next_state; }; -using namespace units::physical; -using namespace units::physical::si::literals; +using namespace units::isq; +using namespace units::isq::si::literals; constexpr auto radar_transmit_interval = 5.0_q_s; constexpr double kalman_range_gain = 0.2; diff --git a/example/linear_algebra.cpp b/example/linear_algebra.cpp index ee993df9..463bfe4b 100644 --- a/example/linear_algebra.cpp +++ b/example/linear_algebra.cpp @@ -20,9 +20,9 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -#include -#include -#include +#include +#include +#include #include #include #include @@ -58,8 +58,8 @@ std::ostream& operator<<(std::ostream& os, const matrix& v) namespace { -using namespace units::physical; -using namespace units::physical::si::literals; +using namespace units::isq; +using namespace units::isq::si::literals; template using vector = std::math::fs_vector; diff --git a/example/measurement.cpp b/example/measurement.cpp index 819277c1..da1c8e38 100644 --- a/example/measurement.cpp +++ b/example/measurement.cpp @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -#include +#include #include #include #include @@ -124,7 +124,7 @@ static_assert(units::QuantityValue>); void example() { - using namespace units::physical; + using namespace units::isq; const auto a = si::acceleration>(measurement(9.8, 0.1)); const auto t = si::time>(measurement(1.2, 0.1)); diff --git a/example/total_energy.cpp b/example/total_energy.cpp index d4d7e50c..543b394a 100644 --- a/example/total_energy.cpp +++ b/example/total_energy.cpp @@ -20,18 +20,18 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include namespace { -using namespace units::physical; +using namespace units::isq; Energy auto total_energy(Momentum auto p, Mass auto m, Speed auto c) { @@ -40,7 +40,7 @@ Energy auto total_energy(Momentum auto p, Mass auto m, Speed auto c) void si_example() { - using namespace units::physical::si; + using namespace units::isq::si; using GeV = gigaelectronvolt; constexpr Speed auto c = si2019::speed_of_light<>; @@ -71,7 +71,7 @@ void si_example() void natural_example() { - using namespace units::physical::natural; + using namespace units::isq::natural; using GeV = gigaelectronvolt; constexpr Speed auto c = speed_of_light<>; diff --git a/example/unknown_dimension.cpp b/example/unknown_dimension.cpp index 822a18e0..dea18b0b 100644 --- a/example/unknown_dimension.cpp +++ b/example/unknown_dimension.cpp @@ -20,22 +20,22 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -#include +#include #include #include namespace { -template -constexpr units::physical::Speed auto avg_speed(D d, T t) +template +constexpr units::isq::Speed auto avg_speed(D d, T t) { return d / t; } void example() { - using namespace units::physical; - using namespace units::physical::si::literals; + using namespace units::isq; + using namespace units::isq::si::literals; Length auto d1 = 123_q_m; Time auto t1 = 10_q_s; diff --git a/src/include/units/chrono.h b/src/include/units/chrono.h index 9b6ff25b..b8400b99 100644 --- a/src/include/units/chrono.h +++ b/src/include/units/chrono.h @@ -23,14 +23,14 @@ #pragma once #include -#include +#include #include namespace units { template struct quantity_like_traits> { - using dimension = physical::si::dim_time; + using dimension = isq::si::dim_time; using unit = downcast_unit; using rep = Rep; [[nodiscard]] static constexpr rep count(const std::chrono::duration& q) { return q.count(); } @@ -38,7 +38,7 @@ struct quantity_like_traits> { template struct quantity_point_like_traits>> { - using dimension = physical::si::dim_time; + using dimension = isq::si::dim_time; using unit = downcast_unit; using rep = Rep; [[nodiscard]] static constexpr auto relative( diff --git a/src/include/units/data/bitrate.h b/src/include/units/data/bitrate.h index cb99ffd0..4ebd8cf8 100644 --- a/src/include/units/data/bitrate.h +++ b/src/include/units/data/bitrate.h @@ -24,19 +24,19 @@ #include #include -#include +#include #include namespace units::data { struct bit_per_second : unit {}; -struct dim_bitrate : derived_dimension, exponent> {}; +struct dim_bitrate : derived_dimension, exponent> {}; -struct kibibit_per_second : deduced_unit {}; -struct mebibit_per_second : deduced_unit {}; -struct gibibit_per_second : deduced_unit {}; -struct tebibit_per_second : deduced_unit {}; -struct pebibit_per_second : deduced_unit {}; +struct kibibit_per_second : deduced_unit {}; +struct mebibit_per_second : deduced_unit {}; +struct gibibit_per_second : deduced_unit {}; +struct tebibit_per_second : deduced_unit {}; +struct pebibit_per_second : deduced_unit {}; template concept Bitrate = QuantityOf; diff --git a/src/include/units/generic/angle.h b/src/include/units/generic/angle.h index f91f0118..f9a393b6 100644 --- a/src/include/units/generic/angle.h +++ b/src/include/units/generic/angle.h @@ -22,12 +22,12 @@ #pragma once -#include +#include #include namespace units { -struct radian : named_unit {}; +struct radian : named_unit {}; template struct dim_angle : base_dimension<"A", U> {}; diff --git a/src/include/units/isq/dimensions.h b/src/include/units/isq/dimensions.h new file mode 100644 index 00000000..ec8d9473 --- /dev/null +++ b/src/include/units/isq/dimensions.h @@ -0,0 +1,70 @@ +// The MIT License (MIT) +// +// Copyright (c) 2018 Mateusz Pusz +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +// TODO Add when downcasting issue is solved (collides with pressure) +// #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +// TODO Add when downcasting issue is solved (collides with frequency) +// #include +#include +#include +#include +#include +#include +#include +#include +#include +#include diff --git a/src/include/units/physical/dimensions/absorbed_dose.h b/src/include/units/isq/dimensions/absorbed_dose.h similarity index 90% rename from src/include/units/physical/dimensions/absorbed_dose.h rename to src/include/units/isq/dimensions/absorbed_dose.h index 1e6e65e2..8dcb1e6c 100644 --- a/src/include/units/physical/dimensions/absorbed_dose.h +++ b/src/include/units/isq/dimensions/absorbed_dose.h @@ -23,10 +23,10 @@ #pragma once #include -#include -#include +#include +#include -namespace units::physical { +namespace units::isq { template E, DimensionOfT M> struct dim_absorbed_dose : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_absorbed_dose : derived_dimension, exponent< template concept AbsorbedDose = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/acceleration.h b/src/include/units/isq/dimensions/acceleration.h similarity index 90% rename from src/include/units/physical/dimensions/acceleration.h rename to src/include/units/isq/dimensions/acceleration.h index 86b94505..b639fcca 100644 --- a/src/include/units/physical/dimensions/acceleration.h +++ b/src/include/units/isq/dimensions/acceleration.h @@ -23,10 +23,10 @@ #pragma once #include -#include -#include +#include +#include -namespace units::physical { +namespace units::isq { template L, DimensionOfT T> struct dim_acceleration : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_acceleration : derived_dimension, exponent concept Acceleration = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/amount_of_substance.h b/src/include/units/isq/dimensions/amount_of_substance.h similarity index 95% rename from src/include/units/physical/dimensions/amount_of_substance.h rename to src/include/units/isq/dimensions/amount_of_substance.h index ffa42303..099e516f 100644 --- a/src/include/units/physical/dimensions/amount_of_substance.h +++ b/src/include/units/isq/dimensions/amount_of_substance.h @@ -24,7 +24,7 @@ #include -namespace units::physical { +namespace units::isq { template struct dim_amount_of_substance : base_dimension<"N", U> {}; @@ -32,4 +32,4 @@ struct dim_amount_of_substance : base_dimension<"N", U> {}; template concept AmountOfSubstance = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/angular_velocity.h b/src/include/units/isq/dimensions/angular_velocity.h similarity index 93% rename from src/include/units/physical/dimensions/angular_velocity.h rename to src/include/units/isq/dimensions/angular_velocity.h index 1e50a165..dfea55d1 100644 --- a/src/include/units/physical/dimensions/angular_velocity.h +++ b/src/include/units/isq/dimensions/angular_velocity.h @@ -24,9 +24,9 @@ #include #include -#include +#include -namespace units::physical { +namespace units::isq { template A, DimensionOfT T> struct dim_angular_velocity : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_angular_velocity : derived_dimension, expone template concept AngularVelocity = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/area.h b/src/include/units/isq/dimensions/area.h similarity index 92% rename from src/include/units/physical/dimensions/area.h rename to src/include/units/isq/dimensions/area.h index 4a6356dc..c122a00a 100644 --- a/src/include/units/physical/dimensions/area.h +++ b/src/include/units/isq/dimensions/area.h @@ -23,9 +23,9 @@ #pragma once #include -#include +#include -namespace units::physical { +namespace units::isq { template L> struct dim_area : derived_dimension> {}; @@ -33,4 +33,4 @@ struct dim_area : derived_dimension> {}; template concept Area = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/capacitance.h b/src/include/units/isq/dimensions/capacitance.h similarity index 89% rename from src/include/units/physical/dimensions/capacitance.h rename to src/include/units/isq/dimensions/capacitance.h index acb96153..8a7f1c72 100644 --- a/src/include/units/physical/dimensions/capacitance.h +++ b/src/include/units/isq/dimensions/capacitance.h @@ -23,10 +23,10 @@ #pragma once #include -#include -#include +#include +#include -namespace units::physical { +namespace units::isq { template C, DimensionOfT V> struct dim_capacitance : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_capacitance : derived_dimension, exponent concept Capacitance = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/catalytic_activity.h b/src/include/units/isq/dimensions/catalytic_activity.h similarity index 90% rename from src/include/units/physical/dimensions/catalytic_activity.h rename to src/include/units/isq/dimensions/catalytic_activity.h index e7b0f19b..82b21dc1 100644 --- a/src/include/units/physical/dimensions/catalytic_activity.h +++ b/src/include/units/isq/dimensions/catalytic_activity.h @@ -22,11 +22,11 @@ #pragma once -#include +#include #include -#include +#include -namespace units::physical { +namespace units::isq { template T, DimensionOfT M> struct dim_catalytic_activity : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_catalytic_activity : derived_dimension, exp template concept CatalyticActivity = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/charge_density.h b/src/include/units/isq/dimensions/charge_density.h similarity index 91% rename from src/include/units/physical/dimensions/charge_density.h rename to src/include/units/isq/dimensions/charge_density.h index 81e1c7e5..4e2d58b5 100644 --- a/src/include/units/physical/dimensions/charge_density.h +++ b/src/include/units/isq/dimensions/charge_density.h @@ -23,10 +23,10 @@ #pragma once #include -#include -#include +#include +#include -namespace units::physical { +namespace units::isq { template Q, DimensionOfT L> struct dim_charge_density : derived_dimension, exponent> {}; @@ -40,4 +40,4 @@ concept ChargeDensity = QuantityOfT; template concept SurfaceChargeDensity = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/concentration.h b/src/include/units/isq/dimensions/concentration.h similarity index 89% rename from src/include/units/physical/dimensions/concentration.h rename to src/include/units/isq/dimensions/concentration.h index b9ec9752..f1a82a08 100644 --- a/src/include/units/physical/dimensions/concentration.h +++ b/src/include/units/isq/dimensions/concentration.h @@ -23,10 +23,10 @@ #pragma once #include -#include -#include +#include +#include -namespace units::physical { +namespace units::isq { template M, DimensionOfT L> struct dim_concentration : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_concentration : derived_dimension, exponent< template concept Concentration = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/conductance.h b/src/include/units/isq/dimensions/conductance.h similarity index 92% rename from src/include/units/physical/dimensions/conductance.h rename to src/include/units/isq/dimensions/conductance.h index f089b465..0dea42ff 100644 --- a/src/include/units/physical/dimensions/conductance.h +++ b/src/include/units/isq/dimensions/conductance.h @@ -23,9 +23,9 @@ #pragma once #include -#include +#include -namespace units::physical { +namespace units::isq { template R> struct dim_conductance : derived_dimension> {}; @@ -33,4 +33,4 @@ struct dim_conductance : derived_dimension> {}; template concept Conductance = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/current_density.h b/src/include/units/isq/dimensions/current_density.h similarity index 90% rename from src/include/units/physical/dimensions/current_density.h rename to src/include/units/isq/dimensions/current_density.h index bcad7e87..e6e1420a 100644 --- a/src/include/units/physical/dimensions/current_density.h +++ b/src/include/units/isq/dimensions/current_density.h @@ -23,10 +23,10 @@ #pragma once #include -#include -#include +#include +#include -namespace units::physical { +namespace units::isq { template I, DimensionOfT L> struct dim_current_density : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_current_density : derived_dimension, exponen template concept CurrentDensity = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/density.h b/src/include/units/isq/dimensions/density.h similarity index 90% rename from src/include/units/physical/dimensions/density.h rename to src/include/units/isq/dimensions/density.h index f7834888..3b05b5ea 100644 --- a/src/include/units/physical/dimensions/density.h +++ b/src/include/units/isq/dimensions/density.h @@ -23,10 +23,10 @@ #pragma once #include -#include -#include +#include +#include -namespace units::physical { +namespace units::isq { template M, DimensionOfT L> struct dim_density : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_density : derived_dimension, exponent template concept Density = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/dynamic_viscosity.h b/src/include/units/isq/dimensions/dynamic_viscosity.h similarity index 90% rename from src/include/units/physical/dimensions/dynamic_viscosity.h rename to src/include/units/isq/dimensions/dynamic_viscosity.h index a35cf5cc..43add26c 100644 --- a/src/include/units/physical/dimensions/dynamic_viscosity.h +++ b/src/include/units/isq/dimensions/dynamic_viscosity.h @@ -23,10 +23,10 @@ #pragma once #include -#include -#include +#include +#include -namespace units::physical { +namespace units::isq { template P, DimensionOfT T> struct dim_dynamic_viscosity : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_dynamic_viscosity : derived_dimension, expon template concept DynamicViscosity = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/electric_charge.h b/src/include/units/isq/dimensions/electric_charge.h similarity index 90% rename from src/include/units/physical/dimensions/electric_charge.h rename to src/include/units/isq/dimensions/electric_charge.h index cad8cf09..3f409c87 100644 --- a/src/include/units/physical/dimensions/electric_charge.h +++ b/src/include/units/isq/dimensions/electric_charge.h @@ -23,10 +23,10 @@ #pragma once #include -#include -#include +#include +#include -namespace units::physical { +namespace units::isq { template T, DimensionOfT C> struct dim_electric_charge : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_electric_charge : derived_dimension, exponen template concept ElectricCharge = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/electric_current.h b/src/include/units/isq/dimensions/electric_current.h similarity index 95% rename from src/include/units/physical/dimensions/electric_current.h rename to src/include/units/isq/dimensions/electric_current.h index 5540a4c5..52a3a4a1 100644 --- a/src/include/units/physical/dimensions/electric_current.h +++ b/src/include/units/isq/dimensions/electric_current.h @@ -24,7 +24,7 @@ #include -namespace units::physical { +namespace units::isq { template struct dim_electric_current : base_dimension<"I", U> {}; @@ -32,4 +32,4 @@ struct dim_electric_current : base_dimension<"I", U> {}; template concept ElectricCurrent = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/electric_field_strength.h b/src/include/units/isq/dimensions/electric_field_strength.h similarity index 90% rename from src/include/units/physical/dimensions/electric_field_strength.h rename to src/include/units/isq/dimensions/electric_field_strength.h index 7506378c..358e8203 100644 --- a/src/include/units/physical/dimensions/electric_field_strength.h +++ b/src/include/units/isq/dimensions/electric_field_strength.h @@ -23,10 +23,10 @@ #pragma once #include -#include -#include +#include +#include -namespace units::physical { +namespace units::isq { template V, DimensionOfT L> struct dim_electric_field_strength : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_electric_field_strength : derived_dimension, template concept ElectricFieldStrength = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/energy.h b/src/include/units/isq/dimensions/energy.h similarity index 90% rename from src/include/units/physical/dimensions/energy.h rename to src/include/units/isq/dimensions/energy.h index 94bbeb87..1f88bc16 100644 --- a/src/include/units/physical/dimensions/energy.h +++ b/src/include/units/isq/dimensions/energy.h @@ -23,10 +23,10 @@ #pragma once #include -#include -#include +#include +#include -namespace units::physical { +namespace units::isq { template F, DimensionOfT L> struct dim_energy : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_energy : derived_dimension, exponent> template concept Energy = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/energy_density.h b/src/include/units/isq/dimensions/energy_density.h similarity index 90% rename from src/include/units/physical/dimensions/energy_density.h rename to src/include/units/isq/dimensions/energy_density.h index 44ba8722..41fe8a12 100644 --- a/src/include/units/physical/dimensions/energy_density.h +++ b/src/include/units/isq/dimensions/energy_density.h @@ -23,10 +23,10 @@ #pragma once #include -#include -#include +#include +#include -namespace units::physical { +namespace units::isq { template E, DimensionOfT V> struct dim_energy_density : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_energy_density : derived_dimension, exponent template concept EnergyDensity = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/force.h b/src/include/units/isq/dimensions/force.h similarity index 90% rename from src/include/units/physical/dimensions/force.h rename to src/include/units/isq/dimensions/force.h index e6504c99..92fdeb56 100644 --- a/src/include/units/physical/dimensions/force.h +++ b/src/include/units/isq/dimensions/force.h @@ -22,11 +22,11 @@ #pragma once -#include +#include #include -#include +#include -namespace units::physical { +namespace units::isq { template M, DimensionOfT A> struct dim_force : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_force : derived_dimension, exponent> { template concept Force = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/frequency.h b/src/include/units/isq/dimensions/frequency.h similarity index 93% rename from src/include/units/physical/dimensions/frequency.h rename to src/include/units/isq/dimensions/frequency.h index 6c33ee10..827e72c1 100644 --- a/src/include/units/physical/dimensions/frequency.h +++ b/src/include/units/isq/dimensions/frequency.h @@ -23,9 +23,9 @@ #pragma once #include -#include +#include -namespace units::physical { +namespace units::isq { template T> struct dim_frequency : derived_dimension> {}; @@ -33,4 +33,4 @@ struct dim_frequency : derived_dimension> {}; template concept Frequency = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/heat_capacity.h b/src/include/units/isq/dimensions/heat_capacity.h similarity index 88% rename from src/include/units/physical/dimensions/heat_capacity.h rename to src/include/units/isq/dimensions/heat_capacity.h index 7d3068cb..c838491e 100644 --- a/src/include/units/physical/dimensions/heat_capacity.h +++ b/src/include/units/isq/dimensions/heat_capacity.h @@ -22,13 +22,13 @@ #pragma once -#include +#include #include -#include -#include -#include +#include +#include +#include -namespace units::physical { +namespace units::isq { template E, DimensionOfT T> struct dim_heat_capacity : derived_dimension, exponent> {}; @@ -48,4 +48,4 @@ concept SpecificHeatCapacity = QuantityOfT; template concept MolarHeatCapacity = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/inductance.h b/src/include/units/isq/dimensions/inductance.h similarity index 89% rename from src/include/units/physical/dimensions/inductance.h rename to src/include/units/isq/dimensions/inductance.h index 53a5f482..6e6ccbea 100644 --- a/src/include/units/physical/dimensions/inductance.h +++ b/src/include/units/isq/dimensions/inductance.h @@ -23,10 +23,10 @@ #pragma once #include -#include -#include +#include +#include -namespace units::physical { +namespace units::isq { template F, DimensionOfT I> struct dim_inductance : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_inductance : derived_dimension, exponent concept Inductance = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/length.h b/src/include/units/isq/dimensions/length.h similarity index 95% rename from src/include/units/physical/dimensions/length.h rename to src/include/units/isq/dimensions/length.h index 4460195d..39170399 100644 --- a/src/include/units/physical/dimensions/length.h +++ b/src/include/units/isq/dimensions/length.h @@ -24,7 +24,7 @@ #include -namespace units::physical { +namespace units::isq { template struct dim_length : base_dimension<"L", U> {}; @@ -32,4 +32,4 @@ struct dim_length : base_dimension<"L", U> {}; template concept Length = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/luminance.h b/src/include/units/isq/dimensions/luminance.h similarity index 89% rename from src/include/units/physical/dimensions/luminance.h rename to src/include/units/isq/dimensions/luminance.h index 6fa966ed..6167591a 100644 --- a/src/include/units/physical/dimensions/luminance.h +++ b/src/include/units/isq/dimensions/luminance.h @@ -23,10 +23,10 @@ #pragma once #include -#include -#include +#include +#include -namespace units::physical { +namespace units::isq { template I, DimensionOfT L> struct dim_luminance : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_luminance : derived_dimension, exponent concept Luminance = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/luminous_intensity.h b/src/include/units/isq/dimensions/luminous_intensity.h similarity index 95% rename from src/include/units/physical/dimensions/luminous_intensity.h rename to src/include/units/isq/dimensions/luminous_intensity.h index c26b10a9..fb04a3fe 100644 --- a/src/include/units/physical/dimensions/luminous_intensity.h +++ b/src/include/units/isq/dimensions/luminous_intensity.h @@ -24,7 +24,7 @@ #include -namespace units::physical { +namespace units::isq { template struct dim_luminous_intensity : base_dimension<"J", U> {}; @@ -32,4 +32,4 @@ struct dim_luminous_intensity : base_dimension<"J", U> {}; template concept LuminousIntensity = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/magnetic_flux.h b/src/include/units/isq/dimensions/magnetic_flux.h similarity index 89% rename from src/include/units/physical/dimensions/magnetic_flux.h rename to src/include/units/isq/dimensions/magnetic_flux.h index b39e29c1..2708d0d4 100644 --- a/src/include/units/physical/dimensions/magnetic_flux.h +++ b/src/include/units/isq/dimensions/magnetic_flux.h @@ -22,11 +22,11 @@ #pragma once -#include +#include #include -#include +#include -namespace units::physical { +namespace units::isq { template B, DimensionOfT A> struct dim_magnetic_flux : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_magnetic_flux : derived_dimension, exponent< template concept MagneticFlux = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/magnetic_induction.h b/src/include/units/isq/dimensions/magnetic_induction.h similarity index 88% rename from src/include/units/physical/dimensions/magnetic_induction.h rename to src/include/units/isq/dimensions/magnetic_induction.h index 579b3cd5..7bd59e41 100644 --- a/src/include/units/physical/dimensions/magnetic_induction.h +++ b/src/include/units/isq/dimensions/magnetic_induction.h @@ -23,11 +23,11 @@ #pragma once #include -#include -#include -#include +#include +#include +#include -namespace units::physical { +namespace units::isq { template V, DimensionOfT T, DimensionOfT L> struct dim_magnetic_induction : derived_dimension, exponent, exponent> {}; @@ -35,4 +35,4 @@ struct dim_magnetic_induction : derived_dimension, expo template concept MagneticInduction = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/mass.h b/src/include/units/isq/dimensions/mass.h similarity index 95% rename from src/include/units/physical/dimensions/mass.h rename to src/include/units/isq/dimensions/mass.h index d07c31eb..a2706b61 100644 --- a/src/include/units/physical/dimensions/mass.h +++ b/src/include/units/isq/dimensions/mass.h @@ -24,7 +24,7 @@ #include -namespace units::physical { +namespace units::isq { template struct dim_mass : base_dimension<"M", U> {}; @@ -32,4 +32,4 @@ struct dim_mass : base_dimension<"M", U> {}; template concept Mass = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/molar_energy.h b/src/include/units/isq/dimensions/molar_energy.h similarity index 89% rename from src/include/units/physical/dimensions/molar_energy.h rename to src/include/units/isq/dimensions/molar_energy.h index 57df33c4..b1c18e96 100644 --- a/src/include/units/physical/dimensions/molar_energy.h +++ b/src/include/units/isq/dimensions/molar_energy.h @@ -22,11 +22,11 @@ #pragma once -#include +#include #include -#include +#include -namespace units::physical { +namespace units::isq { template E, DimensionOfT M> struct dim_molar_energy : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_molar_energy : derived_dimension, exponent concept MolarEnergy = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/momentum.h b/src/include/units/isq/dimensions/momentum.h similarity index 93% rename from src/include/units/physical/dimensions/momentum.h rename to src/include/units/isq/dimensions/momentum.h index 309851df..5f3fad25 100644 --- a/src/include/units/physical/dimensions/momentum.h +++ b/src/include/units/isq/dimensions/momentum.h @@ -23,9 +23,9 @@ #pragma once #include -#include +#include -namespace units::physical { +namespace units::isq { template M, DimensionOfT V> struct dim_momentum : derived_dimension, exponent> {}; @@ -33,4 +33,4 @@ struct dim_momentum : derived_dimension, exponent template concept Momentum = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/permeability.h b/src/include/units/isq/dimensions/permeability.h similarity index 90% rename from src/include/units/physical/dimensions/permeability.h rename to src/include/units/isq/dimensions/permeability.h index af4d393d..8bd2da53 100644 --- a/src/include/units/physical/dimensions/permeability.h +++ b/src/include/units/isq/dimensions/permeability.h @@ -23,10 +23,10 @@ #pragma once #include -#include -#include +#include +#include -namespace units::physical { +namespace units::isq { template H, DimensionOfT L> struct dim_permeability : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_permeability : derived_dimension, exponent concept Permeability = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/permittivity.h b/src/include/units/isq/dimensions/permittivity.h similarity index 90% rename from src/include/units/physical/dimensions/permittivity.h rename to src/include/units/isq/dimensions/permittivity.h index e71d92bb..4d0cb155 100644 --- a/src/include/units/physical/dimensions/permittivity.h +++ b/src/include/units/isq/dimensions/permittivity.h @@ -22,11 +22,11 @@ #pragma once -#include +#include #include -#include +#include -namespace units::physical { +namespace units::isq { template C, DimensionOfT L> struct dim_permittivity : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_permittivity : derived_dimension, exponent concept Permittivity = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/power.h b/src/include/units/isq/dimensions/power.h similarity index 90% rename from src/include/units/physical/dimensions/power.h rename to src/include/units/isq/dimensions/power.h index 9b0c7ed8..9bef0f74 100644 --- a/src/include/units/physical/dimensions/power.h +++ b/src/include/units/isq/dimensions/power.h @@ -23,10 +23,10 @@ #pragma once #include -#include -#include +#include +#include -namespace units::physical { +namespace units::isq { template E, DimensionOfT T> struct dim_power : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_power : derived_dimension, exponent> template concept Power = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/pressure.h b/src/include/units/isq/dimensions/pressure.h similarity index 90% rename from src/include/units/physical/dimensions/pressure.h rename to src/include/units/isq/dimensions/pressure.h index 8fe7f9a7..6f5f8934 100644 --- a/src/include/units/physical/dimensions/pressure.h +++ b/src/include/units/isq/dimensions/pressure.h @@ -22,11 +22,11 @@ #pragma once -#include +#include #include -#include +#include -namespace units::physical { +namespace units::isq { template F, DimensionOfT A> struct dim_pressure : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_pressure : derived_dimension, exponent concept Pressure = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/radioactivity.h b/src/include/units/isq/dimensions/radioactivity.h similarity index 93% rename from src/include/units/physical/dimensions/radioactivity.h rename to src/include/units/isq/dimensions/radioactivity.h index 3caa1c3a..3457153a 100644 --- a/src/include/units/physical/dimensions/radioactivity.h +++ b/src/include/units/isq/dimensions/radioactivity.h @@ -23,9 +23,9 @@ #pragma once #include -#include +#include -namespace units::physical { +namespace units::isq { template T> struct dim_radioactivity : derived_dimension> {}; @@ -33,4 +33,4 @@ struct dim_radioactivity : derived_dimension> {}; template concept Radioactivity = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/resistance.h b/src/include/units/isq/dimensions/resistance.h similarity index 89% rename from src/include/units/physical/dimensions/resistance.h rename to src/include/units/isq/dimensions/resistance.h index e36180b0..7ec09111 100644 --- a/src/include/units/physical/dimensions/resistance.h +++ b/src/include/units/isq/dimensions/resistance.h @@ -23,10 +23,10 @@ #pragma once #include -#include -#include +#include +#include -namespace units::physical { +namespace units::isq { template V, DimensionOfT C> struct dim_resistance : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_resistance : derived_dimension, exponent concept Resistance = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/speed.h b/src/include/units/isq/dimensions/speed.h similarity index 90% rename from src/include/units/physical/dimensions/speed.h rename to src/include/units/isq/dimensions/speed.h index 2a6ba185..e226fb04 100644 --- a/src/include/units/physical/dimensions/speed.h +++ b/src/include/units/isq/dimensions/speed.h @@ -23,10 +23,10 @@ #pragma once #include -#include -#include +#include +#include -namespace units::physical { +namespace units::isq { template L, DimensionOfT T> struct dim_speed : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_speed : derived_dimension, exponent> template concept Speed = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/surface_tension.h b/src/include/units/isq/dimensions/surface_tension.h similarity index 90% rename from src/include/units/physical/dimensions/surface_tension.h rename to src/include/units/isq/dimensions/surface_tension.h index 9b1a5f22..db46257a 100644 --- a/src/include/units/physical/dimensions/surface_tension.h +++ b/src/include/units/isq/dimensions/surface_tension.h @@ -23,10 +23,10 @@ #pragma once #include -#include -#include +#include +#include -namespace units::physical { +namespace units::isq { template F, DimensionOfT L> struct dim_surface_tension : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_surface_tension : derived_dimension, exponen template concept SurfaceTension = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/thermal_conductivity.h b/src/include/units/isq/dimensions/thermal_conductivity.h similarity index 87% rename from src/include/units/physical/dimensions/thermal_conductivity.h rename to src/include/units/isq/dimensions/thermal_conductivity.h index 0123deee..b71c37af 100644 --- a/src/include/units/physical/dimensions/thermal_conductivity.h +++ b/src/include/units/isq/dimensions/thermal_conductivity.h @@ -23,11 +23,11 @@ #pragma once #include -#include -#include -#include +#include +#include +#include -namespace units::physical { +namespace units::isq { template P, DimensionOfT L, DimensionOfT T> struct dim_thermal_conductivity : derived_dimension, exponent, exponent> {}; @@ -35,4 +35,4 @@ struct dim_thermal_conductivity : derived_dimension, ex template concept ThermalConductivity = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/thermodynamic_temperature.h b/src/include/units/isq/dimensions/thermodynamic_temperature.h similarity index 95% rename from src/include/units/physical/dimensions/thermodynamic_temperature.h rename to src/include/units/isq/dimensions/thermodynamic_temperature.h index b0037682..8db16a23 100644 --- a/src/include/units/physical/dimensions/thermodynamic_temperature.h +++ b/src/include/units/isq/dimensions/thermodynamic_temperature.h @@ -24,7 +24,7 @@ #include -namespace units::physical { +namespace units::isq { template struct dim_thermodynamic_temperature : base_dimension<"Θ", U> {}; @@ -32,4 +32,4 @@ struct dim_thermodynamic_temperature : base_dimension<"Θ", U> {}; template concept ThermodynamicTemperature = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/time.h b/src/include/units/isq/dimensions/time.h similarity index 95% rename from src/include/units/physical/dimensions/time.h rename to src/include/units/isq/dimensions/time.h index 7f458983..f07b82d9 100644 --- a/src/include/units/physical/dimensions/time.h +++ b/src/include/units/isq/dimensions/time.h @@ -24,7 +24,7 @@ #include -namespace units::physical { +namespace units::isq { template struct dim_time : base_dimension<"T", U> {}; @@ -32,4 +32,4 @@ struct dim_time : base_dimension<"T", U> {}; template concept Time = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/torque.h b/src/include/units/isq/dimensions/torque.h similarity index 93% rename from src/include/units/physical/dimensions/torque.h rename to src/include/units/isq/dimensions/torque.h index 01e103e3..0109b822 100644 --- a/src/include/units/physical/dimensions/torque.h +++ b/src/include/units/isq/dimensions/torque.h @@ -24,9 +24,9 @@ #include #include -#include +#include -namespace units::physical { +namespace units::isq { template F, DimensionOfT L, DimensionOfT A> struct dim_torque : derived_dimension, exponent, exponent> {}; @@ -34,4 +34,4 @@ struct dim_torque : derived_dimension, exponent, template concept Torque = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/voltage.h b/src/include/units/isq/dimensions/voltage.h similarity index 89% rename from src/include/units/physical/dimensions/voltage.h rename to src/include/units/isq/dimensions/voltage.h index c3f99d6e..fd0ba06b 100644 --- a/src/include/units/physical/dimensions/voltage.h +++ b/src/include/units/isq/dimensions/voltage.h @@ -23,10 +23,10 @@ #pragma once #include -#include -#include +#include +#include -namespace units::physical { +namespace units::isq { template P, DimensionOfT C> struct dim_voltage : derived_dimension, exponent> {}; @@ -34,4 +34,4 @@ struct dim_voltage : derived_dimension, exponent template concept Voltage = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/dimensions/volume.h b/src/include/units/isq/dimensions/volume.h similarity index 92% rename from src/include/units/physical/dimensions/volume.h rename to src/include/units/isq/dimensions/volume.h index 62800ada..0972a00f 100644 --- a/src/include/units/physical/dimensions/volume.h +++ b/src/include/units/isq/dimensions/volume.h @@ -23,9 +23,9 @@ #pragma once #include -#include +#include -namespace units::physical { +namespace units::isq { template L> struct dim_volume : derived_dimension> {}; @@ -33,4 +33,4 @@ struct dim_volume : derived_dimension> {}; template concept Volume = QuantityOfT; -} // namespace units::physical +} // namespace units::isq diff --git a/src/include/units/physical/natural/bits/dimensions.h b/src/include/units/isq/natural/bits/dimensions.h similarity index 71% rename from src/include/units/physical/natural/bits/dimensions.h rename to src/include/units/isq/natural/bits/dimensions.h index 2067ecbf..bb9e8b45 100644 --- a/src/include/units/physical/natural/bits/dimensions.h +++ b/src/include/units/isq/natural/bits/dimensions.h @@ -22,45 +22,45 @@ #pragma once -#include -#include +#include +#include #include -namespace units::physical::natural { +namespace units::isq::natural { -struct dim_length : physical::dim_length {}; +struct dim_length : isq::dim_length {}; template U, QuantityValue Rep = double> using length = quantity; -struct dim_time : physical::dim_time {}; +struct dim_time : isq::dim_time {}; template U, QuantityValue Rep = double> using time = quantity; -struct dim_mass : physical::dim_mass {}; +struct dim_mass : isq::dim_mass {}; template U, QuantityValue Rep = double> using mass = quantity; -struct dim_speed : physical::dim_speed {}; +struct dim_speed : isq::dim_speed {}; template U, QuantityValue Rep = double> using speed = quantity; -struct dim_acceleration : physical::dim_acceleration {}; +struct dim_acceleration : isq::dim_acceleration {}; template U, QuantityValue Rep = double> using acceleration = quantity; -struct dim_force : physical::dim_force {}; +struct dim_force : isq::dim_force {}; template U, QuantityValue Rep = double> using force = quantity; -struct dim_momentum : physical::dim_momentum {}; +struct dim_momentum : isq::dim_momentum {}; template U, QuantityValue Rep = double> using momentum = quantity; -struct dim_energy : physical::dim_energy {}; +struct dim_energy : isq::dim_energy {}; template U, QuantityValue Rep = double> using energy = quantity; // Typical UDLs will not work here as the same units are reused by many quantities. // Should we define some strange ones (i.e. _q_mass_GeV)? -} // namespace units::physical::natural +} // namespace units::isq::natural diff --git a/src/include/units/physical/natural/bits/units.h b/src/include/units/isq/natural/bits/units.h similarity index 93% rename from src/include/units/physical/natural/bits/units.h rename to src/include/units/isq/natural/bits/units.h index ec42e1f0..837a0c80 100644 --- a/src/include/units/physical/natural/bits/units.h +++ b/src/include/units/isq/natural/bits/units.h @@ -23,9 +23,9 @@ #pragma once #include -#include +#include -namespace units::physical::natural { +namespace units::isq::natural { struct electronvolt : named_unit {}; struct gigaelectronvolt : prefixed_unit {}; @@ -37,4 +37,4 @@ struct square_gigaelectronvolt : named_unit +#include -namespace units::physical::natural { +namespace units::isq::natural { template inline constexpr auto speed_of_light = speed(1); -} // namespace units::physical::natural +} // namespace units::isq::natural diff --git a/src/include/units/physical/natural/natural.h b/src/include/units/isq/natural/natural.h similarity index 100% rename from src/include/units/physical/natural/natural.h rename to src/include/units/isq/natural/natural.h diff --git a/src/include/units/physical/si/absorbed_dose.h b/src/include/units/isq/si/absorbed_dose.h similarity index 97% rename from src/include/units/physical/si/absorbed_dose.h rename to src/include/units/isq/si/absorbed_dose.h index 81a07ec5..6dfcb6fe 100644 --- a/src/include/units/physical/si/absorbed_dose.h +++ b/src/include/units/isq/si/absorbed_dose.h @@ -22,12 +22,12 @@ #pragma once -#include -#include -#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct gray : named_unit {}; struct yoctogray : prefixed_unit {}; @@ -51,7 +51,7 @@ struct exagray : prefixed_unit {}; struct zettagray : prefixed_unit {}; struct yottagray : prefixed_unit {}; -struct dim_absorbed_dose : physical::dim_absorbed_dose {}; +struct dim_absorbed_dose : isq::dim_absorbed_dose {}; template U, QuantityValue Rep = double> using absorbed_dose = quantity; @@ -170,4 +170,4 @@ inline constexpr auto YGy = absorbed_dose{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/acceleration.h b/src/include/units/isq/si/acceleration.h similarity index 86% rename from src/include/units/physical/si/acceleration.h rename to src/include/units/isq/si/acceleration.h index 94934ac8..97db148d 100644 --- a/src/include/units/physical/si/acceleration.h +++ b/src/include/units/isq/si/acceleration.h @@ -22,14 +22,14 @@ #pragma once -#include -#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct metre_per_second_sq : unit {}; -struct dim_acceleration : physical::dim_acceleration {}; +struct dim_acceleration : isq::dim_acceleration {}; template U, QuantityValue Rep = double> using acceleration = quantity; @@ -42,4 +42,4 @@ constexpr auto operator"" _q_m_per_s2(long double l) { return acceleration -#include -#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct mole : named_unit {}; -struct dim_amount_of_substance : physical::dim_amount_of_substance {}; +struct dim_amount_of_substance : isq::dim_amount_of_substance {}; template U, QuantityValue Rep = double> using amount_of_substance = quantity; @@ -50,4 +50,4 @@ inline constexpr auto mol = amount_of_substance{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/angular_velocity.h b/src/include/units/isq/si/angular_velocity.h similarity index 86% rename from src/include/units/physical/si/angular_velocity.h rename to src/include/units/isq/si/angular_velocity.h index f10136c4..9d59bb85 100644 --- a/src/include/units/physical/si/angular_velocity.h +++ b/src/include/units/isq/si/angular_velocity.h @@ -22,17 +22,17 @@ #pragma once -#include +#include #include -#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct radian_per_second : named_unit {}; -struct dim_angular_velocity : physical::dim_angular_velocity, dim_time> {}; +struct dim_angular_velocity : isq::dim_angular_velocity, dim_time> {}; template U, QuantityValue Rep = double> using angular_velocity = quantity; @@ -45,4 +45,4 @@ constexpr auto operator"" _q_rad_per_s(long double l) { return angular_velocity< } // namespace literals -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/area.h b/src/include/units/isq/si/area.h similarity index 97% rename from src/include/units/physical/si/area.h rename to src/include/units/isq/si/area.h index 3907e11a..eea66da3 100644 --- a/src/include/units/physical/si/area.h +++ b/src/include/units/isq/si/area.h @@ -22,14 +22,14 @@ #pragma once -#include -#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct square_metre : unit {}; -struct dim_area : physical::dim_area {}; +struct dim_area : isq::dim_area {}; struct square_yoctometre : deduced_unit {}; struct square_zeptometre : deduced_unit {}; @@ -176,4 +176,4 @@ inline constexpr auto ha = area{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/capacitance.h b/src/include/units/isq/si/capacitance.h similarity index 96% rename from src/include/units/physical/si/capacitance.h rename to src/include/units/isq/si/capacitance.h index c057ddb5..d37b92e9 100644 --- a/src/include/units/physical/si/capacitance.h +++ b/src/include/units/isq/si/capacitance.h @@ -22,13 +22,13 @@ #pragma once -#include -#include -#include -#include +#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct farad : named_unit {}; struct yoctofarad : prefixed_unit {}; @@ -52,7 +52,7 @@ struct exafarad : prefixed_unit {}; struct zettafarad : prefixed_unit {}; struct yottafarad : prefixed_unit {}; -struct dim_capacitance : physical::dim_capacitance {}; +struct dim_capacitance : isq::dim_capacitance {}; template U, QuantityValue Rep = double> using capacitance = quantity; @@ -171,4 +171,4 @@ inline constexpr auto YF = capacitance{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/catalytic_activity.h b/src/include/units/isq/si/catalytic_activity.h similarity index 96% rename from src/include/units/physical/si/catalytic_activity.h rename to src/include/units/isq/si/catalytic_activity.h index 5887530c..ae1e0ac5 100644 --- a/src/include/units/physical/si/catalytic_activity.h +++ b/src/include/units/isq/si/catalytic_activity.h @@ -22,13 +22,13 @@ #pragma once -#include -#include -#include -#include +#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct katal : named_unit {}; struct yoctokatal : prefixed_unit {}; @@ -54,7 +54,7 @@ struct yottakatal : prefixed_unit {}; struct enzyme_unit : named_scaled_unit {}; -struct dim_catalytic_activity : physical::dim_catalytic_activity {}; +struct dim_catalytic_activity : isq::dim_catalytic_activity {}; template U, QuantityValue Rep = double> using catalytic_activity = quantity; @@ -178,5 +178,5 @@ inline constexpr auto U = catalytic_activity{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/cgs/acceleration.h b/src/include/units/isq/si/cgs/acceleration.h similarity index 86% rename from src/include/units/physical/si/cgs/acceleration.h rename to src/include/units/isq/si/cgs/acceleration.h index bd9503f7..a0e2313a 100644 --- a/src/include/units/physical/si/cgs/acceleration.h +++ b/src/include/units/isq/si/cgs/acceleration.h @@ -22,14 +22,14 @@ #pragma once -#include -#include +#include +#include #include -namespace units::physical::si::cgs { +namespace units::isq::si::cgs { struct gal : named_unit {}; -struct dim_acceleration : physical::dim_acceleration {}; +struct dim_acceleration : isq::dim_acceleration {}; template U, QuantityValue Rep = double> using acceleration = quantity; @@ -48,4 +48,4 @@ inline constexpr auto Gal = acceleration{}; } // namespace unit_constants -} // namespace units::physical::si::cgs +} // namespace units::isq::si::cgs diff --git a/src/include/units/physical/si/cgs/area.h b/src/include/units/isq/si/cgs/area.h similarity index 88% rename from src/include/units/physical/si/cgs/area.h rename to src/include/units/isq/si/cgs/area.h index 632bdcd5..39cdd645 100644 --- a/src/include/units/physical/si/cgs/area.h +++ b/src/include/units/isq/si/cgs/area.h @@ -22,15 +22,15 @@ #pragma once -#include -#include +#include +#include #include -namespace units::physical::si::cgs { +namespace units::isq::si::cgs { using si::square_centimetre; -struct dim_area : physical::dim_area {}; +struct dim_area : isq::dim_area {}; template U, QuantityValue Rep = double> using area = quantity; @@ -49,4 +49,4 @@ inline constexpr auto cm2 = area{}; } // namespace unit_constants -} // namespace units::physical::si::cgs +} // namespace units::isq::si::cgs diff --git a/src/include/units/isq/si/cgs/cgs.h b/src/include/units/isq/si/cgs/cgs.h new file mode 100644 index 00000000..2f4723f7 --- /dev/null +++ b/src/include/units/isq/si/cgs/cgs.h @@ -0,0 +1,35 @@ +// The MIT License (MIT) +// +// Copyright (c) 2018 Mateusz Pusz +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +#pragma once + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include diff --git a/src/include/units/physical/si/cgs/energy.h b/src/include/units/isq/si/cgs/energy.h similarity index 86% rename from src/include/units/physical/si/cgs/energy.h rename to src/include/units/isq/si/cgs/energy.h index 9269577f..8141a945 100644 --- a/src/include/units/physical/si/cgs/energy.h +++ b/src/include/units/isq/si/cgs/energy.h @@ -22,16 +22,16 @@ #pragma once -#include -#include -#include +#include +#include +#include #include -namespace units::physical::si::cgs { +namespace units::isq::si::cgs { struct erg : named_unit {}; -struct dim_energy : physical::dim_energy {}; +struct dim_energy : isq::dim_energy {}; template U, QuantityValue Rep = double> using energy = quantity; @@ -50,4 +50,4 @@ inline constexpr auto erg = energy{}; } // namespace unit_constants -} // namespace units::physical::si::cgs +} // namespace units::isq::si::cgs diff --git a/src/include/units/physical/si/cgs/force.h b/src/include/units/isq/si/cgs/force.h similarity index 83% rename from src/include/units/physical/si/cgs/force.h rename to src/include/units/isq/si/cgs/force.h index 32bea9d8..ac605e1f 100644 --- a/src/include/units/physical/si/cgs/force.h +++ b/src/include/units/isq/si/cgs/force.h @@ -22,17 +22,17 @@ #pragma once -#include -#include -#include -#include +#include +#include +#include +#include #include -namespace units::physical::si::cgs { +namespace units::isq::si::cgs { struct dyne : named_unit {}; -struct dim_force : physical::dim_force {}; +struct dim_force : isq::dim_force {}; template U, QuantityValue Rep = double> using force = quantity; @@ -51,4 +51,4 @@ inline constexpr auto dyn = force{}; } // namespace unit_constants -} // namespace units::physical::si::cgs +} // namespace units::isq::si::cgs diff --git a/src/include/units/physical/si/cgs/length.h b/src/include/units/isq/si/cgs/length.h similarity index 91% rename from src/include/units/physical/si/cgs/length.h rename to src/include/units/isq/si/cgs/length.h index ab06c53d..633f2867 100644 --- a/src/include/units/physical/si/cgs/length.h +++ b/src/include/units/isq/si/cgs/length.h @@ -22,14 +22,14 @@ #pragma once -#include +#include #include -namespace units::physical::si::cgs { +namespace units::isq::si::cgs { using si::centimetre; -struct dim_length : physical::dim_length {}; +struct dim_length : isq::dim_length {}; template U, QuantityValue Rep = double> using length = quantity; @@ -48,4 +48,4 @@ inline constexpr auto cm = length{}; } // namespace unit_constants -} // namespace units::physical::si::cgs +} // namespace units::isq::si::cgs diff --git a/src/include/units/physical/si/cgs/mass.h b/src/include/units/isq/si/cgs/mass.h similarity index 91% rename from src/include/units/physical/si/cgs/mass.h rename to src/include/units/isq/si/cgs/mass.h index f88b95e4..05aa2fc7 100644 --- a/src/include/units/physical/si/cgs/mass.h +++ b/src/include/units/isq/si/cgs/mass.h @@ -22,14 +22,14 @@ #pragma once -#include +#include #include -namespace units::physical::si::cgs { +namespace units::isq::si::cgs { using si::gram; -struct dim_mass : physical::dim_mass {}; +struct dim_mass : isq::dim_mass {}; template U, QuantityValue Rep = double> using mass = quantity; @@ -48,4 +48,4 @@ inline constexpr auto g = mass{}; } // namespace unit_constants -} // namespace units::physical::si::cgs +} // namespace units::isq::si::cgs diff --git a/src/include/units/physical/si/cgs/power.h b/src/include/units/isq/si/cgs/power.h similarity index 85% rename from src/include/units/physical/si/cgs/power.h rename to src/include/units/isq/si/cgs/power.h index b1838b65..2adec6e6 100644 --- a/src/include/units/physical/si/cgs/power.h +++ b/src/include/units/isq/si/cgs/power.h @@ -22,16 +22,16 @@ #pragma once -#include -#include -#include +#include +#include +#include #include -namespace units::physical::si::cgs { +namespace units::isq::si::cgs { struct erg_per_second : unit {}; -struct dim_power : physical::dim_power {}; +struct dim_power : isq::dim_power {}; template U, QuantityValue Rep = double> using power = quantity; @@ -44,4 +44,4 @@ constexpr auto operator"" _q_erg_per_s(long double l) { return power -#include -#include -#include +#include +#include +#include +#include #include -namespace units::physical::si::cgs { +namespace units::isq::si::cgs { struct barye : named_unit {}; -struct dim_pressure : physical::dim_pressure {}; +struct dim_pressure : isq::dim_pressure {}; template U, QuantityValue Rep = double> using pressure = quantity; @@ -51,4 +51,4 @@ inline constexpr auto Ba = pressure{}; } // namespace unit_constants -} // namespace units::physical::si::cgs +} // namespace units::isq::si::cgs diff --git a/src/include/units/physical/si/cgs/speed.h b/src/include/units/isq/si/cgs/speed.h similarity index 84% rename from src/include/units/physical/si/cgs/speed.h rename to src/include/units/isq/si/cgs/speed.h index 1e363bc4..89c048b4 100644 --- a/src/include/units/physical/si/cgs/speed.h +++ b/src/include/units/isq/si/cgs/speed.h @@ -22,15 +22,15 @@ #pragma once -#include -#include -#include +#include +#include +#include #include -namespace units::physical::si::cgs { +namespace units::isq::si::cgs { struct centimetre_per_second : unit {}; -struct dim_speed : physical::dim_speed {}; +struct dim_speed : isq::dim_speed {}; template U, QuantityValue Rep = double> using speed = quantity; @@ -43,4 +43,4 @@ constexpr auto operator"" _q_cm_per_s(long double l) { return speed +#include #include -namespace units::physical::si::cgs { +namespace units::isq::si::cgs { using si::second; @@ -44,4 +44,4 @@ using si::unit_constants::s; } // namespace unit_constants -} // namespace units::physical::si::cgs +} // namespace units::isq::si::cgs diff --git a/src/include/units/physical/si/charge_density.h b/src/include/units/isq/si/charge_density.h similarity index 81% rename from src/include/units/physical/si/charge_density.h rename to src/include/units/isq/si/charge_density.h index 8e9e0538..98fd5276 100644 --- a/src/include/units/physical/si/charge_density.h +++ b/src/include/units/isq/si/charge_density.h @@ -22,19 +22,19 @@ #pragma once -#include -#include -#include -#include +#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct coulomb_per_metre_cub : unit {}; struct coulomb_per_metre_sq : unit {}; -struct dim_charge_density : physical::dim_charge_density {}; -struct dim_surface_charge_density : physical::dim_surface_charge_density {}; +struct dim_charge_density : isq::dim_charge_density {}; +struct dim_surface_charge_density : isq::dim_surface_charge_density {}; template U, QuantityValue Rep = double> using charge_density = quantity; @@ -54,4 +54,4 @@ constexpr auto operator"" _q_C_per_m2(long double l) { return surface_charge_den } // namespace literals -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/concentration.h b/src/include/units/isq/si/concentration.h similarity index 83% rename from src/include/units/physical/si/concentration.h rename to src/include/units/isq/si/concentration.h index f6e27cba..70544d8f 100644 --- a/src/include/units/physical/si/concentration.h +++ b/src/include/units/isq/si/concentration.h @@ -22,15 +22,15 @@ #pragma once -#include -#include -#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct mol_per_metre_cub : unit {}; -struct dim_concentration : physical::dim_concentration {}; +struct dim_concentration : isq::dim_concentration {}; template U, QuantityValue Rep = double> using concentration = quantity; @@ -43,5 +43,5 @@ constexpr auto operator"" _q_mol_per_m3(long double l) { return concentration -#include -#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct siemens : named_unit {}; struct yoctosiemens : prefixed_unit {}; @@ -47,7 +47,7 @@ struct exasiemens : prefixed_unit {}; struct zettasiemens : prefixed_unit {}; struct yottasiemens : prefixed_unit {}; -struct dim_conductance : physical::dim_conductance {}; +struct dim_conductance : isq::dim_conductance {}; template U, QuantityValue Rep = double> using conductance = quantity; @@ -146,5 +146,5 @@ inline constexpr auto YS = conductance{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/constants.h b/src/include/units/isq/si/constants.h similarity index 85% rename from src/include/units/physical/si/constants.h rename to src/include/units/isq/si/constants.h index 1aef9240..0c8f7610 100644 --- a/src/include/units/physical/si/constants.h +++ b/src/include/units/isq/si/constants.h @@ -22,15 +22,15 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include -namespace units::physical::si::si2019 { +namespace units::isq::si::si2019 { template inline constexpr auto planck_constant = energy(6.62607015e-34) * time(1); @@ -59,4 +59,4 @@ inline constexpr auto hyperfine_structure_transition_frequency = frequency inline constexpr auto standard_gravity = acceleration(9.80665); -} // namespace units::physical::si::si2019 +} // namespace units::isq::si::si2019 diff --git a/src/include/units/physical/si/current_density.h b/src/include/units/isq/si/current_density.h similarity index 81% rename from src/include/units/physical/si/current_density.h rename to src/include/units/isq/si/current_density.h index 681977db..ff3630bc 100644 --- a/src/include/units/physical/si/current_density.h +++ b/src/include/units/isq/si/current_density.h @@ -22,17 +22,17 @@ #pragma once -#include -#include -#include -#include +#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct ampere_per_metre_sq : unit {}; -struct dim_current_density : physical::dim_current_density {}; +struct dim_current_density : isq::dim_current_density {}; template U, QuantityValue Rep = double> using current_density = quantity; @@ -45,4 +45,4 @@ constexpr auto operator"" _q_A_per_m2(long double l) { return current_density -#include -#include -#include +#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct kilogram_per_metre_cub : unit {}; -struct dim_density : physical::dim_density {}; +struct dim_density : isq::dim_density {}; template U, QuantityValue Rep = double> using density = quantity; @@ -45,4 +45,4 @@ constexpr auto operator"" _q_kg_per_m3(long double l) { return density -#include -#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct pascal_second : unit {}; -struct dim_dynamic_viscosity : physical::dim_dynamic_viscosity {}; +struct dim_dynamic_viscosity : isq::dim_dynamic_viscosity {}; template U, QuantityValue Rep = double> using dynamic_viscosity = quantity; @@ -49,5 +49,5 @@ inline constexpr auto Pa_s = dynamic_viscosity{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/electric_charge.h b/src/include/units/isq/si/electric_charge.h similarity index 84% rename from src/include/units/physical/si/electric_charge.h rename to src/include/units/isq/si/electric_charge.h index 0453f8ae..4c34f9b6 100644 --- a/src/include/units/physical/si/electric_charge.h +++ b/src/include/units/isq/si/electric_charge.h @@ -22,16 +22,16 @@ #pragma once -#include -#include -#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct coulomb : named_unit {}; -struct dim_electric_charge : physical::dim_electric_charge {}; +struct dim_electric_charge : isq::dim_electric_charge {}; template U, QuantityValue Rep = double> using electric_charge = quantity; @@ -50,4 +50,4 @@ inline constexpr auto C = electric_charge{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/electric_current.h b/src/include/units/isq/si/electric_current.h similarity index 97% rename from src/include/units/physical/si/electric_current.h rename to src/include/units/isq/si/electric_current.h index a04d0a7c..a02e6381 100644 --- a/src/include/units/physical/si/electric_current.h +++ b/src/include/units/isq/si/electric_current.h @@ -23,11 +23,11 @@ #pragma once #include -#include -#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct ampere : named_unit {}; struct yoctoampere : prefixed_unit {}; @@ -51,7 +51,7 @@ struct exaampere : prefixed_unit {}; struct zettaampere : prefixed_unit {}; struct yottaampere : prefixed_unit {}; -struct dim_electric_current : physical::dim_electric_current {}; +struct dim_electric_current : isq::dim_electric_current {}; template U, QuantityValue Rep = double> using electric_current = quantity; @@ -170,4 +170,4 @@ inline constexpr auto YA = electric_current{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/electric_field_strength.h b/src/include/units/isq/si/electric_field_strength.h similarity index 84% rename from src/include/units/physical/si/electric_field_strength.h rename to src/include/units/isq/si/electric_field_strength.h index 72e01aa9..b7155512 100644 --- a/src/include/units/physical/si/electric_field_strength.h +++ b/src/include/units/isq/si/electric_field_strength.h @@ -22,14 +22,14 @@ #pragma once -#include -#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct volt_per_metre : unit {}; -struct dim_electric_field_strength : physical::dim_electric_field_strength {}; +struct dim_electric_field_strength : isq::dim_electric_field_strength {}; template U, QuantityValue Rep = double> using electric_field_strength = quantity; @@ -42,4 +42,4 @@ constexpr auto operator"" _q_V_per_m(long double l) { return electric_field_stre } // namespace literals -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/energy.h b/src/include/units/isq/si/energy.h similarity index 97% rename from src/include/units/physical/si/energy.h rename to src/include/units/isq/si/energy.h index 3410bef4..a412d40e 100644 --- a/src/include/units/physical/si/energy.h +++ b/src/include/units/isq/si/energy.h @@ -22,12 +22,12 @@ #pragma once -#include -#include -#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct joule : named_unit {}; struct yoctojoule : prefixed_unit {}; @@ -50,7 +50,7 @@ struct yottajoule : prefixed_unit {}; struct electronvolt : named_scaled_unit {}; struct gigaelectronvolt : prefixed_unit {}; -struct dim_energy : physical::dim_energy {}; +struct dim_energy : isq::dim_energy {}; template U, QuantityValue Rep = double> using energy = quantity; @@ -159,4 +159,4 @@ inline constexpr auto GeV = energy{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/energy_density.h b/src/include/units/isq/si/energy_density.h similarity index 84% rename from src/include/units/physical/si/energy_density.h rename to src/include/units/isq/si/energy_density.h index 881acf3a..9458680f 100644 --- a/src/include/units/physical/si/energy_density.h +++ b/src/include/units/isq/si/energy_density.h @@ -22,15 +22,15 @@ #pragma once -#include -#include -#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct joule_per_metre_cub : unit {}; -struct dim_energy_density : physical::dim_energy_density {}; +struct dim_energy_density : isq::dim_energy_density {}; template U, QuantityValue Rep = double> using energy_density = quantity; @@ -43,4 +43,4 @@ constexpr auto operator"" _q_J_per_m3(long double l) { return energy_density -#include -#include -#include +#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct newton : named_unit {}; struct yoctonewton : prefixed_unit {}; @@ -52,7 +52,7 @@ struct exanewton : prefixed_unit {}; struct zettanewton : prefixed_unit {}; struct yottanewton : prefixed_unit {}; -struct dim_force : physical::dim_force {}; +struct dim_force : isq::dim_force {}; template U, QuantityValue Rep = double> using force = quantity; @@ -171,4 +171,4 @@ inline constexpr auto YN = force{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/fps/acceleration.h b/src/include/units/isq/si/fps/acceleration.h similarity index 85% rename from src/include/units/physical/si/fps/acceleration.h rename to src/include/units/isq/si/fps/acceleration.h index 1a03e622..dd0c7fc4 100644 --- a/src/include/units/physical/si/fps/acceleration.h +++ b/src/include/units/isq/si/fps/acceleration.h @@ -22,14 +22,14 @@ #pragma once -#include -#include +#include +#include #include -namespace units::physical::si::fps { +namespace units::isq::si::fps { struct foot_per_second_sq : unit {}; -struct dim_acceleration : physical::dim_acceleration {}; +struct dim_acceleration : isq::dim_acceleration {}; template U, QuantityValue Rep = double> using acceleration = quantity; @@ -42,4 +42,4 @@ constexpr auto operator"" _q_ft_per_s2(long double l) { return acceleration -#include +#include +#include #include -namespace units::physical::si::fps { +namespace units::isq::si::fps { struct square_foot : unit {}; -struct dim_area : physical::dim_area {}; +struct dim_area : isq::dim_area {}; template U, QuantityValue Rep = double> @@ -49,4 +49,4 @@ inline constexpr auto ft2 = area{}; } // namespace unit_constants -} // namespace units::physical::si::fps +} // namespace units::isq::si::fps diff --git a/src/include/units/physical/si/fps/density.h b/src/include/units/isq/si/fps/density.h similarity index 84% rename from src/include/units/physical/si/fps/density.h rename to src/include/units/isq/si/fps/density.h index dab3d912..82a1742e 100644 --- a/src/include/units/physical/si/fps/density.h +++ b/src/include/units/isq/si/fps/density.h @@ -22,16 +22,16 @@ #pragma once -#include -#include -#include +#include +#include +#include #include -namespace units::physical::si::fps { +namespace units::isq::si::fps { struct pound_per_foot_cub : unit {}; -struct dim_density : physical::dim_density {}; +struct dim_density : isq::dim_density {}; template U, QuantityValue Rep = double> using density = quantity; @@ -44,4 +44,4 @@ constexpr auto operator"" _q_lb_per_ft3(long double l) { return density -#include -#include +#include +#include +#include #include -namespace units::physical::si::fps { +namespace units::isq::si::fps { // https://en.wikipedia.org/wiki/Foot-poundal struct foot_poundal : unit {}; -struct dim_energy : physical::dim_energy {}; +struct dim_energy : isq::dim_energy {}; // https://en.wikipedia.org/wiki/Foot-pound_(energy) struct foot_pound_force : noble_deduced_unit {}; @@ -62,4 +62,4 @@ inline constexpr auto ft_lbf = energy{}; } // namespace unit_constants -} // namespace units::physical::si::fps +} // namespace units::isq::si::fps diff --git a/src/include/units/physical/si/fps/force.h b/src/include/units/isq/si/fps/force.h similarity index 89% rename from src/include/units/physical/si/fps/force.h rename to src/include/units/isq/si/fps/force.h index cc53c2fe..cf2cb87b 100644 --- a/src/include/units/physical/si/fps/force.h +++ b/src/include/units/isq/si/fps/force.h @@ -22,13 +22,13 @@ #pragma once -#include -#include -#include -#include +#include +#include +#include +#include #include -namespace units::physical::si::fps { +namespace units::isq::si::fps { // https://en.wikipedia.org/wiki/Poundal struct poundal : named_unit {}; @@ -41,7 +41,7 @@ struct kilopound_force : prefixed_unit { // https://en.wikipedia.org/wiki/Kip_(unit), struct kip : alias_unit {}; -struct dim_force : physical::dim_force {}; +struct dim_force : isq::dim_force {}; template U, QuantityValue Rep = double> using force = quantity; @@ -70,4 +70,4 @@ inline constexpr auto klbf = force{}; } // namespace unit_constants -} // namespace units::physical::si::fps +} // namespace units::isq::si::fps diff --git a/src/include/units/isq/si/fps/fps.h b/src/include/units/isq/si/fps/fps.h new file mode 100644 index 00000000..c71f5c45 --- /dev/null +++ b/src/include/units/isq/si/fps/fps.h @@ -0,0 +1,37 @@ +// The MIT License (MIT) +// +// Copyright (c) 2018 Mateusz Pusz +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +#pragma once + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include diff --git a/src/include/units/physical/si/fps/length.h b/src/include/units/isq/si/fps/length.h similarity index 96% rename from src/include/units/physical/si/fps/length.h rename to src/include/units/isq/si/fps/length.h index 311ab368..3aa57dd3 100644 --- a/src/include/units/physical/si/fps/length.h +++ b/src/include/units/isq/si/fps/length.h @@ -22,10 +22,10 @@ #pragma once -#include +#include #include -namespace units::physical::si::fps { +namespace units::isq::si::fps { // https://en.wikipedia.org/wiki/Foot_(unit) struct foot : named_scaled_unit {}; @@ -49,7 +49,7 @@ struct nautical_mile : named_scaled_unit {}; +struct dim_length : isq::dim_length {}; template U, QuantityValue Rep = double> using length = quantity; @@ -108,4 +108,4 @@ inline constexpr auto naut_mi = length{}; } // namespace unit_constants -} // namespace units::physical::si::fps +} // namespace units::isq::si::fps diff --git a/src/include/units/physical/si/fps/mass.h b/src/include/units/isq/si/fps/mass.h similarity index 96% rename from src/include/units/physical/si/fps/mass.h rename to src/include/units/isq/si/fps/mass.h index ecb405df..a2b9814e 100644 --- a/src/include/units/physical/si/fps/mass.h +++ b/src/include/units/isq/si/fps/mass.h @@ -22,15 +22,15 @@ #pragma once -#include +#include #include -namespace units::physical::si::fps { +namespace units::isq::si::fps { // https://en.wikipedia.org/wiki/Pound_(mass) struct pound : named_scaled_unit {}; -struct dim_mass : physical::dim_mass {}; +struct dim_mass : isq::dim_mass {}; template U, QuantityValue Rep = double> using mass = quantity; @@ -105,4 +105,4 @@ inline constexpr auto lton = mass{}; } // namespace unit_constants -} // namespace units::physical::si::fps +} // namespace units::isq::si::fps diff --git a/src/include/units/physical/si/fps/power.h b/src/include/units/isq/si/fps/power.h similarity index 90% rename from src/include/units/physical/si/fps/power.h rename to src/include/units/isq/si/fps/power.h index cf7ded79..3dee4ca6 100644 --- a/src/include/units/physical/si/fps/power.h +++ b/src/include/units/isq/si/fps/power.h @@ -22,16 +22,16 @@ #pragma once -#include -#include -#include +#include +#include +#include #include -namespace units::physical::si::fps { +namespace units::isq::si::fps { struct foot_poundal_per_second : unit {}; -struct dim_power : physical::dim_power {}; +struct dim_power : isq::dim_power {}; struct foot_pound_force_per_second : deduced_unit {}; @@ -62,4 +62,4 @@ inline constexpr auto hp = power{}; } // namespace unit_constants -} // namespace units::physical::si::fps +} // namespace units::isq::si::fps diff --git a/src/include/units/physical/si/fps/pressure.h b/src/include/units/isq/si/fps/pressure.h similarity index 89% rename from src/include/units/physical/si/fps/pressure.h rename to src/include/units/isq/si/fps/pressure.h index 52a3997f..d3821785 100644 --- a/src/include/units/physical/si/fps/pressure.h +++ b/src/include/units/isq/si/fps/pressure.h @@ -22,17 +22,17 @@ #pragma once -#include -#include -#include -#include +#include +#include +#include +#include #include -namespace units::physical::si::fps { +namespace units::isq::si::fps { struct poundal_per_foot_sq : unit {}; -struct dim_pressure : physical::dim_pressure {}; +struct dim_pressure : isq::dim_pressure {}; template U, QuantityValue Rep = double> using pressure = quantity; @@ -66,4 +66,4 @@ inline constexpr auto kpsi = pressure{}; } // namespace unit_constants -} // namespace units::physical::si::fps +} // namespace units::isq::si::fps diff --git a/src/include/units/physical/si/fps/speed.h b/src/include/units/isq/si/fps/speed.h similarity index 90% rename from src/include/units/physical/si/fps/speed.h rename to src/include/units/isq/si/fps/speed.h index 6763b303..d576aa0c 100644 --- a/src/include/units/physical/si/fps/speed.h +++ b/src/include/units/isq/si/fps/speed.h @@ -22,15 +22,15 @@ #pragma once -#include -#include -#include +#include +#include +#include #include -namespace units::physical::si::fps { +namespace units::isq::si::fps { struct foot_per_second : unit {}; -struct dim_speed : physical::dim_speed {}; +struct dim_speed : isq::dim_speed {}; template U, QuantityValue Rep = double> using speed = quantity; @@ -65,4 +65,4 @@ inline constexpr auto knot = speed{}; } // namespace unit_constants -} // namespace units::physical::si::fps +} // namespace units::isq::si::fps diff --git a/src/include/units/physical/si/fps/time.h b/src/include/units/isq/si/fps/time.h similarity index 92% rename from src/include/units/physical/si/fps/time.h rename to src/include/units/isq/si/fps/time.h index d156ed70..90738c4a 100644 --- a/src/include/units/physical/si/fps/time.h +++ b/src/include/units/isq/si/fps/time.h @@ -22,10 +22,10 @@ #pragma once -#include +#include #include -namespace units::physical::si::fps { +namespace units::isq::si::fps { using si::second; using si::minute; @@ -46,4 +46,4 @@ using si::unit_constants::s; } // namespace unit_constants -} // namespace units::physical::si::fps +} // namespace units::isq::si::fps diff --git a/src/include/units/physical/si/fps/volume.h b/src/include/units/isq/si/fps/volume.h similarity index 89% rename from src/include/units/physical/si/fps/volume.h rename to src/include/units/isq/si/fps/volume.h index 7b4f0396..c1d8baf3 100644 --- a/src/include/units/physical/si/fps/volume.h +++ b/src/include/units/isq/si/fps/volume.h @@ -22,14 +22,14 @@ #pragma once -#include -#include +#include +#include #include -namespace units::physical::si::fps { +namespace units::isq::si::fps { struct cubic_foot : unit {}; -struct dim_volume : physical::dim_volume {}; +struct dim_volume : isq::dim_volume {}; struct cubic_yard : deduced_unit {}; @@ -55,4 +55,4 @@ inline constexpr auto yd3 = volume{}; } // namespace unit_constants -} // namespace units::physical::si::fps +} // namespace units::isq::si::fps diff --git a/src/include/units/physical/si/frequency.h b/src/include/units/isq/si/frequency.h similarity index 97% rename from src/include/units/physical/si/frequency.h rename to src/include/units/isq/si/frequency.h index 21a8daa3..871f1eed 100644 --- a/src/include/units/physical/si/frequency.h +++ b/src/include/units/isq/si/frequency.h @@ -22,11 +22,11 @@ #pragma once -#include -#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct hertz : named_unit {}; struct yoctohertz : prefixed_unit {}; @@ -46,7 +46,7 @@ struct exahertz : prefixed_unit {}; struct zettahertz : prefixed_unit {}; struct yottahertz : prefixed_unit {}; -struct dim_frequency : physical::dim_frequency {}; +struct dim_frequency : isq::dim_frequency {}; template U, QuantityValue Rep = double> using frequency = quantity; @@ -145,4 +145,4 @@ inline constexpr auto YHz = frequency{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/heat_capacity.h b/src/include/units/isq/si/heat_capacity.h similarity index 79% rename from src/include/units/physical/si/heat_capacity.h rename to src/include/units/isq/si/heat_capacity.h index a4f2f2d2..49a1300a 100644 --- a/src/include/units/physical/si/heat_capacity.h +++ b/src/include/units/isq/si/heat_capacity.h @@ -22,22 +22,22 @@ #pragma once -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct joule_per_kelvin : unit {}; struct joule_per_kilogram_kelvin : unit {}; struct joule_per_mole_kelvin : unit {}; -struct dim_heat_capacity : physical::dim_heat_capacity {}; -struct dim_specific_heat_capacity : physical::dim_specific_heat_capacity {}; -struct dim_molar_heat_capacity : physical::dim_molar_heat_capacity {}; +struct dim_heat_capacity : isq::dim_heat_capacity {}; +struct dim_specific_heat_capacity : isq::dim_specific_heat_capacity {}; +struct dim_molar_heat_capacity : isq::dim_molar_heat_capacity {}; template U, QuantityValue Rep = double> using heat_capacity = quantity; @@ -64,5 +64,5 @@ constexpr auto operator"" _q_J_per_mol_K(long double l) { return molar_heat_capa } // namespace literals -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/iau/iau.h b/src/include/units/isq/si/iau/iau.h similarity index 96% rename from src/include/units/physical/si/iau/iau.h rename to src/include/units/isq/si/iau/iau.h index dcaf7e1d..6fc641ce 100644 --- a/src/include/units/physical/si/iau/iau.h +++ b/src/include/units/isq/si/iau/iau.h @@ -22,4 +22,4 @@ #pragma once -#include +#include diff --git a/src/include/units/physical/si/iau/length.h b/src/include/units/isq/si/iau/length.h similarity index 95% rename from src/include/units/physical/si/iau/length.h rename to src/include/units/isq/si/iau/length.h index 27e558dd..cfc6974f 100644 --- a/src/include/units/physical/si/iau/length.h +++ b/src/include/units/isq/si/iau/length.h @@ -23,9 +23,9 @@ #pragma once -#include +#include -namespace units::physical::si::iau { +namespace units::isq::si::iau { // https://en.wikipedia.org/wiki/Light-year struct light_year : named_scaled_unit {}; @@ -60,4 +60,4 @@ inline constexpr auto angstrom = si::length{}; } // namespace unit_constants -} // namespace units::physical::si::iau +} // namespace units::isq::si::iau diff --git a/src/include/units/physical/si/imperial/imperial.h b/src/include/units/isq/si/imperial/imperial.h similarity index 96% rename from src/include/units/physical/si/imperial/imperial.h rename to src/include/units/isq/si/imperial/imperial.h index ab19db50..1031971e 100644 --- a/src/include/units/physical/si/imperial/imperial.h +++ b/src/include/units/isq/si/imperial/imperial.h @@ -22,4 +22,4 @@ #pragma once -#include +#include diff --git a/src/include/units/physical/si/imperial/length.h b/src/include/units/isq/si/imperial/length.h similarity index 94% rename from src/include/units/physical/si/imperial/length.h rename to src/include/units/isq/si/imperial/length.h index e632b8f9..0697af2b 100644 --- a/src/include/units/physical/si/imperial/length.h +++ b/src/include/units/isq/si/imperial/length.h @@ -22,9 +22,9 @@ #pragma once -#include +#include -namespace units::physical::si::imperial { +namespace units::isq::si::imperial { // https://en.wikipedia.org/wiki/Chain_(unit) struct chain : named_scaled_unit {}; @@ -51,4 +51,4 @@ inline constexpr auto rd = si::length{}; } // namespace unit_constants -} // namespace units::physical::si::imperial +} // namespace units::isq::si::imperial diff --git a/src/include/units/physical/si/inductance.h b/src/include/units/isq/si/inductance.h similarity index 96% rename from src/include/units/physical/si/inductance.h rename to src/include/units/isq/si/inductance.h index 42e7460d..84af4a6f 100644 --- a/src/include/units/physical/si/inductance.h +++ b/src/include/units/isq/si/inductance.h @@ -22,12 +22,12 @@ #pragma once -#include -#include -#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct henry : named_unit {}; @@ -48,7 +48,7 @@ struct exahenry : prefixed_unit {}; struct zettahenry : prefixed_unit {}; struct yottahenry : prefixed_unit {}; -struct dim_inductance : physical::dim_inductance {}; +struct dim_inductance : isq::dim_inductance {}; template U, QuantityValue Rep = double> using inductance = quantity; @@ -147,4 +147,4 @@ inline constexpr auto YH = inductance{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/international/area.h b/src/include/units/isq/si/international/area.h similarity index 90% rename from src/include/units/physical/si/international/area.h rename to src/include/units/isq/si/international/area.h index d36b722d..90a7513b 100644 --- a/src/include/units/physical/si/international/area.h +++ b/src/include/units/isq/si/international/area.h @@ -22,10 +22,10 @@ #pragma once -#include -#include +#include +#include -namespace units::physical::si::international { +namespace units::isq::si::international { struct square_foot : deduced_unit {}; @@ -43,4 +43,4 @@ inline constexpr auto ft2 = si::area{}; } // namespace unit_constants -} // namespace units::physical::si::international +} // namespace units::isq::si::international diff --git a/src/include/units/physical/si/international/international.h b/src/include/units/isq/si/international/international.h similarity index 84% rename from src/include/units/physical/si/international/international.h rename to src/include/units/isq/si/international/international.h index 39ab95bc..4a2c1242 100644 --- a/src/include/units/physical/si/international/international.h +++ b/src/include/units/isq/si/international/international.h @@ -22,8 +22,8 @@ #pragma once -#include +#include -#include -#include -#include +#include +#include +#include diff --git a/src/include/units/physical/si/international/length.h b/src/include/units/isq/si/international/length.h similarity index 97% rename from src/include/units/physical/si/international/length.h rename to src/include/units/isq/si/international/length.h index 3d6f34b0..179278e1 100644 --- a/src/include/units/physical/si/international/length.h +++ b/src/include/units/isq/si/international/length.h @@ -23,9 +23,9 @@ #pragma once -#include +#include -namespace units::physical::si::international { +namespace units::isq::si::international { // si::international yard // https://en.wikipedia.org/wiki/International_yard_and_pound @@ -107,4 +107,4 @@ inline constexpr auto mil = si::length{}; } // namespace unit_constants -} // namespace units::physical::si::international +} // namespace units::isq::si::international diff --git a/src/include/units/physical/si/international/speed.h b/src/include/units/isq/si/international/speed.h similarity index 89% rename from src/include/units/physical/si/international/speed.h rename to src/include/units/isq/si/international/speed.h index 70cc3f62..7be951b9 100644 --- a/src/include/units/physical/si/international/speed.h +++ b/src/include/units/isq/si/international/speed.h @@ -22,10 +22,10 @@ #pragma once -#include -#include +#include +#include -namespace units::physical::si::international { +namespace units::isq::si::international { struct mile_per_hour : deduced_unit {}; @@ -37,4 +37,4 @@ constexpr auto operator"" _q_mi_per_h(long double l) { return si::speed -#include +#include +#include -namespace units::physical::si::international { +namespace units::isq::si::international { struct cubic_foot : deduced_unit {}; @@ -43,4 +43,4 @@ inline constexpr auto ft3 = si::volume{}; } // namespace unit_constants -} // namespace units::physical::si::international +} // namespace units::isq::si::international diff --git a/src/include/units/physical/si/length.h b/src/include/units/isq/si/length.h similarity index 98% rename from src/include/units/physical/si/length.h rename to src/include/units/isq/si/length.h index 781bf795..4caa491e 100644 --- a/src/include/units/physical/si/length.h +++ b/src/include/units/isq/si/length.h @@ -23,11 +23,11 @@ #pragma once #include -#include -#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct metre : named_unit {}; struct yoctometre : prefixed_unit {}; @@ -53,7 +53,7 @@ struct yottametre : prefixed_unit {}; struct astronomical_unit : named_scaled_unit {}; -struct dim_length : physical::dim_length {}; +struct dim_length : isq::dim_length {}; template U, QuantityValue Rep = double> using length = quantity; @@ -177,4 +177,4 @@ inline constexpr auto au = length{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/luminance.h b/src/include/units/isq/si/luminance.h similarity index 84% rename from src/include/units/physical/si/luminance.h rename to src/include/units/isq/si/luminance.h index d094f166..edb47115 100644 --- a/src/include/units/physical/si/luminance.h +++ b/src/include/units/isq/si/luminance.h @@ -22,15 +22,15 @@ #pragma once -#include -#include -#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct candela_per_metre_sq : unit {}; -struct dim_luminance : physical::dim_luminance {}; +struct dim_luminance : isq::dim_luminance {}; template U, QuantityValue Rep = double> using luminance = quantity; @@ -43,5 +43,5 @@ constexpr auto operator"" _q_cd_per_m2(long double l) { return luminance -#include -#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct candela : named_unit {}; struct yoctocandela : prefixed_unit {}; @@ -51,7 +51,7 @@ struct exacandela : prefixed_unit {}; struct zettacandela : prefixed_unit {}; struct yottacandela : prefixed_unit {}; -struct dim_luminous_intensity : physical::dim_luminous_intensity {}; +struct dim_luminous_intensity : isq::dim_luminous_intensity {}; template U, QuantityValue Rep = double> using luminous_intensity = quantity; @@ -170,4 +170,4 @@ inline constexpr auto Ycd = luminous_intensity{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/magnetic_flux.h b/src/include/units/isq/si/magnetic_flux.h similarity index 96% rename from src/include/units/physical/si/magnetic_flux.h rename to src/include/units/isq/si/magnetic_flux.h index 239ebfbe..db06f89c 100644 --- a/src/include/units/physical/si/magnetic_flux.h +++ b/src/include/units/isq/si/magnetic_flux.h @@ -22,12 +22,12 @@ #pragma once -#include -#include -#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct weber : named_unit {}; @@ -48,7 +48,7 @@ struct exaweber : prefixed_unit {}; struct zettaweber : prefixed_unit {}; struct yottaweber : prefixed_unit {}; -struct dim_magnetic_flux : physical::dim_magnetic_flux {}; +struct dim_magnetic_flux : isq::dim_magnetic_flux {}; template U, QuantityValue Rep = double> using magnetic_flux = quantity; @@ -147,4 +147,4 @@ inline constexpr auto YWb = magnetic_flux{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/magnetic_induction.h b/src/include/units/isq/si/magnetic_induction.h similarity index 96% rename from src/include/units/physical/si/magnetic_induction.h rename to src/include/units/isq/si/magnetic_induction.h index ead487b8..ef46d3f5 100644 --- a/src/include/units/physical/si/magnetic_induction.h +++ b/src/include/units/isq/si/magnetic_induction.h @@ -22,14 +22,14 @@ #pragma once -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct tesla : named_unit {}; @@ -52,7 +52,7 @@ struct yottatesla : prefixed_unit {}; struct gauss : named_scaled_unit {}; -struct dim_magnetic_induction : physical::dim_magnetic_induction {}; +struct dim_magnetic_induction : isq::dim_magnetic_induction {}; template U, QuantityValue Rep = double> using magnetic_induction = quantity; diff --git a/src/include/units/physical/si/mass.h b/src/include/units/isq/si/mass.h similarity index 98% rename from src/include/units/physical/si/mass.h rename to src/include/units/isq/si/mass.h index 13fd88b7..f2ce0977 100644 --- a/src/include/units/physical/si/mass.h +++ b/src/include/units/isq/si/mass.h @@ -23,11 +23,11 @@ #pragma once #include -#include -#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct gram : named_unit {}; struct yoctogram : prefixed_unit {}; @@ -75,7 +75,7 @@ struct yottatonne : prefixed_unit {}; struct dalton : named_scaled_unit {}; -struct dim_mass : physical::dim_mass {}; +struct dim_mass : isq::dim_mass {}; template U, QuantityValue Rep = double> using mass = quantity; @@ -304,4 +304,4 @@ inline constexpr auto Da = mass{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/molar_energy.h b/src/include/units/isq/si/molar_energy.h similarity index 82% rename from src/include/units/physical/si/molar_energy.h rename to src/include/units/isq/si/molar_energy.h index 4f347556..9fd7728a 100644 --- a/src/include/units/physical/si/molar_energy.h +++ b/src/include/units/isq/si/molar_energy.h @@ -22,17 +22,17 @@ #pragma once -#include -#include -#include -#include +#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct joule_per_mole : unit {}; -struct dim_molar_energy : physical::dim_molar_energy {}; +struct dim_molar_energy : isq::dim_molar_energy {}; template U, QuantityValue Rep = double> using molar_energy = quantity; @@ -45,4 +45,4 @@ constexpr auto operator"" _q_J_per_mol(long double l) { return molar_energy -#include -#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct kilogram_metre_per_second : unit {}; -struct dim_momentum : physical::dim_momentum {}; +struct dim_momentum : isq::dim_momentum {}; template U, QuantityValue Rep = double> using momentum = quantity; @@ -43,4 +43,4 @@ constexpr auto operator"" _q_kg_m_per_s(long double l) { return momentum -#include -#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct henry_per_metre : unit {}; -struct dim_permeability : physical::dim_permeability {}; +struct dim_permeability : isq::dim_permeability {}; template U, QuantityValue Rep = double> using permeability = quantity; @@ -44,5 +44,5 @@ constexpr auto operator"" _q_H_per_m(long double l) { return permeability -#include -#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct farad_per_metre : unit {}; -struct dim_permittivity : physical::dim_permittivity {}; +struct dim_permittivity : isq::dim_permittivity {}; template U, QuantityValue Rep = double> using permittivity = quantity; @@ -44,5 +44,5 @@ constexpr auto operator"" _q_F_per_m(long double l) { return permittivity -#include -#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct watt : named_unit {}; struct yoctowatt : prefixed_unit {}; @@ -47,7 +47,7 @@ struct exawatt : prefixed_unit {}; struct zettawatt : prefixed_unit {}; struct yottawatt : prefixed_unit {}; -struct dim_power : physical::dim_power {}; +struct dim_power : isq::dim_power {}; template U, QuantityValue Rep = double> using power = quantity; @@ -146,4 +146,4 @@ inline constexpr auto YW = power{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/prefixes.h b/src/include/units/isq/si/prefixes.h similarity index 97% rename from src/include/units/physical/si/prefixes.h rename to src/include/units/isq/si/prefixes.h index 8b0cacc6..a6e9cd08 100644 --- a/src/include/units/physical/si/prefixes.h +++ b/src/include/units/isq/si/prefixes.h @@ -24,7 +24,7 @@ #include -namespace units::physical::si { +namespace units::isq::si { struct prefix : prefix_family {}; @@ -51,4 +51,4 @@ struct zetta : units::prefix struct yotta : units::prefix {}; // clang-format on -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/pressure.h b/src/include/units/isq/si/pressure.h similarity index 96% rename from src/include/units/physical/si/pressure.h rename to src/include/units/isq/si/pressure.h index c16feb01..c4784edf 100644 --- a/src/include/units/physical/si/pressure.h +++ b/src/include/units/isq/si/pressure.h @@ -22,13 +22,13 @@ #pragma once -#include -#include -#include -#include +#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct pascal : named_unit {}; struct yoctopascal : prefixed_unit {}; @@ -52,7 +52,7 @@ struct exapascal : prefixed_unit {}; struct zettapascal : prefixed_unit {}; struct yottapascal : prefixed_unit {}; -struct dim_pressure : physical::dim_pressure {}; +struct dim_pressure : isq::dim_pressure {}; template U, QuantityValue Rep = double> using pressure = quantity; @@ -171,4 +171,4 @@ inline constexpr auto YPa = pressure{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/radioactivity.h b/src/include/units/isq/si/radioactivity.h similarity index 97% rename from src/include/units/physical/si/radioactivity.h rename to src/include/units/isq/si/radioactivity.h index 95c9a28d..ea2c5287 100644 --- a/src/include/units/physical/si/radioactivity.h +++ b/src/include/units/isq/si/radioactivity.h @@ -22,11 +22,11 @@ #pragma once -#include -#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct becquerel : named_unit {}; struct yoctobecquerel : prefixed_unit {}; @@ -50,7 +50,7 @@ struct exabecquerel : prefixed_unit {}; struct zettabecquerel : prefixed_unit {}; struct yottabecquerel : prefixed_unit {}; -struct dim_radioactivity : physical::dim_radioactivity {}; +struct dim_radioactivity : isq::dim_radioactivity {}; template U, QuantityValue Rep = double> using radioactivity = quantity; @@ -169,4 +169,4 @@ inline constexpr auto YBq = radioactivity{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/resistance.h b/src/include/units/isq/si/resistance.h similarity index 95% rename from src/include/units/physical/si/resistance.h rename to src/include/units/isq/si/resistance.h index 94e94446..a7b2cb11 100644 --- a/src/include/units/physical/si/resistance.h +++ b/src/include/units/isq/si/resistance.h @@ -22,13 +22,13 @@ #pragma once -#include -#include -#include -#include +#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct ohm : named_unit {}; struct yoctoohm : prefixed_unit {}; @@ -48,7 +48,7 @@ struct exaohm : prefixed_unit {}; struct zettaohm : prefixed_unit {}; struct yottaohm : prefixed_unit {}; -struct dim_resistance : physical::dim_resistance {}; +struct dim_resistance : isq::dim_resistance {}; template U, QuantityValue Rep = double> using resistance = quantity; @@ -147,4 +147,4 @@ inline constexpr auto YR = resistance{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/isq/si/si.h b/src/include/units/isq/si/si.h new file mode 100644 index 00000000..d56852a3 --- /dev/null +++ b/src/include/units/isq/si/si.h @@ -0,0 +1,74 @@ +// The MIT License (MIT) +// +// Copyright (c) 2018 Mateusz Pusz +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +// TODO Add when downcasting issue is solved (collides with pressure) +// #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +// TODO Add when downcasting issue is solved (collides with frequency) +// #include +#include +#include +#include +#include +#include +#include +#include + +#include +#include diff --git a/src/include/units/physical/si/speed.h b/src/include/units/isq/si/speed.h similarity index 88% rename from src/include/units/physical/si/speed.h rename to src/include/units/isq/si/speed.h index e34965b2..a75c8221 100644 --- a/src/include/units/physical/si/speed.h +++ b/src/include/units/isq/si/speed.h @@ -22,15 +22,15 @@ #pragma once -#include -#include -#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct metre_per_second : unit {}; -struct dim_speed : physical::dim_speed {}; +struct dim_speed : isq::dim_speed {}; struct kilometre_per_hour : deduced_unit {}; @@ -49,4 +49,4 @@ constexpr auto operator"" _q_km_per_h(long double l) { return speed -#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct newton_per_metre : unit {}; -struct dim_surface_tension : physical::dim_surface_tension {}; +struct dim_surface_tension : isq::dim_surface_tension {}; template U, QuantityValue Rep = double> using surface_tension = quantity; @@ -43,4 +43,4 @@ constexpr auto operator"" _q_N_per_m(long double l) { return surface_tension -#include -#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct watt_per_metre_kelvin : unit {}; -struct dim_thermal_conductivity : physical::dim_thermal_conductivity {}; +struct dim_thermal_conductivity : isq::dim_thermal_conductivity {}; template U, QuantityValue Rep = double> using thermal_conductivity = quantity; @@ -44,4 +44,4 @@ constexpr auto operator"" _q_W_per_m_K(long double l) { return thermal_conductiv } // namespace literals -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/thermodynamic_temperature.h b/src/include/units/isq/si/thermodynamic_temperature.h similarity index 89% rename from src/include/units/physical/si/thermodynamic_temperature.h rename to src/include/units/isq/si/thermodynamic_temperature.h index 83c90d66..a6708fb1 100644 --- a/src/include/units/physical/si/thermodynamic_temperature.h +++ b/src/include/units/isq/si/thermodynamic_temperature.h @@ -23,14 +23,14 @@ #pragma once #include -#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct kelvin : named_unit {}; -struct dim_thermodynamic_temperature : physical::dim_thermodynamic_temperature {}; +struct dim_thermodynamic_temperature : isq::dim_thermodynamic_temperature {}; template U, QuantityValue Rep = double> using thermodynamic_temperature = quantity; @@ -49,4 +49,4 @@ inline constexpr auto K = thermodynamic_temperature{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/time.h b/src/include/units/isq/si/time.h similarity index 96% rename from src/include/units/physical/si/time.h rename to src/include/units/isq/si/time.h index 9bdf871a..c7d6e552 100644 --- a/src/include/units/physical/si/time.h +++ b/src/include/units/isq/si/time.h @@ -23,11 +23,11 @@ #pragma once #include -#include -#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct second : named_unit {}; struct yoctosecond : prefixed_unit {}; @@ -42,7 +42,7 @@ struct minute : named_scaled_unit { struct hour : named_scaled_unit {}; struct day : named_scaled_unit {}; -struct dim_time : physical::dim_time {}; +struct dim_time : isq::dim_time {}; template U, QuantityValue Rep = double> using time = quantity; @@ -116,4 +116,4 @@ inline constexpr auto d = time{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/torque.h b/src/include/units/isq/si/torque.h similarity index 86% rename from src/include/units/physical/si/torque.h rename to src/include/units/isq/si/torque.h index 2bb4bf74..7728da40 100644 --- a/src/include/units/physical/si/torque.h +++ b/src/include/units/isq/si/torque.h @@ -22,17 +22,17 @@ #pragma once -#include -#include +#include +#include #include -#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct newton_metre_per_radian : unit {}; -struct dim_torque : physical::dim_torque> {}; +struct dim_torque : isq::dim_torque> {}; template U, QuantityValue Rep = double> using torque = quantity; @@ -51,4 +51,4 @@ inline constexpr auto Nm_per_rad = torque{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/typographic/length.h b/src/include/units/isq/si/typographic/length.h similarity index 96% rename from src/include/units/physical/si/typographic/length.h rename to src/include/units/isq/si/typographic/length.h index dc9eade9..b3a57cfd 100644 --- a/src/include/units/physical/si/typographic/length.h +++ b/src/include/units/isq/si/typographic/length.h @@ -23,9 +23,9 @@ #pragma once -#include +#include -namespace units::physical::si::typographic { +namespace units::isq::si::typographic { // TODO Conflicts with (https://en.wikipedia.org/wiki/Pica_(typography)), verify correctness of below conversion factors and provide hyperlinks to definitions struct pica_comp : named_scaled_unit {}; @@ -62,4 +62,4 @@ inline constexpr auto point_prn = si::length{}; } // namespace unit_constants -} // namespace units::physical::si::typographic +} // namespace units::isq::si::typographic diff --git a/src/include/units/physical/si/typographic/typographic.h b/src/include/units/isq/si/typographic/typographic.h similarity index 95% rename from src/include/units/physical/si/typographic/typographic.h rename to src/include/units/isq/si/typographic/typographic.h index 994bb64d..a5d4a789 100644 --- a/src/include/units/physical/si/typographic/typographic.h +++ b/src/include/units/isq/si/typographic/typographic.h @@ -22,4 +22,4 @@ #pragma once -#include +#include diff --git a/src/include/units/physical/si/us/length.h b/src/include/units/isq/si/us/length.h similarity index 76% rename from src/include/units/physical/si/us/length.h rename to src/include/units/isq/si/us/length.h index 0340c960..3ac5fbc4 100644 --- a/src/include/units/physical/si/us/length.h +++ b/src/include/units/isq/si/us/length.h @@ -22,9 +22,9 @@ #pragma once -#include +#include -namespace units::physical::si::us { +namespace units::isq::si::us { // https://en.wikipedia.org/wiki/Foot_(unit)#US_survey_foot // https://www.nist.gov/pml/special-publication-811/nist-guide-si-appendix-b-conversion-factors#B6 @@ -40,25 +40,25 @@ struct mile : named_scaled_unit {} inline namespace literals { // ft -constexpr auto operator"" _q_ft_us(unsigned long long l) { gsl_ExpectsAudit(std::in_range(l)); return si::length(static_cast(l)); } -constexpr auto operator"" _q_ft_us(long double l) { return si::length(l); } +constexpr auto operator"" _q_ft_us(unsigned long long l) { gsl_ExpectsAudit(std::in_range(l)); return si::length(static_cast(l)); } +constexpr auto operator"" _q_ft_us(long double l) { return si::length(l); } // fathom -constexpr auto operator"" _q_fathom_us(unsigned long long l) { gsl_ExpectsAudit(std::in_range(l)); return si::length(static_cast(l)); } -constexpr auto operator"" _q_fathom_us(long double l) { return si::length(l); } +constexpr auto operator"" _q_fathom_us(unsigned long long l) { gsl_ExpectsAudit(std::in_range(l)); return si::length(static_cast(l)); } +constexpr auto operator"" _q_fathom_us(long double l) { return si::length(l); } // mi -constexpr auto operator"" _q_mi_us(unsigned long long l) { gsl_ExpectsAudit(std::in_range(l)); return si::length(static_cast(l)); } -constexpr auto operator"" _q_mi_us(long double l) { return si::length(l); } +constexpr auto operator"" _q_mi_us(unsigned long long l) { gsl_ExpectsAudit(std::in_range(l)); return si::length(static_cast(l)); } +constexpr auto operator"" _q_mi_us(long double l) { return si::length(l); } } // namespace literals namespace unit_constants { -inline constexpr auto ft = si::length{}; -inline constexpr auto fathom = si::length{}; -inline constexpr auto mi = si::length{}; +inline constexpr auto ft = si::length{}; +inline constexpr auto fathom = si::length{}; +inline constexpr auto mi = si::length{}; } // namespace unit_constants -} // namespace units::physical::si::us +} // namespace units::isq::si::us diff --git a/src/include/units/physical/si/us/us.h b/src/include/units/isq/si/us/us.h similarity index 96% rename from src/include/units/physical/si/us/us.h rename to src/include/units/isq/si/us/us.h index fe68840b..556b5fa0 100644 --- a/src/include/units/physical/si/us/us.h +++ b/src/include/units/isq/si/us/us.h @@ -22,4 +22,4 @@ #pragma once -#include +#include diff --git a/src/include/units/physical/si/voltage.h b/src/include/units/isq/si/voltage.h similarity index 96% rename from src/include/units/physical/si/voltage.h rename to src/include/units/isq/si/voltage.h index 0f84f161..df866979 100644 --- a/src/include/units/physical/si/voltage.h +++ b/src/include/units/isq/si/voltage.h @@ -22,13 +22,13 @@ #pragma once -#include -#include -#include -#include +#include +#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct volt : named_unit {}; struct yoctovolt : prefixed_unit {}; @@ -52,7 +52,7 @@ struct exavolt : prefixed_unit {}; struct zettavolt : prefixed_unit {}; struct yottavolt : prefixed_unit {}; -struct dim_voltage : physical::dim_voltage {}; +struct dim_voltage : isq::dim_voltage {}; template U, QuantityValue Rep = double> using voltage = quantity; @@ -171,4 +171,4 @@ inline constexpr auto YV = voltage{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/physical/si/volume.h b/src/include/units/isq/si/volume.h similarity index 98% rename from src/include/units/physical/si/volume.h rename to src/include/units/isq/si/volume.h index 9c2ec171..fee448a8 100644 --- a/src/include/units/physical/si/volume.h +++ b/src/include/units/isq/si/volume.h @@ -22,14 +22,14 @@ #pragma once -#include -#include +#include +#include #include -namespace units::physical::si { +namespace units::isq::si { struct cubic_metre : unit {}; -struct dim_volume : physical::dim_volume {}; +struct dim_volume : isq::dim_volume {}; struct cubic_yoctometre : deduced_unit {}; struct cubic_zeptometre : deduced_unit {}; @@ -296,4 +296,4 @@ inline constexpr auto Yl = volume{}; } // namespace unit_constants -} // namespace units::physical::si +} // namespace units::isq::si diff --git a/src/include/units/one_rep.h b/src/include/units/one_rep.h index aba4faa1..326864e9 100644 --- a/src/include/units/one_rep.h +++ b/src/include/units/one_rep.h @@ -47,7 +47,7 @@ struct invalid_one_rep {}; * Unit constants simplify quantity creation: * * @code{.cpp} - * using namespace units::physical::si::unit_constants; + * using namespace units::isq::si::unit_constants; * * auto d = 123 * m; * auto v = 70 * km / h; diff --git a/src/include/units/physical/dimensions.h b/src/include/units/physical/dimensions.h deleted file mode 100644 index 13c53b67..00000000 --- a/src/include/units/physical/dimensions.h +++ /dev/null @@ -1,70 +0,0 @@ -// The MIT License (MIT) -// -// Copyright (c) 2018 Mateusz Pusz -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -// TODO Add when downcasting issue is solved (collides with pressure) -// #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -// TODO Add when downcasting issue is solved (collides with frequency) -// #include -#include -#include -#include -#include -#include -#include -#include -#include -#include diff --git a/src/include/units/physical/si/cgs/cgs.h b/src/include/units/physical/si/cgs/cgs.h deleted file mode 100644 index 690c2240..00000000 --- a/src/include/units/physical/si/cgs/cgs.h +++ /dev/null @@ -1,35 +0,0 @@ -// The MIT License (MIT) -// -// Copyright (c) 2018 Mateusz Pusz -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -#pragma once - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include diff --git a/src/include/units/physical/si/fps/fps.h b/src/include/units/physical/si/fps/fps.h deleted file mode 100644 index 61b9350e..00000000 --- a/src/include/units/physical/si/fps/fps.h +++ /dev/null @@ -1,37 +0,0 @@ -// The MIT License (MIT) -// -// Copyright (c) 2018 Mateusz Pusz -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -#pragma once - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include diff --git a/src/include/units/physical/si/si.h b/src/include/units/physical/si/si.h deleted file mode 100644 index d7c1e528..00000000 --- a/src/include/units/physical/si/si.h +++ /dev/null @@ -1,74 +0,0 @@ -// The MIT License (MIT) -// -// Copyright (c) 2018 Mateusz Pusz -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -#pragma once - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -// TODO Add when downcasting issue is solved (collides with pressure) -// #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -// TODO Add when downcasting issue is solved (collides with frequency) -// #include -#include -#include -#include -#include -#include -#include -#include - -#include -#include diff --git a/src/include/units/quantity_cast.h b/src/include/units/quantity_cast.h index 2ca6f254..d0c48879 100644 --- a/src/include/units/quantity_cast.h +++ b/src/include/units/quantity_cast.h @@ -107,7 +107,7 @@ struct cast_traits { * * This cast gets the target quantity type to cast to. For example: * - * auto q1 = units::quantity_cast>(1_q_ms); + * auto q1 = units::quantity_cast>(1_q_ms); * * @tparam To a target quantity type to cast to */ @@ -146,7 +146,7 @@ template R * * This cast gets only the target dimension to cast to. For example: * - * auto q1 = units::quantity_cast(200_q_Gal); + * auto q1 = units::quantity_cast(200_q_Gal); * * @tparam ToD a dimension type to use for a target quantity */ @@ -165,7 +165,7 @@ template * * This cast gets only the target unit to cast to. For example: * - * auto q1 = units::quantity_cast(1_q_ms); + * auto q1 = units::quantity_cast(1_q_ms); * * @tparam ToU a unit type to use for a target quantity */ @@ -184,7 +184,7 @@ template * * This cast gets both the target dimension and unit to cast to. For example: * - * auto q1 = units::quantity_cast(v1); + * auto q1 = units::quantity_cast(v1); * * @note This cast is especially useful when working with quantities of unknown dimensions * (@c unknown_dimension). @@ -227,9 +227,9 @@ template Rep> * This cast gets the target quantity point type to cast to or anything that works for quantity_cast. For example: * * auto q1 = units::quantity_point_cast(quantity_point{1_q_ms}); - * auto q1 = units::quantity_point_cast>(quantity_point{1_q_ms}); - * auto q1 = units::quantity_point_cast(quantity_point{200_q_Gal}); - * auto q1 = units::quantity_point_cast(quantity_point{1_q_ms}); + * auto q1 = units::quantity_point_cast>(quantity_point{1_q_ms}); + * auto q1 = units::quantity_point_cast(quantity_point{200_q_Gal}); + * auto q1 = units::quantity_point_cast(quantity_point{1_q_ms}); * auto q1 = units::quantity_point_cast(quantity_point{1_q_ms}); * * @tparam CastSpec a target quantity point type to cast to or anything that works for quantity_cast @@ -253,7 +253,7 @@ template * * This cast gets both the target dimension and unit to cast to. For example: * - * auto q1 = units::quantity_point_cast(v1); + * auto q1 = units::quantity_point_cast(v1); * * @note This cast is especially useful when working with quantity points of unknown dimensions * (@c unknown_dimension). @@ -278,9 +278,9 @@ template * * auto q1 = units::quantity_kind_cast(quantity_kind{ns::width{1 * mm}); * auto q1 = units::quantity_kind_cast(ns::width{1 * m}); - * auto q1 = units::quantity_kind_cast>(ns::width{1 * mm}); - * auto q1 = units::quantity_kind_cast(ns::rate_of_climb{200 * Gal}); - * auto q1 = units::quantity_kind_cast(ns::width{1 * mm}); + * auto q1 = units::quantity_kind_cast>(ns::width{1 * mm}); + * auto q1 = units::quantity_kind_cast(ns::rate_of_climb{200 * Gal}); + * auto q1 = units::quantity_kind_cast(ns::width{1 * mm}); * auto q1 = units::quantity_kind_cast(ns::width{1.0 * mm}); * * @tparam CastSpec a target (quantity) kind type to cast to or anything that works for quantity_cast @@ -311,7 +311,7 @@ template * * This cast gets both the target kind and unit to cast to. For example: * - * auto q1 = units::quantity_kind_cast(w); + * auto q1 = units::quantity_kind_cast(w); * * @note This cast is especially useful when working with quantity kinds of unknown kind. * @@ -337,9 +337,9 @@ template * auto q1 = units::quantity_point_kind_cast(ns::x_coordinate{1 * mm}); * auto q1 = units::quantity_point_kind_cast(ns::x_coordinate{1 * m}); * auto q1 = units::quantity_point_kind_cast(ns::x_coordinate{1 * m}); - * auto q1 = units::quantity_point_kind_cast>(ns::x_coordinate{1 * mm}); - * auto q1 = units::quantity_point_kind_cast(quantity_point_kind(ns::rate_of_climb{200 * Gal})); - * auto q1 = units::quantity_point_kind_cast(ns::x_coordinate{1 * mm}); + * auto q1 = units::quantity_point_kind_cast>(ns::x_coordinate{1 * mm}); + * auto q1 = units::quantity_point_kind_cast(quantity_point_kind(ns::rate_of_climb{200 * Gal})); + * auto q1 = units::quantity_point_kind_cast(ns::x_coordinate{1 * mm}); * auto q1 = units::quantity_point_kind_cast(ns::x_coordinate{1.0 * mm}); * * @tparam CastSpec a target (quantity) point kind type to cast to or anything that works for quantity_kind_cast @@ -367,7 +367,7 @@ template * * This cast gets both the target point kind and unit to cast to. For example: * - * auto q1 = units::quantity_point_kind_cast(x); + * auto q1 = units::quantity_point_kind_cast(x); * * @note This cast is especially useful when working with quantity point kinds of unknown point kind. * diff --git a/test/unit_test/runtime/distribution_test.cpp b/test/unit_test/runtime/distribution_test.cpp index 03c32e21..264183ae 100644 --- a/test/unit_test/runtime/distribution_test.cpp +++ b/test/unit_test/runtime/distribution_test.cpp @@ -22,11 +22,11 @@ #include #include -#include +#include #include using namespace units; -using namespace units::physical::si; +using namespace units::isq::si; TEST_CASE("uniform_int_distribution") { diff --git a/test/unit_test/runtime/fmt_test.cpp b/test/unit_test/runtime/fmt_test.cpp index ed6420e7..9fb94f2a 100644 --- a/test/unit_test/runtime/fmt_test.cpp +++ b/test/unit_test/runtime/fmt_test.cpp @@ -22,16 +22,16 @@ #include #include -#include -#include +#include +#include #include #include #include #include using namespace units; -using namespace units::physical; -using namespace units::physical::si; +using namespace units::isq; +using namespace units::isq::si; using namespace Catch::Matchers; TEST_CASE("operator<< on a quantity", "[text][ostream][fmt]") diff --git a/test/unit_test/runtime/fmt_units_test.cpp b/test/unit_test/runtime/fmt_units_test.cpp index 0afb9593..52739764 100644 --- a/test/unit_test/runtime/fmt_units_test.cpp +++ b/test/unit_test/runtime/fmt_units_test.cpp @@ -21,20 +21,20 @@ // SOFTWARE. #include "units/format.h" -#include "units/physical/si/si.h" -#include "units/physical/si/iau/iau.h" -#include "units/physical/si/imperial/imperial.h" -#include "units/physical/si/international/international.h" -#include "units/physical/si/typographic/typographic.h" -#include "units/physical/si/us/us.h" +#include "units/isq/si/si.h" +#include "units/isq/si/iau/iau.h" +#include "units/isq/si/imperial/imperial.h" +#include "units/isq/si/international/international.h" +#include "units/isq/si/typographic/typographic.h" +#include "units/isq/si/us/us.h" #include -using namespace units::physical::si; -using namespace units::physical::si::international; -using namespace units::physical::si::us; -using namespace units::physical::si::iau; -using namespace units::physical::si::imperial; -using namespace units::physical::si::typographic; +using namespace units::isq::si; +using namespace units::isq::si::international; +using namespace units::isq::si::us; +using namespace units::isq::si::iau; +using namespace units::isq::si::imperial; +using namespace units::isq::si::typographic; TEST_CASE("fmt::format on synthesized unit symbols", "[text][fmt]") { diff --git a/test/unit_test/runtime/math_test.cpp b/test/unit_test/runtime/math_test.cpp index 1fc6d777..3ac46f2a 100644 --- a/test/unit_test/runtime/math_test.cpp +++ b/test/unit_test/runtime/math_test.cpp @@ -21,12 +21,12 @@ // SOFTWARE. #include "units/math.h" -#include "units/physical/si/area.h" -#include "units/physical/si/volume.h" +#include "units/isq/si/area.h" +#include "units/isq/si/volume.h" #include using namespace units; -using namespace units::physical::si; +using namespace units::isq::si; // classical diff --git a/test/unit_test/static/cgs_test.cpp b/test/unit_test/static/cgs_test.cpp index 84f3c4e4..bdb72c28 100644 --- a/test/unit_test/static/cgs_test.cpp +++ b/test/unit_test/static/cgs_test.cpp @@ -20,22 +20,22 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace { using namespace units; -using namespace units::physical::si::cgs; +using namespace units::isq::si::cgs; /* ************** BASE DIMENSIONS **************** */ @@ -65,8 +65,8 @@ static_assert(centimetre::ratio / dimension_unit::ratio == ratio(1)) static_assert((1_q_cm * 1_q_cm).count() == 1); static_assert((1_q_cm2).count() == 1); static_assert(1_q_cm * 1_q_cm == 1_q_cm2); -static_assert(100_q_cm * 100_q_cm == area(1)); -static_assert(100_q_cm * 100_q_cm == length(1) * length(1)); +static_assert(100_q_cm * 100_q_cm == area(1)); +static_assert(100_q_cm * 100_q_cm == length(1) * length(1)); static_assert(100_q_cm2 / 10_q_cm == 10_q_cm); static_assert(detail::unit_text() == basic_symbol_text("cm²", "cm^2")); diff --git a/test/unit_test/static/chrono_test.cpp b/test/unit_test/static/chrono_test.cpp index 63418c2d..709fdbf5 100644 --- a/test/unit_test/static/chrono_test.cpp +++ b/test/unit_test/static/chrono_test.cpp @@ -22,14 +22,14 @@ #include "test_tools.h" #include -#include +#include #include namespace { using namespace units; -using namespace units::physical; -using namespace units::physical::si::literals; +using namespace units::isq; +using namespace units::isq::si::literals; using namespace std::chrono_literals; using sys_seconds = std::chrono::time_point; using sys_days = std::chrono::time_point @@ -34,7 +34,7 @@ namespace { using namespace units; -using namespace units::physical; +using namespace units::isq; // Prefix family diff --git a/test/unit_test/static/custom_rep_test_min_expl.cpp b/test/unit_test/static/custom_rep_test_min_expl.cpp index 06483dbf..f73cead8 100644 --- a/test/unit_test/static/custom_rep_test_min_expl.cpp +++ b/test/unit_test/static/custom_rep_test_min_expl.cpp @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -#include "units/physical/si/length.h" +#include "units/isq/si/length.h" #include namespace { @@ -82,7 +82,7 @@ struct std::common_type, std::intmax_t> : std::type_identity>, min_expl<>>); diff --git a/test/unit_test/static/custom_rep_test_min_impl.cpp b/test/unit_test/static/custom_rep_test_min_impl.cpp index 5d71ed65..8b9534de 100644 --- a/test/unit_test/static/custom_rep_test_min_impl.cpp +++ b/test/unit_test/static/custom_rep_test_min_impl.cpp @@ -21,7 +21,7 @@ // SOFTWARE. #include "units/math.h" -#include "units/physical/si/length.h" +#include "units/isq/si/length.h" #include #include #include @@ -60,7 +60,7 @@ struct std::common_type> : std::common_type {}; namespace { using namespace units; -using namespace units::physical::si; +using namespace units::isq::si; static_assert(QuantityValue>); static_assert(QuantityValue>); diff --git a/test/unit_test/static/custom_unit_test.cpp b/test/unit_test/static/custom_unit_test.cpp index aff34ac1..75ac3a0e 100644 --- a/test/unit_test/static/custom_unit_test.cpp +++ b/test/unit_test/static/custom_unit_test.cpp @@ -21,16 +21,16 @@ // SOFTWARE. #include "test_tools.h" -#include -#include -#include -#include +#include +#include +#include +#include #include namespace { using namespace units; -using namespace units::physical::si; +using namespace units::isq::si; // power spectral density struct sq_volt_per_hertz : unit {}; diff --git a/test/unit_test/static/dimensions_concepts_test.cpp b/test/unit_test/static/dimensions_concepts_test.cpp index 247df14e..fbde0bfe 100644 --- a/test/unit_test/static/dimensions_concepts_test.cpp +++ b/test/unit_test/static/dimensions_concepts_test.cpp @@ -21,12 +21,12 @@ // SOFTWARE. -#include +#include namespace { using namespace units; -using namespace units::physical; +using namespace units::isq; static_assert(Length>); static_assert(!Length>); diff --git a/test/unit_test/static/fps_test.cpp b/test/unit_test/static/fps_test.cpp index 5a872a89..60a994e9 100644 --- a/test/unit_test/static/fps_test.cpp +++ b/test/unit_test/static/fps_test.cpp @@ -20,22 +20,22 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace { using namespace units; -using namespace units::physical::si::fps; +using namespace units::isq::si::fps; /* ************** BASE DIMENSIONS **************** */ diff --git a/test/unit_test/static/kind_test.cpp b/test/unit_test/static/kind_test.cpp index 5821493d..a75927aa 100644 --- a/test/unit_test/static/kind_test.cpp +++ b/test/unit_test/static/kind_test.cpp @@ -23,12 +23,12 @@ #include "test_tools.h" #include "units/generic/angle.h" #include "units/kind.h" -#include "units/physical/si/length.h" -#include "units/physical/si/area.h" -#include "units/physical/si/speed.h" +#include "units/isq/si/length.h" +#include "units/isq/si/area.h" +#include "units/isq/si/speed.h" using namespace units; -using namespace physical::si; +using namespace isq::si; namespace { @@ -106,7 +106,7 @@ static_assert(!equivalent); static_assert(!equivalent); -struct width : kind {}; +struct width : kind {}; using horizontal_speed = downcast_kind; struct abscissa : point_kind {}; // program-defined base point kind diff --git a/test/unit_test/static/math_test.cpp b/test/unit_test/static/math_test.cpp index 64cd62f4..cbab7894 100644 --- a/test/unit_test/static/math_test.cpp +++ b/test/unit_test/static/math_test.cpp @@ -22,16 +22,16 @@ #include "units/math.h" #include "test_tools.h" -#include "units/physical/si/area.h" -#include "units/physical/si/volume.h" -#include "units/physical/si/international/area.h" -#include "units/physical/si/international/volume.h" +#include "units/isq/si/area.h" +#include "units/isq/si/volume.h" +#include "units/isq/si/international/area.h" +#include "units/isq/si/international/volume.h" namespace { using namespace units; -using namespace units::physical::si::literals; -using namespace units::physical::si::international::literals; +using namespace units::isq::si::literals; +using namespace units::isq::si::international::literals; static_assert(compare(2_q_m)), std::int64_t>); static_assert(compare(2_q_m)), decltype(2_q_m)>); diff --git a/test/unit_test/static/quantity_kind_test.cpp b/test/unit_test/static/quantity_kind_test.cpp index b8f96d3d..82ee37e1 100644 --- a/test/unit_test/static/quantity_kind_test.cpp +++ b/test/unit_test/static/quantity_kind_test.cpp @@ -22,11 +22,11 @@ #include "test_tools.h" #include "units/chrono.h" -#include "units/physical/si/cgs/speed.h" -#include "units/physical/si/area.h" -#include "units/physical/si/frequency.h" -#include "units/physical/si/speed.h" -#include "units/physical/si/fps/speed.h" +#include "units/isq/si/cgs/speed.h" +#include "units/isq/si/area.h" +#include "units/isq/si/frequency.h" +#include "units/isq/si/speed.h" +#include "units/isq/si/fps/speed.h" #include "units/quantity_point.h" #include "units/quantity_kind.h" #include @@ -36,7 +36,7 @@ namespace { using namespace units; -namespace si = physical::si; +namespace si = isq::si; using namespace si; using namespace unit_constants; diff --git a/test/unit_test/static/quantity_point_kind_test.cpp b/test/unit_test/static/quantity_point_kind_test.cpp index 616c51bf..4b320741 100644 --- a/test/unit_test/static/quantity_point_kind_test.cpp +++ b/test/unit_test/static/quantity_point_kind_test.cpp @@ -22,11 +22,11 @@ #include "test_tools.h" #include "units/chrono.h" -#include "units/physical/si/cgs/speed.h" -#include "units/physical/si/area.h" -#include "units/physical/si/frequency.h" -#include "units/physical/si/speed.h" -#include "units/physical/si/fps/speed.h" +#include "units/isq/si/cgs/speed.h" +#include "units/isq/si/area.h" +#include "units/isq/si/frequency.h" +#include "units/isq/si/speed.h" +#include "units/isq/si/fps/speed.h" #include "units/quantity_point.h" #include "units/quantity_point_kind.h" #include @@ -36,7 +36,7 @@ namespace { using namespace units; -namespace si = physical::si; +namespace si = isq::si; using namespace si; using namespace unit_constants; using sys_seconds = std::chrono::time_point; @@ -633,8 +633,8 @@ static_assert(invalid_cast); namespace mylib { -struct width_kind : kind {}; -struct height_kind : kind {}; +struct width_kind : kind {}; +struct height_kind : kind {}; struct abscissa_kind : point_kind {}; struct ordinate_kind : point_kind {}; diff --git a/test/unit_test/static/quantity_point_test.cpp b/test/unit_test/static/quantity_point_test.cpp index ce2f148a..a597bba9 100644 --- a/test/unit_test/static/quantity_point_test.cpp +++ b/test/unit_test/static/quantity_point_test.cpp @@ -24,16 +24,16 @@ #include "test_tools.h" #include "units/chrono.h" #include "units/math.h" -#include "units/physical/si/area.h" -#include "units/physical/si/speed.h" -#include "units/physical/si/volume.h" -#include "units/physical/si/us/length.h" +#include "units/isq/si/area.h" +#include "units/isq/si/speed.h" +#include "units/isq/si/volume.h" +#include "units/isq/si/us/length.h" #include namespace { using namespace units; -using namespace physical::si; +using namespace isq::si; using namespace unit_constants; using namespace std::chrono_literals; using sys_seconds = std::chrono::time_point; @@ -212,7 +212,7 @@ static_assert(compare); static_assert(std::equality_comparable_with); diff --git a/test/unit_test/static/quantity_test.cpp b/test/unit_test/static/quantity_test.cpp index 287429da..73b0cb80 100644 --- a/test/unit_test/static/quantity_test.cpp +++ b/test/unit_test/static/quantity_test.cpp @@ -22,12 +22,12 @@ #include "test_tools.h" #include "units/math.h" -#include "units/physical/si/cgs/speed.h" -#include "units/physical/si/area.h" -#include "units/physical/si/frequency.h" -#include "units/physical/si/speed.h" -#include "units/physical/si/volume.h" -#include "units/physical/si/fps/speed.h" +#include "units/isq/si/cgs/speed.h" +#include "units/isq/si/area.h" +#include "units/isq/si/frequency.h" +#include "units/isq/si/speed.h" +#include "units/isq/si/volume.h" +#include "units/isq/si/fps/speed.h" #include #include #include @@ -38,7 +38,7 @@ namespace { using namespace units; -namespace si = physical::si; +namespace si = isq::si; using namespace si; using namespace unit_constants; @@ -202,8 +202,8 @@ static_assert(std::constructible_from, cgs::length, fps::length>); // conversion between different dimensions not allowed -static_assert(!std::constructible_from, physical::si::time>); -static_assert(!std::convertible_to, length>); +static_assert(!std::constructible_from, isq::si::time>); +static_assert(!std::convertible_to, length>); static_assert(!std::constructible_from, speed>); static_assert(!std::convertible_to, length>); @@ -465,7 +465,7 @@ static_assert(compare, exponent>, scaled_unit, std::int64_t>>); static_assert(compare>); static_assert(compare, std::int64_t>>); -static_assert(compare>); +static_assert(compare>); static_assert(compare>, scaled_unit, std::int64_t>>); static_assert(compare, std::int64_t>>); static_assert(compare>); diff --git a/test/unit_test/static/si_cgs_test.cpp b/test/unit_test/static/si_cgs_test.cpp index 04dd2f44..f99d4b33 100644 --- a/test/unit_test/static/si_cgs_test.cpp +++ b/test/unit_test/static/si_cgs_test.cpp @@ -20,30 +20,30 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace { -using namespace units::physical; +using namespace units::isq; static_assert(units::detail::quantity_ratio> == units::ratio(1)); static_assert(units::detail::quantity_ratio> == units::ratio(1, 100)); @@ -65,7 +65,7 @@ static_assert(si::cgs::pressure(10) == si::pressure( namespace si_test { -using namespace units::physical::si::literals; +using namespace units::isq::si::literals; static_assert(si::cgs::length(100) == 1_q_m); static_assert(si::cgs::mass(1'000) == 1_q_kg); @@ -81,7 +81,7 @@ static_assert(si::cgs::pressure(10) == 1_q_Pa); namespace cgs_test { -using namespace units::physical::si::cgs::literals; +using namespace units::isq::si::cgs::literals; static_assert(100_q_cm == si::length(1)); static_assert(1'000_q_g == si::mass(1)); @@ -97,8 +97,8 @@ static_assert(10_q_Ba == si::pressure(1)); namespace both_test { -using namespace units::physical::si::literals; -using namespace units::physical::si::cgs::literals; +using namespace units::isq::si::literals; +using namespace units::isq::si::cgs::literals; // static_assert(100_q_cm == 1_q_m); // ambiguous // static_assert(1'000_q_g == 1_q_kg); // ambiguous diff --git a/test/unit_test/static/si_fps_test.cpp b/test/unit_test/static/si_fps_test.cpp index d0c2b387..b4e15570 100644 --- a/test/unit_test/static/si_fps_test.cpp +++ b/test/unit_test/static/si_fps_test.cpp @@ -20,30 +20,30 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace { -using namespace units::physical; +using namespace units::isq; static_assert(si::fps::length(1) == si::length(0.3048)); static_assert(si::fps::mass(1) == si::mass(0.45359237)); @@ -62,7 +62,7 @@ static_assert(si::fps::pressure(1) > si::pressure< namespace si_literals { -using namespace units::physical::si::literals; +using namespace units::isq::si::literals; static_assert(si::fps::length(1) == 0.3048_q_m); static_assert(si::fps::mass(1) == 0.45359237_q_kg); @@ -82,7 +82,7 @@ static_assert(si::fps::pressure(1) > 1.4881639435 namespace fps_literals { -using namespace units::physical::si::fps::literals; +using namespace units::isq::si::fps::literals; static_assert(1_q_ft == si::length(0.3048)); static_assert(1_q_lb == si::mass(0.45359237)); @@ -102,8 +102,8 @@ static_assert(1_q_pdl_per_ft2> si::pressure(1.4881639435) && namespace fps_plus_si_literals { -using namespace units::physical::si::literals; -using namespace units::physical::si::fps::literals; +using namespace units::isq::si::literals; +using namespace units::isq::si::fps::literals; // static_assert(100_q_cm == 1_q_m); // ambiguous // static_assert(1'000_q_g == 1_q_kg); // ambiguous @@ -126,7 +126,7 @@ static_assert(1_q_pdl_per_ft2> 1.4881639435_q_Pa && namespace fps_test { -using namespace units::physical::si::fps::literals; +using namespace units::isq::si::fps::literals; // addition diff --git a/test/unit_test/static/si_test.cpp b/test/unit_test/static/si_test.cpp index 4966ee36..6f313992 100644 --- a/test/unit_test/static/si_test.cpp +++ b/test/unit_test/static/si_test.cpp @@ -22,12 +22,12 @@ #include "test_tools.h" #include -#include +#include namespace { using namespace units; -using namespace units::physical::si; +using namespace units::isq::si; /* ************** BASE DIMENSIONS **************** */ diff --git a/test/unit_test/static/unit_constants.cpp b/test/unit_test/static/unit_constants.cpp index 7d4bd2f6..b940f965 100644 --- a/test/unit_test/static/unit_constants.cpp +++ b/test/unit_test/static/unit_constants.cpp @@ -21,13 +21,13 @@ // SOFTWARE. #include "units/bits/external/hacks.h" -#include "units/physical/dimensions/length.h" -#include "units/physical/dimensions/speed.h" -#include "units/physical/si/length.h" -#include "units/physical/si/mass.h" -#include "units/physical/si/time.h" -#include "units/physical/si/area.h" -#include "units/physical/si/speed.h" +#include "units/isq/dimensions/length.h" +#include "units/isq/dimensions/speed.h" +#include "units/isq/si/length.h" +#include "units/isq/si/mass.h" +#include "units/isq/si/time.h" +#include "units/isq/si/area.h" +#include "units/isq/si/speed.h" #include #include #include @@ -37,9 +37,9 @@ #endif using namespace units; -using namespace units::physical; -using namespace units::physical::si; -using namespace units::physical::si::unit_constants; +using namespace units::isq; +using namespace units::isq::si; +using namespace units::isq::si::unit_constants; static_assert(2 * m == 2_q_m); static_assert(2 * s == 2_q_s); diff --git a/test/unit_test/static/unit_test.cpp b/test/unit_test/static/unit_test.cpp index f02086a9..28823f70 100644 --- a/test/unit_test/static/unit_test.cpp +++ b/test/unit_test/static/unit_test.cpp @@ -23,12 +23,12 @@ #include "test_tools.h" #include "units/unit.h" #include "units/bits/equivalent.h" -#include "units/physical/si/prefixes.h" +#include "units/isq/si/prefixes.h" namespace { using namespace units; -using namespace units::physical; +using namespace units::isq; struct metre : named_unit {}; struct centimetre : prefixed_unit {}; diff --git a/test/unit_test/static/us_test.cpp b/test/unit_test/static/us_test.cpp index e66bb45f..07ef18a5 100644 --- a/test/unit_test/static/us_test.cpp +++ b/test/unit_test/static/us_test.cpp @@ -20,15 +20,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -#include -#include +#include +#include #include namespace { using namespace units; -using namespace units::physical::si; -using namespace units::physical::si::international; +using namespace units::isq::si; +using namespace units::isq::si::international; /* ************** BASE DIMENSIONS **************** */ diff --git a/test_package/test_package.cpp b/test_package/test_package.cpp index 997e0d45..d2120c84 100644 --- a/test_package/test_package.cpp +++ b/test_package/test_package.cpp @@ -20,13 +20,13 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -#include +#include #include #include using namespace units; -template +template constexpr auto avg_speed(Length d, Time t) { return d / t; @@ -34,6 +34,6 @@ constexpr auto avg_speed(Length d, Time t) int main() { - using namespace units::physical::si::literals; + using namespace units::isq::si::literals; std::cout << "Average speed = " << avg_speed(240._q_km, 2_q_h) << '\n'; }