Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add argument to disable run_at_connect in MapdlGrpc #3049

Merged
merged 6 commits into from
May 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/ansys/mapdl/core/mapdl_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,13 @@ class MapdlGrpc(MapdlBase):
Print the command ``/COM`` arguments to the standard output.
The default is ``False``.

disable_run_at_connect: bool, optional
Whether to disable the housekeeping commands when connecting.
The default is ``False``.

channel : grpc.Channel, optional
gRPC channel to use for the connection. Can be used as an
alternative to the ``ip`` and ``port`` parameters.
gRPC channel to use for the connection. This parameter can be
used as an alternative to the ``ip`` and ``port`` parameters.

remote_instance : ansys.platform.instancemanagement.Instance
The corresponding remote instance when MAPDL is launched through
Expand Down Expand Up @@ -316,6 +320,7 @@ def __init__(
remove_temp_files: Optional[bool] = None,
remove_temp_dir_on_exit: bool = False,
print_com: bool = False,
disable_run_at_connect: bool = False,
channel: Optional[grpc.Channel] = None,
remote_instance: Optional["PIM_Instance"] = None,
**start_parm,
Expand Down Expand Up @@ -437,7 +442,8 @@ def __init__(
self._mesh_rep = MeshGrpc(self)

# Run at connect
self._run_at_connect()
if not disable_run_at_connect:
self._run_at_connect()

# HOUSEKEEPING:
# Set to not abort after encountering errors. Otherwise, many
Expand Down