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

Fix documentation #2848

Merged
merged 7 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/source/getting_started/install_pymapdl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Install PyMAPDL

Python module
~~~~~~~~~~~~~
The ``ansys.mapdl.core`` package currently supports Python 3.8 through
Python 3.11 on Windows, Mac OS, and Linux.
The ``ansys.mapdl.core`` package currently supports Python 3.9 through
Python 3.12 on Windows, Mac OS, and Linux.

Install the latest release from `PyPi <pymapdl_pypi_>`_ with:
germa89 marked this conversation as resolved.
Show resolved Hide resolved

Expand Down
106 changes: 72 additions & 34 deletions doc/source/user_guide/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ To start MAPDL, just type on your activated virtual environment:

.. code:: pwsh-session

(.venv) PS C:\Users\user\pymapdl> launch_mapdl
(.venv) PS C:\Users\user\pymapdl> pymapdl start
Success: Launched an MAPDL instance (PID=23644) at 127.0.0.1:50052

.. tab-item:: Linux
:sync: key1

.. code:: console

(.venv) user@machine:~$ launch_mapdl
(.venv) user@machine:~$ pymapdl start
Success: Launched an MAPDL instance (PID=23644) at 127.0.0.1:50052

If you want to specify an argument, for instance the port, then you need to call
Expand All @@ -44,22 +44,22 @@ If you want to specify an argument, for instance the port, then you need to call

.. code:: pwsh-session

(.venv) PS C:\Users\user\pymapdl> launch_mapdl start --port 50054
(.venv) PS C:\Users\user\pymapdl> pymapdl start --port 50054
Success: Launched an MAPDL instance (PID=18238) at 127.0.0.1:50054

.. tab-item:: Linux
:sync: key1

.. code:: console

(.venv) user@machine:~$ launch_mapdl start --port 50054
(.venv) user@machine:~$ pymapdl start --port 50054
Success: Launched an MAPDL instance (PID=18238) at 127.0.0.1:50054


This command `launch_mapdl start` aims to replicate the function
This command ``pymapdl start`` aims to replicate the function
germa89 marked this conversation as resolved.
Show resolved Hide resolved
:func:`ansys.mapdl.core.launcher.launch_mapdl`, hence you can use
germa89 marked this conversation as resolved.
Show resolved Hide resolved
some of the arguments which this function allows.
For instance, you could specify the working directory:
For instance, you could specify the working directory:

.. tab-set::

Expand All @@ -68,26 +68,25 @@ For instance, you could specify the working directory:

.. code:: pwsh-session

(.venv) PS C:\Users\user\pymapdl> launch_mapdl start --run_location C:\Users\user\temp\
(.venv) PS C:\Users\user\pymapdl> pymapdl start --run_location C:\Users\user\temp\
Success: Launched an MAPDL instance (PID=32612) at 127.0.0.1:50052

.. tab-item:: Linux
:sync: key1

.. code:: console

(.venv) user@machine:~$ launch_mapdl start --run_location /home/user/tmp
(.venv) user@machine:~$ pymapdl start --run_location /home/user/tmp
Success: Launched an MAPDL instance (PID=32612) at 127.0.0.1:50052


For more information see :func:`ansys.mapdl.core.launcher.launch_mapdl`,
germa89 marked this conversation as resolved.
Show resolved Hide resolved
and :func:`ansys.mapdl.core.cli.launch_mapdl`
and :func:`ansys.mapdl.core.cli.pymapdl`
germa89 marked this conversation as resolved.
Show resolved Hide resolved


Stop MAPDL instances
====================
MAPDL instances can be stopped by using `launch_mapdl stop` command in the following
way:
You can use the ``pymapdl stop`` command to stop MAPDL instances like this:


.. tab-set::
Expand All @@ -97,15 +96,15 @@ way:

.. code:: pwsh-session

(.venv) PS C:\Users\user\pymapdl> launch_mapdl stop
(.venv) PS C:\Users\user\pymapdl> pymapdl stop
Success: Ansys instances running on port 50052 have been stopped.

.. tab-item:: Linux
:sync: key1

.. code:: console

(.venv) user@machine:~$ launch_mapdl stop
(.venv) user@machine:~$ pymapdl stop
Success: Ansys instances running on port 50052 have been stopped.


Expand All @@ -121,15 +120,15 @@ You can specify the instance running on a different port using `--port` argument

.. code:: pwsh-session

(.venv) PS C:\Users\user\pymapdl> launch_mapdl stop --port 50053
(.venv) PS C:\Users\user\pymapdl> pymapdl stop --port 50053
Success: Ansys instances running on port 50053 have been stopped.

.. tab-item:: Linux
:sync: key1

.. code:: console

(.venv) user@machine:~$ launch_mapdl stop --port 50053
(.venv) user@machine:~$ pymapdl stop --port 50053
Success: Ansys instances running on port 50053 have been stopped.


Expand All @@ -143,15 +142,15 @@ Or an instance with a given process id (PID):

.. code:: pwsh-session

(.venv) PS C:\Users\user\pymapdl> launch_mapdl stop --pid 40952
(.venv) PS C:\Users\user\pymapdl> pymapdl stop --pid 40952
Success: The process with PID 40952 and its children have been stopped.

.. tab-item:: Linux
:sync: key1

.. code:: console

(.venv) user@machine:~$ launch_mapdl stop --pid 40952
(.venv) user@machine:~$ pymapdl stop --pid 40952
Success: The process with PID 40952 and its children have been stopped.
germa89 marked this conversation as resolved.
Show resolved Hide resolved


Expand All @@ -165,15 +164,15 @@ Alternatively, you can stop all the running instances by using:

.. code:: pwsh-session

(.venv) PS C:\Users\user\pymapdl> launch_mapdl stop --all
(.venv) PS C:\Users\user\pymapdl> pymapdl stop --all
Success: Ansys instances have been stopped.

.. tab-item:: Linux
:sync: key1

.. code:: console

(.venv) user@machine:~$ launch_mapdl stop --all
(.venv) user@machine:~$ pymapdl stop --all
Success: Ansys instances have been stopped.


Expand All @@ -191,7 +190,7 @@ If you want to list MAPDL process, just use the following command:

.. code:: pwsh-session

(.venv) PS C:\Users\user\pymapdl> launch_mapdl list
(.venv) PS C:\Users\user\pymapdl> pymapdl list
Name Is Instance Status gRPC port PID
------------ ------------- -------- ----------- -----
ANSYS.exe False running 50052 35360
Expand All @@ -203,7 +202,7 @@ If you want to list MAPDL process, just use the following command:

.. code:: console

(.venv) user@machine:~$ launch_mapdl list
(.venv) user@machine:~$ pymapdl list
Name Is Instance Status gRPC port PID
------------ ------------- -------- ----------- -----
ANSYS.exe False running 50052 35360
Expand All @@ -222,7 +221,7 @@ processes), just type:

.. code:: pwsh-session

(.venv) PS C:\Users\user\pymapdl> launch_mapdl list -i
(.venv) PS C:\Users\user\pymapdl> pymapdl list -i
Name Status gRPC port PID
------------ -------- ----------- -----
ANSYS222.exe running 50052 41644
Expand All @@ -232,7 +231,7 @@ processes), just type:

.. code:: console

(.venv) user@machine:~$ launch_mapdl list -i
(.venv) user@machine:~$ pymapdl list -i
Name Status gRPC port PID
------------ -------- ----------- -----
ANSYS222.exe running 50052 41644
Expand All @@ -251,7 +250,7 @@ argument `--long` or `-l`:

.. code:: pwsh-session

(.venv) PS C:\Users\user\pymapdl> launch_mapdl list -l
(.venv) PS C:\Users\user\pymapdl> pymapdl list -l
Name Is Instance Status gRPC port PID Command line Working directory
------------ ------------- -------- ----------- ----- -------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------
ANSYS.exe False running 50052 35360 C:\Program Files\ANSYS Inc\v222\ANSYS\bin\winx64\ANSYS.EXE -j file -b -i .__tmp__.inp -o .__tmp__.out -port 50052 -grpc C:\Users\User\AppData\Local\Temp\ansys_ahmfaliakp
Expand All @@ -263,7 +262,7 @@ argument `--long` or `-l`:

.. code:: console

(.venv) user@machine:~$ launch_mapdl list -l
(.venv) user@machine:~$ pymapdl list -l
Name Is Instance Status gRPC port PID Command line Working directory
------------ ------------- -------- ----------- ----- ------------------------------------------------------------------------- --------------------------------
ANSYS False running 50052 35360 /ansys_inc/v222/ansys/bin/linx64/ansys -j file -port 50052 -grpc /home/user/temp/ansys_ahmfaliakp
Expand All @@ -286,25 +285,64 @@ After you have activated and installed the package as described
in :ref:`installation`, you can use the converter from your terminal.
Here is how you use the ``pymapdl convert`` command:

.. code:: console

$ pymapdl convert mapdl.dat -o python.py
.. tab-set::

.. tab-item:: Windows
:sync: key1

File mapdl.dat successfully converted to python.py.
.. code:: pwsh-session

(.venv) PS C:\Users\user\pymapdl> pymapdl convert mapdl.dat -o python.py

File mapdl.dat successfully converted to python.py.
germa89 marked this conversation as resolved.
Show resolved Hide resolved


.. tab-item:: Linux
:sync: key1

.. code:: console

(.venv) user@machine:~$ pymapdl convert mapdl.dat -o python.py

File mapdl.dat successfully converted to python.py.

To obtain help on converter usage, options, and examples, type this command:

.. code:: console

$ pymapdl convert --help
.. tab-set::

.. tab-item:: Windows
:sync: key1

.. code:: pwsh-session

(.venv) PS C:\Users\user\pymapdl> pymapdl convert --help


Usage: pymapdl convert [OPTIONS] FILENAME_IN

PyMAPDL CLI tool for converting MAPDL scripts to PyMAPDL scripts.

USAGE:

...


.. tab-item:: Linux
:sync: key1

.. code:: console

Usage: pymapdl convert [OPTIONS] FILENAME_IN
(.venv) user@machine:~$ pymapdl convert --help

Usage: pymapdl convert [OPTIONS] FILENAME_IN

PyMAPDL CLI tool for converting MAPDL scripts to PyMAPDL scripts.
PyMAPDL CLI tool for converting MAPDL scripts to PyMAPDL scripts.

USAGE:
USAGE:

...
...


The ``pymapdl convert`` command uses the
Expand Down
2 changes: 1 addition & 1 deletion doc/source/user_guide/upf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Python language to code user programmable subroutines. A subset of the
documented UPF subroutines support the Python UPF capability. For more information,
see `Supported UPF subroutines`_).

You must install a Python distribution before using this feature. Python 3.8
You must install a Python distribution before using this feature. Python 3.9
through Python 3.12 are supported.

Python UPFs are only supported on Linux.
Expand Down
1 change: 1 addition & 0 deletions doc/styles/Vocab/ANSYS/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ PyAnsys Math
PyDPF-Core
PyDPF-Post
PyMAPDL
pymapdl
Python
QRDAMP
Radiosity
Expand Down
Loading