torch-structure 0.1.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 (59) hide show
  1. torch_structure-0.1.0/PKG-INFO +64 -0
  2. torch_structure-0.1.0/README.md +38 -0
  3. torch_structure-0.1.0/pyproject.toml +46 -0
  4. torch_structure-0.1.0/src/torch_structure/__init__.py +33 -0
  5. torch_structure-0.1.0/src/torch_structure/data/__init__.py +12 -0
  6. torch_structure-0.1.0/src/torch_structure/data/data.py +1806 -0
  7. torch_structure-0.1.0/src/torch_structure/data/dataset.py +57 -0
  8. torch_structure-0.1.0/src/torch_structure/data/utils.py +16 -0
  9. torch_structure-0.1.0/src/torch_structure/data/view.py +58 -0
  10. torch_structure-0.1.0/src/torch_structure/formfinding/__init__.py +23 -0
  11. torch_structure-0.1.0/src/torch_structure/formfinding/cem.py +557 -0
  12. torch_structure-0.1.0/src/torch_structure/formfinding/fdm.py +120 -0
  13. torch_structure-0.1.0/src/torch_structure/formfinding/laplacian_smooth.py +60 -0
  14. torch_structure-0.1.0/src/torch_structure/formfinding/tna.py +68 -0
  15. torch_structure-0.1.0/src/torch_structure/formfinding/utils.py +84 -0
  16. torch_structure-0.1.0/src/torch_structure/generators/__init__.py +29 -0
  17. torch_structure-0.1.0/src/torch_structure/generators/arch_suspension_bridge.py +419 -0
  18. torch_structure-0.1.0/src/torch_structure/generators/base_generator.py +60 -0
  19. torch_structure-0.1.0/src/torch_structure/generators/bridge.py +734 -0
  20. torch_structure-0.1.0/src/torch_structure/generators/cable_stayed_bridge.py +212 -0
  21. torch_structure-0.1.0/src/torch_structure/generators/cablenet.py +888 -0
  22. torch_structure-0.1.0/src/torch_structure/generators/dome.py +235 -0
  23. torch_structure-0.1.0/src/torch_structure/generators/gridshell.py +876 -0
  24. torch_structure-0.1.0/src/torch_structure/generators/mixed_dome.py +272 -0
  25. torch_structure-0.1.0/src/torch_structure/generators/nervi_dome.py +174 -0
  26. torch_structure-0.1.0/src/torch_structure/generators/network_arch_bridge.py +352 -0
  27. torch_structure-0.1.0/src/torch_structure/generators/single_trail.py +131 -0
  28. torch_structure-0.1.0/src/torch_structure/generators/structure.py +137 -0
  29. torch_structure-0.1.0/src/torch_structure/generators/truss_bridge.py +404 -0
  30. torch_structure-0.1.0/src/torch_structure/geometry/__init__.py +5 -0
  31. torch_structure-0.1.0/src/torch_structure/geometry/convert.py +22 -0
  32. torch_structure-0.1.0/src/torch_structure/geometry/intersect.py +72 -0
  33. torch_structure-0.1.0/src/torch_structure/geometry/utils.py +43 -0
  34. torch_structure-0.1.0/src/torch_structure/loader/__init__.py +3 -0
  35. torch_structure-0.1.0/src/torch_structure/loader/loader.py +80 -0
  36. torch_structure-0.1.0/src/torch_structure/loss/__init__.py +7 -0
  37. torch_structure-0.1.0/src/torch_structure/loss/lignn.py +48 -0
  38. torch_structure-0.1.0/src/torch_structure/loss/residual_force.py +36 -0
  39. torch_structure-0.1.0/src/torch_structure/message_passing/__init__.py +13 -0
  40. torch_structure-0.1.0/src/torch_structure/message_passing/fem.py +112 -0
  41. torch_structure-0.1.0/src/torch_structure/message_passing/laplace.py +38 -0
  42. torch_structure-0.1.0/src/torch_structure/message_passing/lignn.py +61 -0
  43. torch_structure-0.1.0/src/torch_structure/message_passing/residual_force.py +32 -0
  44. torch_structure-0.1.0/src/torch_structure/mixins/__init__.py +13 -0
  45. torch_structure-0.1.0/src/torch_structure/mixins/cem.py +283 -0
  46. torch_structure-0.1.0/src/torch_structure/mixins/fdm.py +64 -0
  47. torch_structure-0.1.0/src/torch_structure/mixins/laplace.py +165 -0
  48. torch_structure-0.1.0/src/torch_structure/mixins/plot.py +33 -0
  49. torch_structure-0.1.0/src/torch_structure/mixins/tna.py +55 -0
  50. torch_structure-0.1.0/src/torch_structure/mixins/utils.py +42 -0
  51. torch_structure-0.1.0/src/torch_structure/plot/__init__.py +3 -0
  52. torch_structure-0.1.0/src/torch_structure/plot/plot.py +500 -0
  53. torch_structure-0.1.0/src/torch_structure/transforms/__init__.py +15 -0
  54. torch_structure-0.1.0/src/torch_structure/transforms/gaussian_xyz_noise.py +41 -0
  55. torch_structure-0.1.0/src/torch_structure/transforms/gaussian_z_noise.py +37 -0
  56. torch_structure-0.1.0/src/torch_structure/transforms/laplacian_z_noise.py +68 -0
  57. torch_structure-0.1.0/src/torch_structure/transforms/radial_z_noise.py +55 -0
  58. torch_structure-0.1.0/src/torch_structure/transforms/scale.py +99 -0
  59. torch_structure-0.1.0/src/torch_structure/utils.py +96 -0
@@ -0,0 +1,64 @@
1
+ Metadata-Version: 2.4
2
+ Name: torch-structure
3
+ Version: 0.1.0
4
+ Summary: A Python package for graph-based autodifferentiable structural design and engineering.
5
+ Author: Lazlo Bleker
6
+ License-Expression: MIT
7
+ Classifier: Development Status :: 3 - Alpha
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Topic :: Scientific/Engineering
10
+ Requires-Dist: matplotlib>=3.9.0
11
+ Requires-Dist: numpy
12
+ Requires-Dist: packaging
13
+ Requires-Dist: scipy>=1.13
14
+ Requires-Dist: torch-geometric>=2.6.1
15
+ Requires-Dist: mkdocs-gen-files>=0.5.0 ; extra == 'dev'
16
+ Requires-Dist: mkdocs-material>=9.5.44 ; extra == 'dev'
17
+ Requires-Dist: mkdocstrings[python]>=0.28.3 ; extra == 'dev'
18
+ Requires-Dist: pytest>=8.3.3 ; extra == 'dev'
19
+ Requires-Dist: pytest-cov>=6.0.0 ; extra == 'dev'
20
+ Requires-Dist: ruff>=0.9.10 ; extra == 'dev'
21
+ Requires-Python: >=3.9
22
+ Project-URL: Documentation, https://lazlo-bleker.github.io/torch-structure/
23
+ Project-URL: Repository, https://github.com/lazlo-bleker/torch-structure
24
+ Provides-Extra: dev
25
+ Description-Content-Type: text/markdown
26
+
27
+ ![Tests](https://github.com/lazlo-bleker/torch-structure/actions/workflows/tests.yml/badge.svg)
28
+ [![Docs](https://img.shields.io/badge/docs-work%20in%20progress-blue.svg)](https://lazlo-bleker.github.io/torch-structure/)
29
+ ![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)
30
+ <p align="center">
31
+ <picture>
32
+ <source media="(prefers-color-scheme: light)" srcset="docs/assets/ts_archtext_light.svg">
33
+ <source media="(prefers-color-scheme: dark)" srcset="docs/assets/ts_archtext_dark.svg">
34
+ <img alt="TorchStructure logo" src="docs/assets/ts_logo_light.svg" width="300">
35
+ </picture>
36
+ </p>
37
+
38
+ A Python package for graph-based autodifferentiable structural design and engineering.
39
+
40
+ 🚧 TorchStructure is in an early stage of development. It may contain bugs and will likely undergo API breaking changes. 🚧
41
+
42
+ ## Installation
43
+
44
+ You can install TorchStructure with pip:
45
+
46
+ ```bash
47
+ pip install torch_structure
48
+ ```
49
+
50
+ For a more detailed installation guide, check out the dedicated [documentation page](https://lazlo-bleker.github.io/torch-structure/install/).
51
+
52
+ ## Documentation
53
+
54
+ Documentation (work in progress) is available at [lazlo-bleker.github.io/torch-structure](https://lazlo-bleker.github.io/torch-structure/).
55
+
56
+ ## Contributing
57
+
58
+ TorchStructure is open to contributors. Feel free to reach out to [lazlo.bleker@tum.de](mailto:lazlo.bleker@tum.de) on how to do so.
59
+
60
+ See [CONTRIBUTORS.md](CONTRIBUTORS.md) for the current list of people involved in the project.
61
+
62
+ ## License
63
+
64
+ TorchStructure is licensed under the [MIT License](LICENSE).
@@ -0,0 +1,38 @@
1
+ ![Tests](https://github.com/lazlo-bleker/torch-structure/actions/workflows/tests.yml/badge.svg)
2
+ [![Docs](https://img.shields.io/badge/docs-work%20in%20progress-blue.svg)](https://lazlo-bleker.github.io/torch-structure/)
3
+ ![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)
4
+ <p align="center">
5
+ <picture>
6
+ <source media="(prefers-color-scheme: light)" srcset="docs/assets/ts_archtext_light.svg">
7
+ <source media="(prefers-color-scheme: dark)" srcset="docs/assets/ts_archtext_dark.svg">
8
+ <img alt="TorchStructure logo" src="docs/assets/ts_logo_light.svg" width="300">
9
+ </picture>
10
+ </p>
11
+
12
+ A Python package for graph-based autodifferentiable structural design and engineering.
13
+
14
+ 🚧 TorchStructure is in an early stage of development. It may contain bugs and will likely undergo API breaking changes. 🚧
15
+
16
+ ## Installation
17
+
18
+ You can install TorchStructure with pip:
19
+
20
+ ```bash
21
+ pip install torch_structure
22
+ ```
23
+
24
+ For a more detailed installation guide, check out the dedicated [documentation page](https://lazlo-bleker.github.io/torch-structure/install/).
25
+
26
+ ## Documentation
27
+
28
+ Documentation (work in progress) is available at [lazlo-bleker.github.io/torch-structure](https://lazlo-bleker.github.io/torch-structure/).
29
+
30
+ ## Contributing
31
+
32
+ TorchStructure is open to contributors. Feel free to reach out to [lazlo.bleker@tum.de](mailto:lazlo.bleker@tum.de) on how to do so.
33
+
34
+ See [CONTRIBUTORS.md](CONTRIBUTORS.md) for the current list of people involved in the project.
35
+
36
+ ## License
37
+
38
+ TorchStructure is licensed under the [MIT License](LICENSE).
@@ -0,0 +1,46 @@
1
+ [project]
2
+ name = "torch_structure"
3
+ version = "0.1.0"
4
+ description = "A Python package for graph-based autodifferentiable structural design and engineering."
5
+ authors = [
6
+ {name = "Lazlo Bleker"}
7
+ ]
8
+ readme = "README.md"
9
+ requires-python = ">=3.9"
10
+ license = "MIT"
11
+ classifiers = [
12
+ "Development Status :: 3 - Alpha",
13
+ "Programming Language :: Python :: 3",
14
+ "Topic :: Scientific/Engineering",
15
+ ]
16
+
17
+ dependencies = [
18
+ "matplotlib>=3.9.0",
19
+ "numpy",
20
+ "packaging",
21
+ "scipy>=1.13",
22
+ "torch-geometric>=2.6.1",
23
+ ]
24
+
25
+ [project.urls]
26
+ Documentation = "https://lazlo-bleker.github.io/torch-structure/"
27
+ Repository = "https://github.com/lazlo-bleker/torch-structure"
28
+
29
+ [project.optional-dependencies]
30
+ dev = [
31
+ "mkdocs-gen-files>=0.5.0",
32
+ "mkdocs-material>=9.5.44",
33
+ "mkdocstrings[python]>=0.28.3",
34
+ "pytest>=8.3.3",
35
+ "pytest-cov>=6.0.0",
36
+ "ruff>=0.9.10",
37
+ ]
38
+
39
+ [build-system]
40
+ requires = ["uv_build>=0.8.14,<0.9.0"]
41
+ build-backend = "uv_build"
42
+
43
+ [tool.pytest.ini_options]
44
+ testpaths = [
45
+ "tests"
46
+ ]
@@ -0,0 +1,33 @@
1
+ """
2
+ TorchStructure is a python package for graph-based autodifferentiable structural design
3
+ and engineering.
4
+ """
5
+
6
+ from importlib.metadata import version, PackageNotFoundError
7
+
8
+ from . import data
9
+ from . import formfinding
10
+ from . import generators
11
+ from . import loader
12
+ from . import message_passing
13
+ from . import loss
14
+ from . import plot
15
+ from . import transforms
16
+ from . import utils
17
+
18
+ try:
19
+ __version__ = version(__name__)
20
+ except PackageNotFoundError:
21
+ __version__ = "0.0.0"
22
+
23
+ __all__ = [
24
+ "data",
25
+ "formfinding",
26
+ "generators",
27
+ "loader",
28
+ "message_passing",
29
+ "loss",
30
+ "plot",
31
+ "transforms",
32
+ "utils",
33
+ ]
@@ -0,0 +1,12 @@
1
+ import torch
2
+ from packaging.version import parse
3
+
4
+ from .data import StructData
5
+ from .dataset import Dataset, save, LegacyDataset
6
+ from .utils import requires_metadata
7
+ from .view import NodeView
8
+
9
+ __all__ = ["StructData", "Dataset", "save", "LegacyDataset", "requires_metadata", "NodeView"]
10
+
11
+ if parse(torch.__version__) >= parse("2.4.0"):
12
+ torch.serialization.add_safe_globals([StructData])