summaryrefslogtreecommitdiff
path: root/c++/lbm_unit.h
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2023-07-03 14:22:20 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2023-07-03 14:22:20 +0200
commita97669c0e67b4068d8491a8993a12aacb717768e (patch)
tree5994b9cd00c19a3654474532b04c8e08ae98ef33 /c++/lbm_unit.h
parente94b82a2dbfbe03cde38375dc687b5952cdfa2c3 (diff)
c++: Building basic blocks for a setup
Diffstat (limited to 'c++/lbm_unit.h')
-rw-r--r--c++/lbm_unit.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/c++/lbm_unit.h b/c++/lbm_unit.h
new file mode 100644
index 0000000..20c6e70
--- /dev/null
+++ b/c++/lbm_unit.h
@@ -0,0 +1,31 @@
+#pragma once
+
+#include <kel/unit/unit.h>
+
+#include <string_view>
+
+namespace kel {
+namespace lbm_type {
+struct meter {
+ static constexpr std::string_view name = "meter_l";
+ static constexpr std::string_view short_name = "m_l";
+};
+
+struct second {
+ static constexpr std::string_view name = "second_l";
+ static constexpr std::string_view short_name = "s_l";
+};
+}
+
+template<typename S>
+using lbm_meter = unit<S, unit_component<lbm_type::meter, 1>>;
+
+template<typename S>
+using lbm_second = unit<S, unit_component<lbm_type::second, 1>>;
+
+template<typename S>
+using lbm_velocity = unit<S, unit_component<lbm_type::meter, 1>, unit_component<lbm_type::second, -1>>;
+
+template<typename S>
+using lbm_acceleration = unit<S, unit_component<lbm_type::meter, 1>, unit_component<lbm_type::second, -2>>;
+}