OpenSeesHpy 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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 - 2027 Seyed Alireza Jalali, Seyyed Sadeq Notghi Moghaddam, OpenSees House, Iran (www.OpenSeesHouse.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ include README.md
2
+ include LICENSE
3
+ recursive-include src/OpenSeesHpy *.pyd
@@ -0,0 +1,25 @@
1
+ Metadata-Version: 2.4
2
+ Name: OpenSeesHpy
3
+ Version: 0.1.0
4
+ Summary: an OpenSees customization optimized for performance-based analysis and design of structures
5
+ Home-page: https://openseeshouse.com/
6
+ Author: OpesnSeesHouse
7
+ Author-email: OpesnSeesHouse <OpenSeesHouse@gmail.com>
8
+ License: MIT
9
+ Project-URL: Homepage, https://openseeshouse.com/
10
+ Project-URL: Repository, https://github.com/OpenSeesHouse/OpenSeesH
11
+ Requires-Python: ==3.13
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Dynamic: author
15
+ Dynamic: home-page
16
+ Dynamic: license-file
17
+ Dynamic: requires-python
18
+
19
+ #OpenSeesHpy
20
+
21
+ **_This is an OpenSees customization optimized for performance-based analysis and design of structures _**
22
+ **_This version is provided and published by OpenSeesHouse (https://OpenSeesHouse.com)._**
23
+
24
+ **_installing by pip_**
25
+ pip install OpenSeesHpy
@@ -0,0 +1,7 @@
1
+ #OpenSeesHpy
2
+
3
+ **_This is an OpenSees customization optimized for performance-based analysis and design of structures _**
4
+ **_This version is provided and published by OpenSeesHouse (https://OpenSeesHouse.com)._**
5
+
6
+ **_installing by pip_**
7
+ pip install OpenSeesHpy
@@ -0,0 +1,32 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "OpenSeesHpy"
7
+ version = "0.1.0"
8
+ description = "an OpenSees customization optimized for performance-based analysis and design of structures"
9
+ authors = [
10
+ { name = "OpesnSeesHouse", email = "OpenSeesHouse@gmail.com" }
11
+ ]
12
+ readme = "README.md"
13
+ requires-python = "==3.13"
14
+ license = {text = "MIT"}
15
+
16
+ [tool.setuptools]
17
+ package-dir = {"" = "src"}
18
+ packages = ["OpenSeesHpy"]
19
+ include-package-data = true
20
+
21
+ [tool.setuptools.package-data]
22
+ mypackage = ["*.pyd"]
23
+
24
+ classifiers = [
25
+ "Programming Language :: Python :: 3",
26
+ "License :: OSI Approved :: MIT License",
27
+ "Operating System :: Microsoft :: Windows"
28
+ ]
29
+
30
+ [project.urls]
31
+ "Homepage" = "https://openseeshouse.com/"
32
+ "Repository" = "https://github.com/OpenSeesHouse/OpenSeesH"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,27 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name="OpenSeesHpy",
5
+ version="0.1.0",
6
+ author="OpesnSeesHouse",
7
+ author_email="OpenSeesHouse@gmail.com",
8
+ description="an OpenSees customization optimized for performance-based analysis and design of structures",
9
+ long_description=open("README.md", encoding="utf-8").read(),
10
+ long_description_content_type="text/markdown",
11
+ url="https://openseeshouse.com/",
12
+ package_dir={"": "src"},
13
+ packages=find_packages(where="src"),
14
+ package_data={
15
+ "OpenSeesHpy": ["*.pyd"],
16
+ },
17
+ classifiers=[
18
+ "Programming Language :: Python :: 3",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Operating System :: Microsoft :: Windows"
21
+ ],
22
+ python_requires="==3.13",
23
+ project_urls={
24
+ "Source": "https://github.com/OpenSeesHouse/OpenSeesH",
25
+ },
26
+ include_package_data=True,
27
+ )
@@ -0,0 +1,358 @@
1
+ #########################################################################
2
+ # please keep this notification at the beginning of this file #
3
+ # #
4
+ # Developed by Seyed Alireza Jalali #
5
+ # please visit: www.OpenSeesHouse.com #
6
+ # #
7
+ # DISTRIBUTION OF THIS CODE WITHOUT WRITTEN PERMISSION FROM #
8
+ # THE DEVELOPER IS HEREBY RESTRICTED #
9
+ #########################################################################
10
+
11
+ import OpenSeesHpy.OpenSeesH as oph
12
+
13
+
14
+ class OpenSeesHpy:
15
+ cmndsLog = None
16
+ echoCommands = False
17
+ BlockStarted = False
18
+ format = 'python'
19
+
20
+ @staticmethod
21
+ def logLine(command, args = [], hasBlock = False, inBlock = False):
22
+ """Log command to the command log file."""
23
+ if not OpenSeesHpy.cmndsLog:
24
+ return
25
+ def is_number(s):
26
+ try:
27
+ float(s)
28
+ return True
29
+ except ValueError:
30
+ return False
31
+
32
+ formatted_args = []
33
+ if not isinstance(args, list) and not isinstance(args, tuple):
34
+ args = [args]
35
+ for arg in args:
36
+ if isinstance(arg, str) and not is_number(arg):
37
+ formatted_args.append(f"'{arg}'")
38
+ else:
39
+ if isinstance(arg, float):
40
+ formatted_args.append(f"{arg:.5f}")
41
+ else:
42
+ formatted_args.append(str(arg))
43
+ if OpenSeesHpy.format == 'tcl':
44
+ line = f"{command} {' '.join(map(str, formatted_args))}"
45
+ else:
46
+ line = f"oph.{command}({', '.join(formatted_args)})"
47
+ if (not inBlock) and OpenSeesHpy.BlockStarted:
48
+ if OpenSeesHpy.format == 'tcl':
49
+ OpenSeesHpy.cmndsLog.write('}' + "\n")
50
+ if OpenSeesHpy.echoCommands:
51
+ print('}'+'\n')
52
+ OpenSeesHpy.BlockStarted = False
53
+ if OpenSeesHpy.BlockStarted and OpenSeesHpy.format == 'tcl':
54
+ line = f'\t{line}'
55
+ OpenSeesHpy.cmndsLog.write(line)
56
+ if OpenSeesHpy.echoCommands:
57
+ print(line)
58
+ if hasBlock and not OpenSeesHpy.BlockStarted:
59
+ # Start a new block
60
+ OpenSeesHpy.BlockStarted = True
61
+ if OpenSeesHpy.format == 'tcl':
62
+ OpenSeesHpy.cmndsLog.write(' {' + "\n")
63
+ if OpenSeesHpy.echoCommands:
64
+ print(' {' + "\n")
65
+ OpenSeesHpy.cmndsLog.write('\n')
66
+ if OpenSeesHpy.echoCommands:
67
+ print('\n')
68
+ OpenSeesHpy.cmndsLog.flush()
69
+
70
+ @staticmethod
71
+ def logCommands(filename=None, comment=None, echo=False, format = None):
72
+ """Set up command logging for OpenSeesHpy commands.
73
+ Args:
74
+ filename (str): Name of the file to activate logging commands to.
75
+ comment (str): Comment to write at the log file.
76
+ echo (bool): If True, echo commands to the console.
77
+ """
78
+ if echo:
79
+ OpenSeesHpy.echoCommands = True
80
+ if filename or comment:
81
+ if not filename:
82
+ filename = 'commandsLog.oph'
83
+ OpenSeesHpy.cmndsLog = open(filename, 'w')
84
+ OpenSeesHpy.cmndsLog.write("from OpenSeesH.OpenSeesHpy import OpenSeesHpy as oph\n")
85
+ OpenSeesHpy.cmndsLog.flush()
86
+ if comment:
87
+ OpenSeesHpy.cmndsLog.write(f"#{comment}\n")
88
+ OpenSeesHpy.cmndsLog.flush()
89
+ if format:
90
+ OpenSeesHpy.format = format
91
+
92
+ @staticmethod
93
+ def units(unit_string):
94
+ OpenSeesHpy.logLine("units", unit_string)
95
+ return
96
+
97
+ @staticmethod
98
+ def model(*args):
99
+ OpenSeesHpy.logLine("model", args)
100
+ return oph.model(*args)
101
+
102
+ @staticmethod
103
+ def node(tag, *args):
104
+ OpenSeesHpy.logLine("node", [tag, *args])
105
+ return oph.node(tag, *args)
106
+
107
+ @staticmethod
108
+ def uniaxialMaterial(type, tag, *params):
109
+ OpenSeesHpy.logLine("uniaxialMaterial", [type, tag, *params])
110
+ return oph.uniaxialMaterial(type, tag, *params)
111
+
112
+ @staticmethod
113
+ def section(type, tag, *params):
114
+ hasBlock = False
115
+ if type == 'fiber' or type == 'Fiber':
116
+ hasBlock = True
117
+ OpenSeesHpy.logLine("section", [type, tag, *params], hasBlock, False)
118
+ return oph.section(type, tag, *params)
119
+
120
+ @staticmethod
121
+ def patch(type, *params):
122
+ OpenSeesHpy.logLine("patch", [type, *params], False, True)
123
+ return oph.patch(type, *params)
124
+
125
+ @staticmethod
126
+ def layer(type, *params):
127
+ OpenSeesHpy.logLine("layer", [type, *params], False, True)
128
+ return oph.layer(type, *params)
129
+
130
+ @staticmethod
131
+ def fiber(type, *params):
132
+ OpenSeesHpy.logLine("fiber", [type, *params], False, True)
133
+ return oph.fiber(type, *params)
134
+
135
+ @staticmethod
136
+ def geomTransf(type, tag, *args):
137
+ OpenSeesHpy.logLine("geomTransf", [type, tag, *args])
138
+ return oph.geomTransf(type, tag, *args)
139
+
140
+ @staticmethod
141
+ def element(type, tag, *args):
142
+ OpenSeesHpy.logLine("element", [type, tag, *args])
143
+ return oph.element(type, tag, *args)
144
+
145
+ @staticmethod
146
+ def beamIntegration(type, tag, *args):
147
+ OpenSeesHpy.logLine("beamIntegration", [type, tag, *args])
148
+ return oph.beamIntegration(type, tag, *args)
149
+
150
+ @staticmethod
151
+ def region(tag, *args):
152
+ OpenSeesHpy.logLine("region", [tag, *args])
153
+ return oph.region(tag, *args)
154
+
155
+ @staticmethod
156
+ def rayleigh(*args):
157
+ OpenSeesHpy.logLine("rayleigh", args)
158
+ return oph.rayleigh(*args)
159
+
160
+ @staticmethod
161
+ def fix(nodeTag, *args):
162
+ OpenSeesHpy.logLine("fix", [nodeTag, *args])
163
+ return oph.fix(nodeTag, *args)
164
+
165
+ @staticmethod
166
+ def fixX(*args):
167
+ OpenSeesHpy.logLine("fixX", args)
168
+ return oph.fixX(*args)
169
+
170
+ @staticmethod
171
+ def fixY(*args):
172
+ OpenSeesHpy.logLine("fixY", args)
173
+ return oph.fixY(*args)
174
+
175
+ @staticmethod
176
+ def fixZ(*args):
177
+ OpenSeesHpy.logLine("fixZ", args)
178
+ return oph.fixZ(*args)
179
+
180
+ @staticmethod
181
+ def frictionModel(*args):
182
+ OpenSeesHpy.logLine("frictionModel", args)
183
+ return oph.frictionModel(*args)
184
+
185
+ @staticmethod
186
+ def equalDOF(*args):
187
+ OpenSeesHpy.logLine("equalDOF", args)
188
+ return oph.equalDOF(*args)
189
+
190
+ @staticmethod
191
+ def rigidDiaphragm(*args):
192
+ OpenSeesHpy.logLine("rigidDiaphragm", args)
193
+ return oph.rigidDiaphragm(*args)
194
+
195
+ @staticmethod
196
+ def rigidLink(*args):
197
+ OpenSeesHpy.logLine("rigidLink", args)
198
+ return oph.rigidLink(*args)
199
+
200
+ @staticmethod
201
+ def timeSeries(type, tag, *args):
202
+ OpenSeesHpy.logLine("timeSeries", [type, tag, *args])
203
+ return oph.timeSeries(type, tag, *args)
204
+
205
+ @staticmethod
206
+ def pattern(type, tag, *args):
207
+ hasBlock = False
208
+ if type == 'Plain':
209
+ hasBlock = True
210
+ OpenSeesHpy.logLine("pattern", [type, tag, *args], hasBlock, False)
211
+ return oph.pattern(type, tag, *args)
212
+
213
+ @staticmethod
214
+ def load(nodeTag, *args):
215
+ OpenSeesHpy.logLine("load", [nodeTag, *args], False, True)
216
+ return oph.load(nodeTag, *args)
217
+
218
+ @staticmethod
219
+ def sp(nodeTag, *args):
220
+ OpenSeesHpy.logLine("sp", [nodeTag, *args], False, True)
221
+ return oph.sp(nodeTag, *args)
222
+
223
+ @staticmethod
224
+ def eleLoad(tag, *args):
225
+ OpenSeesHpy.logLine("eleLoad", [tag, *args], False, True)
226
+ return oph.eleLoad(tag, *args)
227
+
228
+ @staticmethod
229
+ def groundMotion(tag, *args):
230
+ OpenSeesHpy.logLine("groundMotion", [tag, *args])
231
+ return oph.groundMotion(tag, *args)
232
+
233
+ @staticmethod
234
+ def imposedMotion(*args):
235
+ OpenSeesHpy.logLine("imposedMotion", args)
236
+ return oph.imposedMotion(*args)
237
+
238
+ @staticmethod
239
+ def recorder(type, *args):
240
+ OpenSeesHpy.logLine("recorder", [type, *args])
241
+ return oph.recorder(type, *args)
242
+
243
+ @staticmethod
244
+ def record(*args):
245
+ OpenSeesHpy.logLine("record", args)
246
+ if args:
247
+ return oph.recordSingle(*args)
248
+ return oph.record()
249
+
250
+ @staticmethod
251
+ def flushRecorders():
252
+ OpenSeesHpy.logLine("flushRecorders")
253
+ return oph.flushRecorders()
254
+
255
+ @staticmethod
256
+ def numberer(*args):
257
+ OpenSeesHpy.logLine("numberer", args)
258
+ oph.numberer(*args)
259
+
260
+ @staticmethod
261
+ def wipeAnalysis():
262
+ OpenSeesHpy.logLine("wipeAnalysis")
263
+ oph.wipeAnalysis()
264
+
265
+ @staticmethod
266
+ def constraints(*args):
267
+ OpenSeesHpy.logLine("constraints", args)
268
+ oph.constraints(*args)
269
+
270
+ @staticmethod
271
+ def system(*args):
272
+ OpenSeesHpy.logLine("system", args)
273
+ oph.system(*args)
274
+
275
+ @staticmethod
276
+ def test(*args):
277
+ OpenSeesHpy.logLine("test", args)
278
+ oph.test(*args)
279
+
280
+ @staticmethod
281
+ def algorithm(*args):
282
+ OpenSeesHpy.logLine("algorithm", args)
283
+ oph.algorithm(*args)
284
+
285
+ @staticmethod
286
+ def integrator(*args):
287
+ OpenSeesHpy.logLine("integrator", args)
288
+ oph.integrator(*args)
289
+
290
+ @staticmethod
291
+ def analysis(*args):
292
+ OpenSeesHpy.logLine("analysis", args)
293
+ oph.analysis(*args)
294
+
295
+ @staticmethod
296
+ def loadConst(*args):
297
+ OpenSeesHpy.logLine("loadConst", args)
298
+ oph.loadConst(*args)
299
+
300
+ @staticmethod
301
+ def analyze(*args):
302
+ OpenSeesHpy.logLine("analyze", args)
303
+ return oph.analyze(*args)
304
+
305
+ @staticmethod
306
+ def eigen(*args):
307
+ OpenSeesHpy.logLine("eigen", args)
308
+ return oph.eigen(*args)
309
+
310
+ @staticmethod
311
+ def nodeCoord(tag):
312
+ # OpenSeesHpy.logLine(f"nodeCoord {tag}")
313
+ return oph.nodeCoord(tag)
314
+
315
+ @staticmethod
316
+ def nodeDisp(tag, dof):
317
+ # OpenSeesHpy.logLine(f"nodeDisp {tag} {dof}")
318
+ return oph.nodeDisp(tag, dof)
319
+
320
+ @staticmethod
321
+ def recorderValue(recorderTag, *args):
322
+ # OpenSeesHpy.logLine(f"recorderValue {recorderTag} {' '.join(map(str, args))}")
323
+ return oph.recorderValue(recorderTag, *args)
324
+
325
+ @staticmethod
326
+ def getTime():
327
+ # OpenSeesHpy.logLine("getTime")
328
+ return oph.getTime()
329
+
330
+ @staticmethod
331
+ def remove(*params):
332
+ OpenSeesHpy.logLine("remove", params)
333
+ return oph.remove(*params)
334
+
335
+ @staticmethod
336
+ def wipe():
337
+ OpenSeesHpy.logLine("wipe")
338
+ oph.wipe()
339
+
340
+ @staticmethod
341
+ def reset():
342
+ OpenSeesHpy.logLine("reset")
343
+ oph.reset()
344
+
345
+ @staticmethod
346
+ def vup(*params):
347
+ OpenSeesHpy.logLine("vup", params)
348
+ oph.vup(*params)
349
+
350
+ @staticmethod
351
+ def prp(*params):
352
+ OpenSeesHpy.logLine("prp", params)
353
+ oph.prp(*params)
354
+
355
+ @staticmethod
356
+ def display(*params):
357
+ OpenSeesHpy.logLine("display", params)
358
+ oph.display(*params)
@@ -0,0 +1,12 @@
1
+ import sys
2
+
3
+ # requires Python 3.13 x64 on Windows
4
+ if sys.maxsize < 2**31:
5
+ raise RuntimeError('64 bit system is required')
6
+
7
+ # platform dependent
8
+ if not sys.platform.startswith('win'):
9
+ raise RuntimeError('OpenSeesH is currently provided for Windows systems only.')
10
+ if not (sys.version_info[0] == 3 and sys.version_info[1] == 13):
11
+ raise RuntimeError('Python version 3.13 is needed for OpenSeesH to run')
12
+ from .OpenSeesHpy import *
@@ -0,0 +1,25 @@
1
+ Metadata-Version: 2.4
2
+ Name: OpenSeesHpy
3
+ Version: 0.1.0
4
+ Summary: an OpenSees customization optimized for performance-based analysis and design of structures
5
+ Home-page: https://openseeshouse.com/
6
+ Author: OpesnSeesHouse
7
+ Author-email: OpesnSeesHouse <OpenSeesHouse@gmail.com>
8
+ License: MIT
9
+ Project-URL: Homepage, https://openseeshouse.com/
10
+ Project-URL: Repository, https://github.com/OpenSeesHouse/OpenSeesH
11
+ Requires-Python: ==3.13
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Dynamic: author
15
+ Dynamic: home-page
16
+ Dynamic: license-file
17
+ Dynamic: requires-python
18
+
19
+ #OpenSeesHpy
20
+
21
+ **_This is an OpenSees customization optimized for performance-based analysis and design of structures _**
22
+ **_This version is provided and published by OpenSeesHouse (https://OpenSeesHouse.com)._**
23
+
24
+ **_installing by pip_**
25
+ pip install OpenSeesHpy
@@ -0,0 +1,12 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README.md
4
+ pyproject.toml
5
+ setup.py
6
+ src/OpenSeesHpy/OpenSeesH.pyd
7
+ src/OpenSeesHpy/OpenSeesHpy.py
8
+ src/OpenSeesHpy/__init__.py
9
+ src/OpenSeesHpy.egg-info/PKG-INFO
10
+ src/OpenSeesHpy.egg-info/SOURCES.txt
11
+ src/OpenSeesHpy.egg-info/dependency_links.txt
12
+ src/OpenSeesHpy.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ OpenSeesHpy