unitforge 0.3.16__tar.gz → 0.3.17__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {unitforge-0.3.16 → unitforge-0.3.17}/Cargo.lock +1 -1
- {unitforge-0.3.16 → unitforge-0.3.17}/Cargo.toml +1 -1
- {unitforge-0.3.16 → unitforge-0.3.17}/PKG-INFO +1 -3
- {unitforge-0.3.16 → unitforge-0.3.17}/src/lib.rs +2 -0
- unitforge-0.3.17/src/quantities/inverse_angle.rs +26 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/inverse_distance.rs +0 -3
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/inverse_stress.rs +0 -1
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/stress.rs +0 -2
- {unitforge-0.3.16 → unitforge-0.3.17}/src/relations.rs +5 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/.gitignore +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/.gitlab-ci.yml +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/Readme.md +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/Readme_py.md +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/pyproject.toml +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/python/unitforge/__init__.py +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/scripts/generate_python_stubs.py +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/impl_macros.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/prelude.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/acceleration.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/angle.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/angular_acceleration.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/angular_velocity.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/area.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/area_of_moment.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/charge.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/compliance.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/density.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/distance.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/force.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/force_area.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/force_distance.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/force_div_distance_power_four.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/force_per_volume.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/force_stress.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/force_volume.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/inverse_area.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/mass.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/mass_div_time_squared_volume.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/mass_per_distance.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/rotational_stiffness.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/stiffness.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/strain.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/stress_squared.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/time.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/velocity.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/velocity_squared.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/voltage.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities/volume.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/quantities.template.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/small_linalg/bindings/matrix3_py.template.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/small_linalg/bindings/vector3_py.template.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/small_linalg/matrix2.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/small_linalg/matrix2x3.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/small_linalg/matrix3.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/small_linalg/matrix3x2.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/small_linalg/vector2.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/small_linalg/vector3.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/tests/quantity_unit_tests.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/src/tests/serde_tests.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/tests/matrix2.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/tests/matrix2x3.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/tests/matrix3.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/tests/matrix3x2.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/tests/ndarray_dot.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/tests/quantities.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/tests/small_linalg_interfaces.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/tests/test_quantities.py +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/tests/test_small_linalg.py +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/tests/typecheck/mypy_smoke.py +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/tests/vector2.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/tests/vector3.rs +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/unitforge_macros/Cargo.toml +0 -0
- {unitforge-0.3.16 → unitforge-0.3.17}/unitforge_macros/src/lib.rs +0 -0
|
@@ -4,7 +4,7 @@ crate-type = ["cdylib", "rlib"]
|
|
|
4
4
|
|
|
5
5
|
[package]
|
|
6
6
|
name = "unitforge"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.17"
|
|
8
8
|
edition = "2021"
|
|
9
9
|
authors = ["Dr.Q team <info@askdrq.com>", "Henrik Stromberg <henrik@askdrq.com>"]
|
|
10
10
|
description = "A library for unit and quantity consistent computations in Rust"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: unitforge
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.17
|
|
4
4
|
Classifier: Programming Language :: Python :: 3
|
|
5
5
|
Classifier: Programming Language :: Rust
|
|
6
6
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -9,9 +9,7 @@ Classifier: Topic :: Scientific/Engineering :: Physics
|
|
|
9
9
|
Requires-Dist: numpy>=2.2.0
|
|
10
10
|
Summary: A library for unit and quantity consistent computations in Rust
|
|
11
11
|
Keywords: units,quantities,simulation,physics
|
|
12
|
-
Author: Dr.Q team <info@askdrq.com>, Henrik Stromberg <henrik@askdrq.com>
|
|
13
12
|
Author-email: "Dr.Q team" <info@askdrq.com>, Henrik Stromberg <henrik@askdrq.com>
|
|
14
|
-
License: MIT
|
|
15
13
|
Requires-Python: >=3.7
|
|
16
14
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
17
15
|
Project-URL: Repository, https://gitlab.com/henrikjstromberg/unitforge
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
use crate::impl_macros::macros::*;
|
|
2
|
+
|
|
3
|
+
#[cfg_attr(feature = "strum", derive(EnumIter))]
|
|
4
|
+
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
|
5
|
+
#[derive(Copy, Clone, PartialEq, Debug, Hash, Eq)]
|
|
6
|
+
#[cfg_attr(feature = "pyo3", pyclass(eq, eq_int))]
|
|
7
|
+
pub enum InverseAngleUnit {
|
|
8
|
+
_rad,
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
impl PhysicsUnit for InverseAngleUnit {
|
|
12
|
+
fn name(&self) -> &str {
|
|
13
|
+
match &self {
|
|
14
|
+
InverseAngleUnit::_rad => "1/rad",
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
fn base_per_x(&self) -> (f64, i32) {
|
|
19
|
+
match self {
|
|
20
|
+
InverseAngleUnit::_rad => (1., 0),
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
impl_quantity!(InverseAngle, InverseAngleUnit, [InverseAngleUnit::_rad]);
|
|
26
|
+
impl_div_with_self_to_f64!(InverseAngle);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
use crate::impl_macros::macros::*;
|
|
2
|
-
use crate::quantities::*;
|
|
3
2
|
|
|
4
3
|
#[cfg_attr(feature = "strum", derive(EnumIter))]
|
|
5
4
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
|
@@ -59,5 +58,3 @@ impl_quantity!(
|
|
|
59
58
|
[InverseDistanceUnit::_mm]
|
|
60
59
|
);
|
|
61
60
|
impl_div_with_self_to_f64!(InverseDistance);
|
|
62
|
-
|
|
63
|
-
impl_mul!(InverseDistance, Distance, f64);
|
|
@@ -25,7 +25,6 @@ impl PhysicsUnit for InverseStressUnit {
|
|
|
25
25
|
|
|
26
26
|
impl_quantity!(InverseStress, InverseStressUnit, [InverseStressUnit::_Pa]);
|
|
27
27
|
impl_div_with_self_to_f64!(InverseStress);
|
|
28
|
-
impl_mul!(InverseStress, Stress, f64);
|
|
29
28
|
|
|
30
29
|
impl Div<InverseStress> for f64 {
|
|
31
30
|
type Output = Stress;
|
|
@@ -40,8 +40,6 @@ impl PhysicsUnit for StressUnit {
|
|
|
40
40
|
|
|
41
41
|
impl_quantity!(Stress, StressUnit, [StressUnit::MPa]);
|
|
42
42
|
impl_div_with_self_to_f64!(Stress);
|
|
43
|
-
impl_div!(Stress, Strain, Stress);
|
|
44
|
-
impl_mul!(Stress, Strain, Stress);
|
|
45
43
|
|
|
46
44
|
impl Div<Stress> for f64 {
|
|
47
45
|
type Output = InverseStress;
|
|
@@ -55,6 +55,11 @@ impl_mul_relation_with_other!(AngularAcceleration, Density, MassDivTimeSquaredVo
|
|
|
55
55
|
impl_mul_relation_with_other!(MassDivTimeSquaredVolume, Area, Stress);
|
|
56
56
|
impl_mul_relation_with_other!(Force, Volume, ForceVolume);
|
|
57
57
|
impl_mul_relation_with_other!(Velocity, AngularVelocity, Acceleration);
|
|
58
|
+
impl_mul!(InverseDistance, Distance, f64);
|
|
59
|
+
impl_mul!(InverseAngle, Angle, f64);
|
|
60
|
+
impl_mul!(InverseStress, Stress, f64);
|
|
61
|
+
impl_div!(Stress, Strain, Stress);
|
|
62
|
+
impl_mul!(Stress, Strain, Stress);
|
|
58
63
|
|
|
59
64
|
impl_mul_relation_with_self!(Distance, Area);
|
|
60
65
|
impl_mul_relation_with_self!(Area, AreaOfMoment);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|