refactor: physical replaced with isq

Refers to #249
This commit is contained in:
Mateusz Pusz
2021-03-16 12:03:25 +01:00
parent f3bcdc4ad2
commit bbbb77286c
304 changed files with 1354 additions and 1354 deletions
@@ -1,7 +1,7 @@
#pragma once
#include <units/physical/si/acceleration.h>
#include <units/isq/si/acceleration.h>
namespace units{
namespace experimental{
@@ -9,7 +9,7 @@ namespace experimental{
namespace acceleration {
template<typename Rep = double>
using m_per_s2 = units::physical::si::acceleration<units::physical::si::metre_per_second_sq, Rep>;
using m_per_s2 = units::isq::si::acceleration<units::isq::si::metre_per_second_sq, Rep>;
template<typename Rep = double>
constexpr m_per_s2<Rep> g{static_cast<Rep>(9.80665)};
+3 -3
View File
@@ -1,14 +1,14 @@
#pragma once
#include <units/physical/si/area.h>
#include <units/isq/si/area.h>
namespace area {
template<typename Rep = double>
using m2 = units::physical::si::area<units::physical::si::square_metre, Rep>;
using m2 = units::isq::si::area<units::isq::si::square_metre, Rep>;
template<typename Rep = double>
using fm2 = units::physical::si::area<units::physical::si::square_femtometre, Rep>;
using fm2 = units::isq::si::area<units::isq::si::square_femtometre, Rep>;
} // namespace area
@@ -53,7 +53,7 @@ struct Box {
#include <iostream>
using namespace units::physical::si::literals;
using namespace units::isq::si::literals;
int main()
{
@@ -20,16 +20,16 @@
physical_quantities
*/
#include <units/physical/si/capacitance.h>
#include <units/physical/si/resistance.h>
#include <units/physical/si/time.h>
#include <units/isq/si/capacitance.h>
#include <units/isq/si/resistance.h>
#include <units/isq/si/time.h>
#include <units/math.h>
#include <units/quantity_io.h>
#include "./voltage.h"
#include <iostream>
using namespace units::experimental;
using namespace units::physical::si::literals;
using namespace units::isq::si::literals;
int main()
{
@@ -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()
@@ -41,7 +41,7 @@ inline constexpr std::common_type_t<typename Target::rep, typename Source::rep>
} // namespace
using namespace units::physical::si::literals;
using namespace units::isq::si::literals;
using namespace units::experimental;
int main()
+2 -2
View File
@@ -2,7 +2,7 @@
#pragma once
#include <units/physical/si/density.h>
#include <units/isq/si/density.h>
namespace units{
namespace experimental{
@@ -10,7 +10,7 @@ namespace experimental{
namespace density {
template<typename Rep = double>
using kg_per_m3 = units::physical::si::density<units::physical::si::kilogram_per_metre_cub, Rep>;
using kg_per_m3 = units::isq::si::density<units::isq::si::kilogram_per_metre_cub, Rep>;
}
+2 -2
View File
@@ -1,7 +1,7 @@
#pragma once
#include <units/physical/si/force.h>
#include <units/isq/si/force.h>
namespace units{
namespace experimental{
@@ -9,7 +9,7 @@ namespace experimental{
namespace force {
template<typename Rep = double>
using N = units::physical::si::force<units::physical::si::newton, Rep>;
using N = units::isq::si::force<units::isq::si::newton, Rep>;
}
+28 -28
View File
@@ -2,12 +2,12 @@
#pragma once
#include <units/physical/si/length.h>
#include <units/physical/si/imperial/length.h>
#include <units/physical/si/international/length.h>
#include <units/physical/si/typographic/length.h>
#include <units/physical/si/us/length.h>
#include <units/physical/si/iau/length.h>
#include <units/isq/si/length.h>
#include <units/isq/si/imperial/length.h>
#include <units/isq/si/international/length.h>
#include <units/isq/si/typographic/length.h>
#include <units/isq/si/us/length.h>
#include <units/isq/si/iau/length.h>
namespace units{
namespace experimental{
@@ -15,70 +15,70 @@ namespace experimental{
namespace length {
template<typename Rep = double>
using m = units::physical::si::length<units::physical::si::metre, Rep>;
using m = units::isq::si::length<units::isq::si::metre, Rep>;
template<typename Rep = double>
using mm = units::physical::si::length<units::physical::si::millimetre, Rep>;
using mm = units::isq::si::length<units::isq::si::millimetre, Rep>;
template<typename Rep = double>
using fm = units::physical::si::length<units::physical::si::femtometre, Rep>;
using fm = units::isq::si::length<units::isq::si::femtometre, Rep>;
template<typename Rep = double>
using km = units::physical::si::length<units::physical::si::kilometre, Rep>;
using km = units::isq::si::length<units::isq::si::kilometre, Rep>;
template<typename Rep = double>
using AU = units::physical::si::length<units::physical::si::astronomical_unit, Rep>;
using AU = units::isq::si::length<units::isq::si::astronomical_unit, Rep>;
template<typename Rep = double>
using in = units::physical::si::length<units::physical::si::international::inch, Rep>;
using in = units::isq::si::length<units::isq::si::international::inch, Rep>;
template<typename Rep = double>
using angstrom = units::physical::si::length<units::physical::si::iau::angstrom, Rep>;
using angstrom = units::isq::si::length<units::isq::si::iau::angstrom, Rep>;
template<typename Rep = double>
using ch = units::physical::si::length<units::physical::si::imperial::chain, Rep>;
using ch = units::isq::si::length<units::isq::si::imperial::chain, Rep>;
template<typename Rep = double>
using fathom = units::physical::si::length<units::physical::si::international::fathom, Rep>;
using fathom = units::isq::si::length<units::isq::si::international::fathom, Rep>;
template<typename Rep = double>
using fathom_us = units::physical::si::length<units::physical::si::us::fathom, Rep>;
using fathom_us = units::isq::si::length<units::isq::si::us::fathom, Rep>;
template<typename Rep = double>
using ft = units::physical::si::length<units::physical::si::international::foot, Rep>;
using ft = units::isq::si::length<units::isq::si::international::foot, Rep>;
template<typename Rep = double>
using ft_us = units::physical::si::length<units::physical::si::us::foot, Rep>;
using ft_us = units::isq::si::length<units::isq::si::us::foot, Rep>;
template<typename Rep = double>
using ly = units::physical::si::length<units::physical::si::iau::light_year, Rep>;
using ly = units::isq::si::length<units::isq::si::iau::light_year, Rep>;
template<typename Rep = double>
using mi = units::physical::si::length<units::physical::si::international::mile, Rep>;
using mi = units::isq::si::length<units::isq::si::international::mile, Rep>;
template<typename Rep = double>
using mi_naut = units::physical::si::length<units::physical::si::international::nautical_mile, Rep>;
using mi_naut = units::isq::si::length<units::isq::si::international::nautical_mile, Rep>;
template<typename Rep = double>
using pc = units::physical::si::length<units::physical::si::iau::parsec, Rep>;
using pc = units::isq::si::length<units::isq::si::iau::parsec, Rep>;
template<typename Rep = double>
using pica_comp = units::physical::si::length<units::physical::si::typographic::pica_comp, Rep>;
using pica_comp = units::isq::si::length<units::isq::si::typographic::pica_comp, Rep>;
template<typename Rep = double>
using pica_prn = units::physical::si::length<units::physical::si::typographic::pica_prn, Rep>;
using pica_prn = units::isq::si::length<units::isq::si::typographic::pica_prn, Rep>;
template<typename Rep = double>
using point_comp = units::physical::si::length<units::physical::si::typographic::point_comp, Rep>;
using point_comp = units::isq::si::length<units::isq::si::typographic::point_comp, Rep>;
template<typename Rep = double>
using point_prn = units::physical::si::length<units::physical::si::typographic::point_prn, Rep>;
using point_prn = units::isq::si::length<units::isq::si::typographic::point_prn, Rep>;
template<typename Rep = double>
using rd = units::physical::si::length<units::physical::si::imperial::rod, Rep>;
using rd = units::isq::si::length<units::isq::si::imperial::rod, Rep>;
template<typename Rep = double>
using yd = units::physical::si::length<units::physical::si::international::yard, Rep>;
using yd = units::isq::si::length<units::isq::si::international::yard, Rep>;
} // namespace length
+2 -2
View File
@@ -2,7 +2,7 @@
#pragma once
#include <units/physical/si/mass.h>
#include <units/isq/si/mass.h>
namespace units{
namespace experimental{
@@ -10,7 +10,7 @@ namespace experimental{
namespace mass {
template<typename Rep = double>
using kg = units::physical::si::mass<units::physical::si::kilogram, Rep>;
using kg = units::isq::si::mass<units::isq::si::kilogram, Rep>;
}
+5 -5
View File
@@ -1,21 +1,21 @@
#pragma once
#include <units/physical/si/time.h>
#include <units/isq/si/time.h>
// named qtime due to conflict with time_t time(time_t*)
namespace q_time {
template<typename Rep = double>
using s = units::physical::si::time<units::physical::si::second, Rep>;
using s = units::isq::si::time<units::isq::si::second, Rep>;
template<typename Rep = double>
using ms = units::physical::si::time<units::physical::si::millisecond, Rep>;
using ms = units::isq::si::time<units::isq::si::millisecond, Rep>;
template<typename Rep = double>
using min = units::physical::si::time<units::physical::si::minute, Rep>;
using min = units::isq::si::time<units::isq::si::minute, Rep>;
template<typename Rep = double>
using h = units::physical::si::time<units::physical::si::hour, Rep>;
using h = units::isq::si::time<units::isq::si::hour, Rep>;
} // namespace time
+1 -1
View File
@@ -8,7 +8,7 @@
*/
using namespace units::experimental;
using namespace units::physical::si::literals;
using namespace units::isq::si::literals;
int main()
{
+1 -1
View File
@@ -1,6 +1,6 @@
#pragma once
#include <units/physical/si/prefixes.h>
#include <units/isq/si/prefixes.h>
#include <units/quantity.h>
// get at the units text of the quantity, without its numeric value
inline auto constexpr units_str(const units::Quantity auto& q)
+6 -6
View File
@@ -2,7 +2,7 @@
#pragma once
#include <units/physical/si/voltage.h>
#include <units/isq/si/voltage.h>
namespace units{
namespace experimental{
@@ -10,19 +10,19 @@ namespace experimental{
namespace voltage {
template<typename Rep = double>
using V = units::physical::si::voltage<units::physical::si::volt, Rep>;
using V = units::isq::si::voltage<units::isq::si::volt, Rep>;
template<typename Rep = double>
using mV = units::physical::si::voltage<units::physical::si::millivolt, Rep>;
using mV = units::isq::si::voltage<units::isq::si::millivolt, Rep>;
template<typename Rep = double>
using uV = units::physical::si::voltage<units::physical::si::microvolt, Rep>;
using uV = units::isq::si::voltage<units::isq::si::microvolt, Rep>;
template<typename Rep = double>
using nV = units::physical::si::voltage<units::physical::si::nanovolt, Rep>;
using nV = units::isq::si::voltage<units::isq::si::nanovolt, Rep>;
template<typename Rep = double>
using pV = units::physical::si::voltage<units::physical::si::picovolt, Rep>;
using pV = units::isq::si::voltage<units::isq::si::picovolt, Rep>;
} // namespace voltage
+2 -2
View File
@@ -2,7 +2,7 @@
#pragma once
#include <units/physical/si/volume.h>
#include <units/isq/si/volume.h>
namespace units{
namespace experimental{
@@ -10,7 +10,7 @@ namespace experimental{
namespace volume {
template<typename Rep = double>
using m3 = units::physical::si::volume<units::physical::si::cubic_metre, Rep>;
using m3 = units::isq::si::volume<units::isq::si::cubic_metre, Rep>;
}