From b171e109c40a9f1d968c180d196cd3c32fc6292a Mon Sep 17 00:00:00 2001 From: Wensley Rushing <179432206+wensley-rushing@users.noreply.github.com> Date: Mon, 26 Aug 2024 20:07:26 -0700 Subject: [PATCH 1/2] wr - add banners --- src/opensees/__init__.py | 8 +++++++- src/opensees/__main__.py | 6 ++++++ src/opensees/openseespy.py | 7 +++++++ src/opensees/series.py | 2 ++ src/opensees/tcl.py | 7 +++++++ 5 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/opensees/__init__.py b/src/opensees/__init__.py index df6cdf3bf3..334b4c5fa1 100644 --- a/src/opensees/__init__.py +++ b/src/opensees/__init__.py @@ -1,4 +1,10 @@ -__version__ = "0.0.61" +#===----------------------------------------------------------------------===# +# +# STAIRLab -- STructural Artificial Intelligence Laboratory +# +#===----------------------------------------------------------------------===# +# +__version__ = "0.0.65" # Imports for this module import math diff --git a/src/opensees/__main__.py b/src/opensees/__main__.py index 045662ad98..cc0e7193ef 100755 --- a/src/opensees/__main__.py +++ b/src/opensees/__main__.py @@ -1,4 +1,10 @@ #!/usr/bin/env python3 +#===----------------------------------------------------------------------===# +# +# STAIRLab -- STructural Artificial Intelligence Laboratory +# +#===----------------------------------------------------------------------===# +# """ This file implements the primary command line interface for the package which is invoked by running: diff --git a/src/opensees/openseespy.py b/src/opensees/openseespy.py index f498334149..de4c10b676 100644 --- a/src/opensees/openseespy.py +++ b/src/opensees/openseespy.py @@ -1,3 +1,10 @@ +#===----------------------------------------------------------------------===# +# +# STAIRLab -- STructural Artificial Intelligence Laboratory +# Berkeley, CA +# +#===----------------------------------------------------------------------===# +# """ This module implements the OpenSeesPy interface. Imports can be performed exactly as one would diff --git a/src/opensees/series.py b/src/opensees/series.py index f1a7208298..b86f5aec7a 100644 --- a/src/opensees/series.py +++ b/src/opensees/series.py @@ -1,3 +1,5 @@ + + import math def triangle(t, period=2*math.pi, amplitude=2.0): diff --git a/src/opensees/tcl.py b/src/opensees/tcl.py index 4f1617d962..3463fab799 100644 --- a/src/opensees/tcl.py +++ b/src/opensees/tcl.py @@ -1,3 +1,10 @@ +#===----------------------------------------------------------------------===# +# +# STAIRLab -- STructural Artificial Intelligence Laboratory +# Berkeley, CA +# +#===----------------------------------------------------------------------===# +# import os import sys import json From aedb5ed02bd51f5835da1b266f00e7120c949c8a Mon Sep 17 00:00:00 2001 From: claudio perez <50180406+claudioperez@users.noreply.github.com> Date: Mon, 26 Aug 2024 20:35:59 -0700 Subject: [PATCH 2/2] cmp - clean up --- src/opensees/openseespy.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/opensees/openseespy.py b/src/opensees/openseespy.py index f498334149..ba65184c64 100644 --- a/src/opensees/openseespy.py +++ b/src/opensees/openseespy.py @@ -399,8 +399,14 @@ def setFactor(self, factor): def element(self, type, tag, *args, **kwds): if tag is None: - tag = 0 - for existing_tag in self.getEleTags(): + tag = 1 + ele_tags = self.getEleTags() + if ele_tags is None: + ele_tags = [] + elif isinstance(ele_tags, int): + ele_tags = [ele_tags] + + for existing_tag in ele_tags: if tag <= existing_tag: tag = existing_tag + 1