Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/zzqbranch'
Browse files Browse the repository at this point in the history
  • Loading branch information
wenhuiuy committed Oct 18, 2023
2 parents 75f3d4b + 250d8cc commit b7ecca4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docker/solver/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Prerequisites
instructions from `this page <https://docs.docker.com/engine/install/>`_.

* Download the latest Linux release artifacts for the ``solver`` Docker container:
`mppdyna_docker_centos7.zip <https://github.com/ansys/pydyna/releases/download/v0.3.5/mppdyna_docker_centos7.zip>`_.
`mppdyna_docker_centos7.zip <https://github.com/ansys/pydyna/releases/download/v0.4.2/mppdyna_docker_centos7.zip>`_.

* Move this ZIP file to the ``docker/solver`` directory and unzip it in the same directory.

Expand Down
2 changes: 1 addition & 1 deletion src/ansys/dyna/core/pre/dynabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ def create_general_keyword(self, opcode, keyworddata):
\$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
opcode = "INITIAL_VELOCITY"
keyworddata = "0\\n1.480E+01,0.000E+00,0.000E+00,0.000E+00,0.000E+00,0.000E+00"
keyworddata = "0\n1.480E+01,0.000E+00,0.000E+00,0.000E+00,0.000E+00,0.000E+00"
create_general_keyword(opcode = opcode,keyworddata=keyworddata)
"""
ret = self.stub.CreateGeneralKWD(GeneralKWDRequest(opcode=opcode, keyworddata=keyworddata))
Expand Down
4 changes: 3 additions & 1 deletion src/ansys/dyna/core/pre/dynaem.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,11 +815,13 @@ def create(self):
soutouid = self.soctou.create(self.stub)
modified_prm = []
for par in self.prm:
if type(par) == float:
if type(par) == float or type(par) == int:
modified_prm.append(par)
elif type(par) == Table2D:
tid = par.create(self.stub)
modified_prm.append(-tid)
while len(modified_prm) < 6:
modified_prm.append(0)
ret = self.stub.CreateEMRandlesBatmac(
EMRandlesBatmacRequest(
rdltype=self.rdltype,
Expand Down
4 changes: 2 additions & 2 deletions src/ansys/dyna/core/pre/dynasolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class DynaSolution:
Port. the default is ``"50051"``.
"""

def __init__(self, hostname="localhost", port="50051"):
def __init__(self, hostname="localhost", port="50051", server_path=""):
# launch server
check_valid_ip(hostname) # double check
if port is None:
Expand All @@ -64,7 +64,7 @@ def __init__(self, hostname="localhost", port="50051"):

if (hostname.lower() == "localhost" or hostname == LOCALHOST) and not DynaSolution.grpc_local_server_on():
LOG.debug("Starting kwserver")
server_path = os.path.join(os.getcwd(), "../../src/ansys/dyna/core/pre/Server")
# server_path = os.path.join(os.getcwd(), "../../src/ansys/dyna/core/pre/Server")
threadserver = ServerThread(1, port=port, ip=hostname, server_path=server_path)
threadserver.setDaemon(True)
threadserver.start()
Expand Down

0 comments on commit b7ecca4

Please sign in to comment.