sgio 0.2.12__py3-none-any.whl → 0.2.14__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.
- sgio/__init__.py +24 -4
- sgio/__main__.py +14 -2
- sgio/_version.py +1 -1
- sgio/app.py +6 -0
- sgio/utils/plot.py +13 -6
- {sgio-0.2.12.dist-info → sgio-0.2.14.dist-info}/METADATA +41 -2
- {sgio-0.2.12.dist-info → sgio-0.2.14.dist-info}/RECORD +10 -9
- sgio-0.2.14.dist-info/entry_points.txt +2 -0
- {sgio-0.2.12.dist-info → sgio-0.2.14.dist-info}/WHEEL +0 -0
- {sgio-0.2.12.dist-info → sgio-0.2.14.dist-info}/licenses/LICENSE +0 -0
sgio/__init__.py
CHANGED
|
@@ -14,6 +14,7 @@ from ._exceptions import (
|
|
|
14
14
|
|
|
15
15
|
from .core import (
|
|
16
16
|
StructureGene,
|
|
17
|
+
SGMesh,
|
|
17
18
|
check_isolated_nodes,
|
|
18
19
|
renumber_elements,
|
|
19
20
|
)
|
|
@@ -50,7 +51,11 @@ from .utils import (
|
|
|
50
51
|
from ._vendors import inprw
|
|
51
52
|
|
|
52
53
|
__all__ = [
|
|
54
|
+
# Version
|
|
55
|
+
"__version__",
|
|
56
|
+
# Configuration and logging
|
|
53
57
|
"configure_logging",
|
|
58
|
+
# I/O functions
|
|
54
59
|
"read",
|
|
55
60
|
"readOutput",
|
|
56
61
|
"readOutputModel",
|
|
@@ -58,11 +63,26 @@ __all__ = [
|
|
|
58
63
|
"write",
|
|
59
64
|
"convert",
|
|
60
65
|
"readLoadCsv",
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
66
|
+
"addCellDictDataToMesh",
|
|
67
|
+
"addPointDictDataToMesh",
|
|
68
|
+
# Execution
|
|
69
|
+
"run",
|
|
70
|
+
# Core functions and classes
|
|
71
|
+
"buildSG1D",
|
|
72
|
+
"combineSG",
|
|
64
73
|
"SGMesh",
|
|
65
|
-
|
|
74
|
+
"StructureGene",
|
|
75
|
+
"check_isolated_nodes",
|
|
76
|
+
"renumber_elements",
|
|
77
|
+
# Utility functions
|
|
78
|
+
"plot_sg_2d",
|
|
79
|
+
# Model classes from .model import *
|
|
80
|
+
"CauchyContinuumModel",
|
|
81
|
+
"KirchhoffLovePlateShellModel",
|
|
82
|
+
"ReissnerMindlinPlateShellModel",
|
|
83
|
+
"EulerBernoulliBeamModel",
|
|
84
|
+
"TimoshenkoBeamModel",
|
|
85
|
+
# Exception classes
|
|
66
86
|
"SwiftCompLicenseError",
|
|
67
87
|
"VABSLicenseError",
|
|
68
88
|
"SwiftCompIOError",
|
sgio/__main__.py
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import sys
|
|
2
|
+
import os
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
def main():
|
|
5
|
+
"""Main entry point for the sgio command-line interface."""
|
|
6
|
+
# Get the directory containing this file
|
|
7
|
+
current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
8
|
+
# Get the parent directory (where sgio package is)
|
|
9
|
+
parent_dir = os.path.dirname(current_dir)
|
|
10
|
+
# Add to sys.path if not already there
|
|
11
|
+
if parent_dir not in sys.path:
|
|
12
|
+
sys.path.insert(0, parent_dir)
|
|
5
13
|
|
|
14
|
+
from sgio.app import cli
|
|
6
15
|
cli(*sys.argv)
|
|
16
|
+
|
|
17
|
+
if __name__ == "__main__":
|
|
18
|
+
main()
|
sgio/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.2.
|
|
1
|
+
__version__ = "0.2.14"
|
sgio/app.py
CHANGED
|
@@ -80,6 +80,11 @@ def cli(*args):
|
|
|
80
80
|
parser.add_argument(
|
|
81
81
|
'-tfv', '--to-format-version', type=str,
|
|
82
82
|
help='CS/SG file format version to be written to')
|
|
83
|
+
parser.add_argument(
|
|
84
|
+
'-a', '--analysis', type=case_insensitive_string, default='h',
|
|
85
|
+
choices=['h', 'd', 'fi'],
|
|
86
|
+
help='Analysis type'
|
|
87
|
+
)
|
|
83
88
|
parser.add_argument(
|
|
84
89
|
'-d', '--sgdim', type=int, default=2,
|
|
85
90
|
choices=[1, 2, 3],
|
|
@@ -147,6 +152,7 @@ def main(
|
|
|
147
152
|
file_format_out=kwargs['to_format'],
|
|
148
153
|
file_version_in=kwargs['from_format_version'],
|
|
149
154
|
file_version_out=kwargs['to_format_version'],
|
|
155
|
+
analysis=kwargs['analysis'],
|
|
150
156
|
sgdim=kwargs['sgdim'],
|
|
151
157
|
model_space=kwargs['model_space'],
|
|
152
158
|
prop_ref_y=kwargs['material_ref_y'],
|
sgio/utils/plot.py
CHANGED
|
@@ -167,6 +167,7 @@ def plot_2d_mesh(
|
|
|
167
167
|
def plot_sg_2d(
|
|
168
168
|
sg, model, ax,
|
|
169
169
|
ec_mesh='0.5', fc_mesh='0.9', lw_mesh=0.2,
|
|
170
|
+
legend_kwards={},
|
|
170
171
|
**kwargs):
|
|
171
172
|
"""
|
|
172
173
|
Plot a 2D structure gene.
|
|
@@ -234,12 +235,18 @@ def plot_sg_2d(
|
|
|
234
235
|
|
|
235
236
|
|
|
236
237
|
# Add a legend
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
238
|
+
if legend_kwards:
|
|
239
|
+
ax.legend(
|
|
240
|
+
handlers, labels,
|
|
241
|
+
**legend_kwards
|
|
242
|
+
)
|
|
243
|
+
else:
|
|
244
|
+
ax.legend(
|
|
245
|
+
handlers, labels,
|
|
246
|
+
ncols=5,
|
|
247
|
+
bbox_to_anchor=(0.5, 1),
|
|
248
|
+
loc='lower center',
|
|
249
|
+
)
|
|
243
250
|
|
|
244
251
|
|
|
245
252
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sgio
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.14
|
|
4
4
|
Summary: I/O for VABS and SwiftComp
|
|
5
5
|
Project-URL: Homepage, https://github.com/wenbinyugroup/sgio
|
|
6
6
|
Project-URL: Documentation, https://wenbinyugroup.github.io/sgio/
|
|
@@ -10,14 +10,20 @@ License-File: LICENSE
|
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Requires-Python: >=3.9
|
|
13
|
+
Requires-Dist: build>=1.3.0
|
|
14
|
+
Requires-Dist: hatchling>=1.27.0
|
|
13
15
|
Requires-Dist: matplotlib
|
|
14
16
|
Requires-Dist: meshio
|
|
15
17
|
Requires-Dist: pyyaml
|
|
16
18
|
Requires-Dist: scipy
|
|
19
|
+
Requires-Dist: twine>=6.2.0
|
|
17
20
|
Provides-Extra: all
|
|
18
21
|
Requires-Dist: h5py; extra == 'all'
|
|
19
22
|
Requires-Dist: netcdf4; extra == 'all'
|
|
20
23
|
Requires-Dist: pytest; extra == 'all'
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pyinstaller; extra == 'dev'
|
|
26
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
21
27
|
Description-Content-Type: text/markdown
|
|
22
28
|
|
|
23
29
|
# SGIO
|
|
@@ -50,11 +56,44 @@ Online [documentation](https://wenbinyugroup.github.io/sgio/)
|
|
|
50
56
|
|
|
51
57
|
## Installation
|
|
52
58
|
|
|
59
|
+
### Option 1: Install via pip (Recommended)
|
|
60
|
+
|
|
53
61
|
```shell
|
|
54
62
|
pip install sgio
|
|
55
63
|
```
|
|
56
64
|
|
|
57
|
-
###
|
|
65
|
+
### Option 2: Standalone Executable (No Python Required)
|
|
66
|
+
|
|
67
|
+
Download and use the pre-built standalone executable that requires no Python installation:
|
|
68
|
+
|
|
69
|
+
1. Download the latest executable from the releases page
|
|
70
|
+
2. Run directly from command line:
|
|
71
|
+
```shell
|
|
72
|
+
# Windows
|
|
73
|
+
sgio.exe --help
|
|
74
|
+
|
|
75
|
+
# Linux/macOS
|
|
76
|
+
./sgio --help
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Option 3: Build Your Own Executable
|
|
80
|
+
|
|
81
|
+
Build a standalone executable from source:
|
|
82
|
+
|
|
83
|
+
```shell
|
|
84
|
+
# Windows
|
|
85
|
+
build_executable.bat
|
|
86
|
+
|
|
87
|
+
# Linux/macOS
|
|
88
|
+
./build_executable.sh
|
|
89
|
+
|
|
90
|
+
# Or manually
|
|
91
|
+
python build_executable.py
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
See [BUILD_EXECUTABLE.md](BUILD_EXECUTABLE.md) for detailed instructions.
|
|
95
|
+
|
|
96
|
+
### Option 4: Manual Installation
|
|
58
97
|
|
|
59
98
|
1. [Download](https://github.com/wenbinyugroup/sgio) the package.
|
|
60
99
|
2. Install dependencies:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
sgio/__init__.py,sha256=
|
|
2
|
-
sgio/__main__.py,sha256=
|
|
1
|
+
sgio/__init__.py,sha256=_d9-FQgPuKSsMJwXz0BCG4syzC7oZN4GEqV4WiEvsdE,1915
|
|
2
|
+
sgio/__main__.py,sha256=2aCTm13OApWkRzK4Bk5UFtrTiIi9zvd6BQDwmharoKU,528
|
|
3
3
|
sgio/_exceptions.py,sha256=llmy4WD0257I-Fn6e7HRSkzGQDz-xbhdmrxfNX1wm6o,326
|
|
4
4
|
sgio/_global.py,sha256=ak5NGrrNV3wQ-pqJDWig_cENF7xLMQ-uhpbB6J9bgq8,2794
|
|
5
|
-
sgio/_version.py,sha256=
|
|
6
|
-
sgio/app.py,sha256=
|
|
5
|
+
sgio/_version.py,sha256=na4fgWduDuK2x0rn62ncccY8t6M1aaQohiViSM1lWiE,22
|
|
6
|
+
sgio/app.py,sha256=amPE0i2VtqErDDV-jHq04sj-1f9BEy7cKtORqrnYWmk,5182
|
|
7
7
|
sgio/execu.py,sha256=wtjbvLYHFpcWBcvOCEQntYyJJXL9RE1Nw4W1h12MCH4,9350
|
|
8
8
|
sgio/_vendors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
sgio/_vendors/inprw/NoneSort.py,sha256=Byoj0VsNOCAv7g8aZNolCkWPDxkIbpF3lbsDgjJBM0g,1362
|
|
@@ -188,10 +188,11 @@ sgio/utils/execu.py,sha256=lLC7bFE_2GjTvSfKKkKbt8qGmiY-S4xTjB_hIMwUoaw,4941
|
|
|
188
188
|
sgio/utils/io.py,sha256=W5AULEuELR6pUa-QrOmCBsHWtLLDhTC8UeDD8ScaC44,6802
|
|
189
189
|
sgio/utils/logging.py,sha256=lrAZXo_GOgzH66M_p-RIx1GFLChV-MdfcvB7uSVOkYg,1491
|
|
190
190
|
sgio/utils/math.py,sha256=K8yDF8yt1qbz8xvboxi6XTzRDBZMbo8xtDglUnM-4lg,20508
|
|
191
|
-
sgio/utils/plot.py,sha256=
|
|
191
|
+
sgio/utils/plot.py,sha256=BGT7tHFsxNXKeoRYqtyCp2THe28v8oziGrSHebDH7CU,10786
|
|
192
192
|
sgio/utils/timer.py,sha256=fkTomvw4HwTc24Gz8gp7RVKkypzmS-aYQY5SIBMVCjI,964
|
|
193
193
|
sgio/utils/version.py,sha256=CRzs6g4nL-ON1YkSLjuQiwo0pRX8x9-oBFig6xO-rn8,1811
|
|
194
|
-
sgio-0.2.
|
|
195
|
-
sgio-0.2.
|
|
196
|
-
sgio-0.2.
|
|
197
|
-
sgio-0.2.
|
|
194
|
+
sgio-0.2.14.dist-info/METADATA,sha256=EFAL6ANbRwURVGLWan5r0iWlHqraqg0v5kopDiY8Xvg,5788
|
|
195
|
+
sgio-0.2.14.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
196
|
+
sgio-0.2.14.dist-info/entry_points.txt,sha256=oP1QqgkpqGCE6TFZmOS5vljLin2MYtgg9gD2bvdZjxs,44
|
|
197
|
+
sgio-0.2.14.dist-info/licenses/LICENSE,sha256=wEM_DfG95p0KxCwsmqO2P8KwHAKk9P4-94A4tuBHFrY,1136
|
|
198
|
+
sgio-0.2.14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|