vcti-derived 1.0.0__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.
Files changed (31) hide show
  1. vcti_derived-1.0.0/LICENSE +8 -0
  2. vcti_derived-1.0.0/PKG-INFO +105 -0
  3. vcti_derived-1.0.0/README.md +80 -0
  4. vcti_derived-1.0.0/pyproject.toml +68 -0
  5. vcti_derived-1.0.0/setup.cfg +4 -0
  6. vcti_derived-1.0.0/src/vcti/derived/__init__.py +34 -0
  7. vcti_derived-1.0.0/src/vcti/derived/catalog.py +649 -0
  8. vcti_derived-1.0.0/src/vcti/derived/dof6.py +100 -0
  9. vcti_derived-1.0.0/src/vcti/derived/families.py +81 -0
  10. vcti_derived-1.0.0/src/vcti/derived/masking.py +95 -0
  11. vcti_derived-1.0.0/src/vcti/derived/order.py +141 -0
  12. vcti_derived-1.0.0/src/vcti/derived/py.typed +0 -0
  13. vcti_derived-1.0.0/src/vcti/derived/ranges.py +29 -0
  14. vcti_derived-1.0.0/src/vcti/derived/scalar.py +66 -0
  15. vcti_derived-1.0.0/src/vcti/derived/symtensor.py +348 -0
  16. vcti_derived-1.0.0/src/vcti/derived/vector.py +56 -0
  17. vcti_derived-1.0.0/src/vcti_derived.egg-info/PKG-INFO +105 -0
  18. vcti_derived-1.0.0/src/vcti_derived.egg-info/SOURCES.txt +29 -0
  19. vcti_derived-1.0.0/src/vcti_derived.egg-info/dependency_links.txt +1 -0
  20. vcti_derived-1.0.0/src/vcti_derived.egg-info/requires.txt +11 -0
  21. vcti_derived-1.0.0/src/vcti_derived.egg-info/top_level.txt +1 -0
  22. vcti_derived-1.0.0/tests/test_catalog.py +157 -0
  23. vcti_derived-1.0.0/tests/test_dof6.py +66 -0
  24. vcti_derived-1.0.0/tests/test_families.py +64 -0
  25. vcti_derived-1.0.0/tests/test_masking.py +167 -0
  26. vcti_derived-1.0.0/tests/test_order.py +100 -0
  27. vcti_derived-1.0.0/tests/test_ranges.py +31 -0
  28. vcti_derived-1.0.0/tests/test_scalar.py +51 -0
  29. vcti_derived-1.0.0/tests/test_symtensor.py +304 -0
  30. vcti_derived-1.0.0/tests/test_vector.py +49 -0
  31. vcti_derived-1.0.0/tests/test_version.py +15 -0
@@ -0,0 +1,8 @@
1
+ Copyright (c) 2018-2026 Visual Collaboration Technologies Inc.
2
+ All Rights Reserved.
3
+
4
+ This software is proprietary and confidential. Unauthorized copying,
5
+ distribution, or use of this software, via any medium, is strictly
6
+ prohibited. Access is granted only to authorized VCollab developers
7
+ and individuals explicitly authorized by Visual Collaboration
8
+ Technologies Inc.
@@ -0,0 +1,105 @@
1
+ Metadata-Version: 2.4
2
+ Name: vcti-derived
3
+ Version: 1.0.0
4
+ Summary: An extensible, catalog-driven library for computing derived fields from multi-component engineering data arrays
5
+ Author: Visual Collaboration Technologies Inc.
6
+ License-Expression: LicenseRef-Proprietary
7
+ Project-URL: Repository, https://github.com/vcollab/vcti-python-derived
8
+ Project-URL: Changelog, https://github.com/vcollab/vcti-python-derived/blob/main/CHANGELOG.md
9
+ Classifier: Operating System :: OS Independent
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Classifier: Programming Language :: Python :: 3.14
13
+ Requires-Python: <3.15,>=3.12
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Requires-Dist: numpy>=2.3
17
+ Provides-Extra: test
18
+ Requires-Dist: pytest; extra == "test"
19
+ Requires-Dist: pytest-cov; extra == "test"
20
+ Provides-Extra: lint
21
+ Requires-Dist: ruff; extra == "lint"
22
+ Provides-Extra: typecheck
23
+ Requires-Dist: mypy; extra == "typecheck"
24
+ Dynamic: license-file
25
+
26
+ # Derived Fields
27
+
28
+ An extensible, catalog-driven library for computing derived fields from multi-component engineering data arrays
29
+
30
+ ## Overview
31
+
32
+ `vcti.derived` turns multi-component engineering result arrays — vectors,
33
+ 6-DOF, symmetric stress/strain tensors — into derived fields such as
34
+ magnitude, von Mises, principal values and directions, and traction vectors.
35
+ It is pure numpy: plain arrays in, plain arrays out, with output dtype
36
+ following the input. Two faces sit over one implementation — bulk-first
37
+ **kernels** you call directly, and a **catalog** that enumerates which derived
38
+ fields exist per data family (with stable ids, display names, and parameters)
39
+ for driving menus and pipelines. Component order is handled explicitly, so
40
+ data from any solver (Abaqus, Nastran, Ansys, LS-Dyna) computes correctly
41
+ without reshuffling.
42
+
43
+ ## Installation
44
+
45
+ ```bash
46
+ pip install vcti-derived
47
+ ```
48
+
49
+ ### In `requirements.txt`
50
+
51
+ ```
52
+ vcti-derived>=1.0.0
53
+ ```
54
+
55
+ ### In `pyproject.toml` dependencies
56
+
57
+ ```toml
58
+ dependencies = [
59
+ "vcti-derived>=1.0.0",
60
+ ]
61
+ ```
62
+
63
+ ---
64
+
65
+ ## Quick Start
66
+
67
+ ```python
68
+ import numpy as np
69
+ from vcti.derived import CATALOG, ComponentOrder, DataFamily, symtensor
70
+
71
+ stress = np.array([[100.0, 20.0, 5.0, 15.0, 0.0, 0.0]]) # (N, 6): xx yy zz xy yz xz
72
+
73
+ # Kernels directly:
74
+ vm = symtensor.von_mises(stress) # (N,) von Mises stress
75
+ s1 = symtensor.principals(stress)[:, -1] # (N,) max principal
76
+
77
+ # Data from a solver with a different component order (zero-copy):
78
+ vm = symtensor.von_mises(stress, order=ComponentOrder.ABAQUS)
79
+
80
+ # Or through the catalog:
81
+ entry = CATALOG.get("symtensor3d.von_mises")
82
+ vm = entry.compute(stress)
83
+ for entry in CATALOG.by_family(DataFamily.SYMTENSOR3D):
84
+ print(entry.id, entry.display_name)
85
+ ```
86
+
87
+ ---
88
+
89
+ ## Dependencies
90
+
91
+ [numpy](https://numpy.org) only.
92
+
93
+ ---
94
+
95
+ ## Documentation
96
+
97
+ | If you want to… | Read |
98
+ |---|---|
99
+ | Understand the architecture and design decisions | [docs/design.md](docs/design.md) |
100
+ | Navigate and understand the source | [docs/source-guide.md](docs/source-guide.md) |
101
+ | See practical, real-world usage | [docs/patterns.md](docs/patterns.md) |
102
+ | Extend the library | [docs/extending.md](docs/extending.md) |
103
+ | Look up a specific function or type | [docs/api.md](docs/api.md) |
104
+
105
+ <!-- The section is required; drop rows for docs this package does not ship. -->
@@ -0,0 +1,80 @@
1
+ # Derived Fields
2
+
3
+ An extensible, catalog-driven library for computing derived fields from multi-component engineering data arrays
4
+
5
+ ## Overview
6
+
7
+ `vcti.derived` turns multi-component engineering result arrays — vectors,
8
+ 6-DOF, symmetric stress/strain tensors — into derived fields such as
9
+ magnitude, von Mises, principal values and directions, and traction vectors.
10
+ It is pure numpy: plain arrays in, plain arrays out, with output dtype
11
+ following the input. Two faces sit over one implementation — bulk-first
12
+ **kernels** you call directly, and a **catalog** that enumerates which derived
13
+ fields exist per data family (with stable ids, display names, and parameters)
14
+ for driving menus and pipelines. Component order is handled explicitly, so
15
+ data from any solver (Abaqus, Nastran, Ansys, LS-Dyna) computes correctly
16
+ without reshuffling.
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ pip install vcti-derived
22
+ ```
23
+
24
+ ### In `requirements.txt`
25
+
26
+ ```
27
+ vcti-derived>=1.0.0
28
+ ```
29
+
30
+ ### In `pyproject.toml` dependencies
31
+
32
+ ```toml
33
+ dependencies = [
34
+ "vcti-derived>=1.0.0",
35
+ ]
36
+ ```
37
+
38
+ ---
39
+
40
+ ## Quick Start
41
+
42
+ ```python
43
+ import numpy as np
44
+ from vcti.derived import CATALOG, ComponentOrder, DataFamily, symtensor
45
+
46
+ stress = np.array([[100.0, 20.0, 5.0, 15.0, 0.0, 0.0]]) # (N, 6): xx yy zz xy yz xz
47
+
48
+ # Kernels directly:
49
+ vm = symtensor.von_mises(stress) # (N,) von Mises stress
50
+ s1 = symtensor.principals(stress)[:, -1] # (N,) max principal
51
+
52
+ # Data from a solver with a different component order (zero-copy):
53
+ vm = symtensor.von_mises(stress, order=ComponentOrder.ABAQUS)
54
+
55
+ # Or through the catalog:
56
+ entry = CATALOG.get("symtensor3d.von_mises")
57
+ vm = entry.compute(stress)
58
+ for entry in CATALOG.by_family(DataFamily.SYMTENSOR3D):
59
+ print(entry.id, entry.display_name)
60
+ ```
61
+
62
+ ---
63
+
64
+ ## Dependencies
65
+
66
+ [numpy](https://numpy.org) only.
67
+
68
+ ---
69
+
70
+ ## Documentation
71
+
72
+ | If you want to… | Read |
73
+ |---|---|
74
+ | Understand the architecture and design decisions | [docs/design.md](docs/design.md) |
75
+ | Navigate and understand the source | [docs/source-guide.md](docs/source-guide.md) |
76
+ | See practical, real-world usage | [docs/patterns.md](docs/patterns.md) |
77
+ | Extend the library | [docs/extending.md](docs/extending.md) |
78
+ | Look up a specific function or type | [docs/api.md](docs/api.md) |
79
+
80
+ <!-- The section is required; drop rows for docs this package does not ship. -->
@@ -0,0 +1,68 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "vcti-derived"
7
+ version = "1.0.0"
8
+ description = "An extensible, catalog-driven library for computing derived fields from multi-component engineering data arrays"
9
+ readme = "README.md"
10
+ authors = [
11
+ {name = "Visual Collaboration Technologies Inc."}
12
+ ]
13
+ license = "LicenseRef-Proprietary"
14
+ license-files = ["LICENSE"]
15
+ classifiers = [
16
+ "Operating System :: OS Independent",
17
+ "Programming Language :: Python :: 3.12",
18
+ "Programming Language :: Python :: 3.13",
19
+ "Programming Language :: Python :: 3.14",
20
+ ]
21
+ requires-python = ">=3.12,<3.15"
22
+ dependencies = ["numpy>=2.3"]
23
+
24
+ [project.urls]
25
+ Repository = "https://github.com/vcollab/vcti-python-derived"
26
+ Changelog = "https://github.com/vcollab/vcti-python-derived/blob/main/CHANGELOG.md"
27
+
28
+ [tool.setuptools.packages.find]
29
+ where = ["src"]
30
+ include = ["vcti.derived", "vcti.derived.*"]
31
+
32
+ [tool.setuptools.package-data]
33
+ "vcti.derived" = ["py.typed"]
34
+
35
+ [project.optional-dependencies]
36
+ test = ["pytest", "pytest-cov"]
37
+ lint = ["ruff"]
38
+ typecheck = ["mypy"]
39
+
40
+ [tool.pytest.ini_options]
41
+ addopts = "--cov=vcti.derived --cov-report=term-missing --cov-fail-under=95"
42
+
43
+ [tool.mypy]
44
+ python_version = "3.12"
45
+ strict = true
46
+ files = ["src"]
47
+ namespace_packages = true
48
+ explicit_package_bases = true
49
+ mypy_path = ["src"]
50
+
51
+ [tool.coverage.run]
52
+ branch = true
53
+
54
+ [tool.coverage.report]
55
+ exclude_also = [
56
+ "raise NotImplementedError",
57
+ "if TYPE_CHECKING:",
58
+ "if __name__ == .__main__.:",
59
+ "@(abc\\.)?abstractmethod",
60
+ "\\.\\.\\.",
61
+ ]
62
+
63
+ [tool.ruff]
64
+ target-version = "py312"
65
+ line-length = 99
66
+
67
+ [tool.ruff.lint]
68
+ select = ["E", "F", "W", "I", "UP"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,34 @@
1
+ # Copyright Visual Collaboration Technologies Inc. All Rights Reserved.
2
+ # See LICENSE for details.
3
+ """vcti.derived — An extensible, catalog-driven library for computing
4
+ derived fields from multi-component engineering data arrays.
5
+ """
6
+
7
+ from importlib.metadata import version
8
+
9
+ from . import dof6, ranges, scalar, symtensor, vector
10
+ from .catalog import CATALOG, Catalog, Context, DerivedField, OutputKind, Parameter
11
+ from .families import CANONICAL_COMPONENTS, DataFamily
12
+ from .order import ComponentOrder, OrderLike, SolverOrder
13
+
14
+ __version__ = version("vcti-derived")
15
+
16
+ __all__ = [
17
+ "CANONICAL_COMPONENTS",
18
+ "CATALOG",
19
+ "Catalog",
20
+ "ComponentOrder",
21
+ "Context",
22
+ "DataFamily",
23
+ "DerivedField",
24
+ "OrderLike",
25
+ "OutputKind",
26
+ "Parameter",
27
+ "SolverOrder",
28
+ "__version__",
29
+ "dof6",
30
+ "ranges",
31
+ "scalar",
32
+ "symtensor",
33
+ "vector",
34
+ ]