torch-structure 0.1.0__py3-none-any.whl

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/__init__.py +33 -0
  2. torch_structure/data/__init__.py +12 -0
  3. torch_structure/data/data.py +1806 -0
  4. torch_structure/data/dataset.py +57 -0
  5. torch_structure/data/utils.py +16 -0
  6. torch_structure/data/view.py +58 -0
  7. torch_structure/formfinding/__init__.py +23 -0
  8. torch_structure/formfinding/cem.py +557 -0
  9. torch_structure/formfinding/fdm.py +120 -0
  10. torch_structure/formfinding/laplacian_smooth.py +60 -0
  11. torch_structure/formfinding/tna.py +68 -0
  12. torch_structure/formfinding/utils.py +84 -0
  13. torch_structure/generators/__init__.py +29 -0
  14. torch_structure/generators/arch_suspension_bridge.py +419 -0
  15. torch_structure/generators/base_generator.py +60 -0
  16. torch_structure/generators/bridge.py +734 -0
  17. torch_structure/generators/cable_stayed_bridge.py +212 -0
  18. torch_structure/generators/cablenet.py +888 -0
  19. torch_structure/generators/dome.py +235 -0
  20. torch_structure/generators/gridshell.py +876 -0
  21. torch_structure/generators/mixed_dome.py +272 -0
  22. torch_structure/generators/nervi_dome.py +174 -0
  23. torch_structure/generators/network_arch_bridge.py +352 -0
  24. torch_structure/generators/single_trail.py +131 -0
  25. torch_structure/generators/structure.py +137 -0
  26. torch_structure/generators/truss_bridge.py +404 -0
  27. torch_structure/geometry/__init__.py +5 -0
  28. torch_structure/geometry/convert.py +22 -0
  29. torch_structure/geometry/intersect.py +72 -0
  30. torch_structure/geometry/utils.py +43 -0
  31. torch_structure/loader/__init__.py +3 -0
  32. torch_structure/loader/loader.py +80 -0
  33. torch_structure/loss/__init__.py +7 -0
  34. torch_structure/loss/lignn.py +48 -0
  35. torch_structure/loss/residual_force.py +36 -0
  36. torch_structure/message_passing/__init__.py +13 -0
  37. torch_structure/message_passing/fem.py +112 -0
  38. torch_structure/message_passing/laplace.py +38 -0
  39. torch_structure/message_passing/lignn.py +61 -0
  40. torch_structure/message_passing/residual_force.py +32 -0
  41. torch_structure/mixins/__init__.py +13 -0
  42. torch_structure/mixins/cem.py +283 -0
  43. torch_structure/mixins/fdm.py +64 -0
  44. torch_structure/mixins/laplace.py +165 -0
  45. torch_structure/mixins/plot.py +33 -0
  46. torch_structure/mixins/tna.py +55 -0
  47. torch_structure/mixins/utils.py +42 -0
  48. torch_structure/plot/__init__.py +3 -0
  49. torch_structure/plot/plot.py +500 -0
  50. torch_structure/transforms/__init__.py +15 -0
  51. torch_structure/transforms/gaussian_xyz_noise.py +41 -0
  52. torch_structure/transforms/gaussian_z_noise.py +37 -0
  53. torch_structure/transforms/laplacian_z_noise.py +68 -0
  54. torch_structure/transforms/radial_z_noise.py +55 -0
  55. torch_structure/transforms/scale.py +99 -0
  56. torch_structure/utils.py +96 -0
  57. torch_structure-0.1.0.dist-info/METADATA +64 -0
  58. torch_structure-0.1.0.dist-info/RECORD +59 -0
  59. torch_structure-0.1.0.dist-info/WHEEL +4 -0
@@ -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])