Skip to content

Commit bdb8b52

Browse files
committed
Merge remote-tracking branch 'origin/updatedoc'
2 parents f7efe7b + 2a5c72d commit bdb8b52

File tree

6 files changed

+432
-154
lines changed

6 files changed

+432
-154
lines changed

README.rst

Lines changed: 3 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ directories:
1818
LS-DYNA is running in a container environment such as Docker or
1919
Kubernetes. The code in the ``solver`` directory allows you to push
2020
input files to the container, start LS-DYNA and monitor its progress,
21-
and then retrieve results (RST) files.
21+
and then retrieve results (RST) files.`
2222

2323
Once you have results, you can use the Ansys Data Processing Framework (DPF),
2424
which is designed to provide numerical simulation users and engineers
@@ -32,121 +32,6 @@ a simplified Python interface to DPF, thus enabling rapid postprocessing
3232
without ever leaving a Python environment. For more information on DPF-Post,
3333
see the `DPF-Post documentation <https://post.docs.pyansys.com>`_.
3434

35-
Installation
36-
============
37-
To use PyDYNA, you must install Docker images for the ``pre`` and ``solver``
38-
services and the package.
39-
40-
Install Docker image for the ``pre`` service
41-
--------------------------------------------
42-
To launch the ``pre`` service locally, you must have Docker installed
43-
on your machine.
44-
45-
.. caution::
46-
47-
The ``pre`` service is available only as a Linux Docker image.
48-
Make sure that your Docker engine is configured to run Linux Docker images.
49-
50-
For information on installing the Docker container for the ``pre`` service,
51-
see the ``README.rst`` file in the repository's ``docker/pre`` directory.
52-
53-
Install Docker image for the ``solver`` service
54-
-----------------------------------------------
55-
Once you install the ``ansys.dyna.core`` package, you can find the
56-
``docker-compose.yml`` file in the repository's ``docker`` directory.
57-
This file is used to build and launch the ``solver`` service.
58-
59-
You can copy this YML file locally and run the Docker image for the
60-
``solver`` service with this command:
61-
62-
.. code:: bash
63-
64-
docker-compose up
65-
66-
67-
Install the package
68-
-------------------
69-
The ``ansys.dyna.core`` package supports Python 3.8 through
70-
Python 3.11 on Windows, Linux, and MacOS.
71-
72-
You should consider installing PyDYNA in a virtual environment.
73-
For more information, see Python's
74-
`venv -- Creation of virtual environments <https://docs.python.org/3/library/venv.html>`_.
75-
76-
PyDYNA has three installation modes: user, developer, and offline.
77-
78-
Install in user mode
79-
~~~~~~~~~~~~~~~~~~~~
80-
81-
Before installing PyDYNA in user mode, make sure you have the latest version of
82-
`pip`_ with this command:
83-
84-
.. code:: bash
85-
86-
python -m pip install -U pip
87-
88-
Then, install PyDYNA with this command:
89-
90-
.. code:: bash
91-
92-
python -m pip install ansys-dyna-core
93-
94-
.. caution::
95-
96-
PyDYNA is currently hosted in a private PyPI repository. You must provide the index
97-
URL to the private PyPI repository: ``https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/``.
98-
99-
If access to this package registry is needed, email `[email protected] <mailto:[email protected]>`_
100-
to request access. The PyAnsys team can provide you with a read-only token.
101-
102-
Once you have the token, run this command, replacing ``${PRIVATE_PYPI_ACCESS_TOKEN}`` with the
103-
read-only token:
104-
105-
.. code:: bash
106-
107-
pip install ansys-dyna-core --index-url=https://${PRIVATE_PYPI_ACCESS_TOKEN}@pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/
108-
109-
Install in developer mode
110-
~~~~~~~~~~~~~~~~~~~~~~~~~
111-
112-
Installing PyDYNA in developer mode allows you to modify the source and enhance it.
113-
114-
.. note::
115-
116-
Before contributing to the project, ensure that you are thoroughly familiar
117-
with the `PyAnsys Developer's Guide`_.
118-
119-
Start by cloning and installing the repository with these commands:
120-
121-
.. code::
122-
123-
git clone https://github.com/pyansys/pyDyna
124-
cd pyDyna
125-
pip install -e .
126-
127-
Install in offline mode
128-
~~~~~~~~~~~~~~~~~~~~~~~
129-
130-
If you lack an internet connection on your installation machine (or you do not have access
131-
to the private Ansys PyPI packages repository), you should install PyDYNA by downloading
132-
the wheelhouse archive for your corresponding machine architecture from the
133-
`Releases Page <https://github.com/pyansys/pydyna/releases>`_.
134-
135-
Each wheelhouse archive contains all the Python wheels necessary to install
136-
PyDYNA from scratch on Windows and Linux for Python 3.8 through 3.11. You can install
137-
PyDYNA on an isolated system with a fresh Python installation or on a virtual environment.
138-
139-
For example, on Linux with Python 3.8, unzip the wheelhouse archive and install PyDYNA
140-
with these commands:
141-
142-
.. code:: bash
143-
144-
unzip ansys-dyna-core-v0.3.dev0-wheelhouse-Linux-3.8.zip -d wheelhouse
145-
pip install ansys-dyna-core -f wheelhouse --no-index --upgrade --ignore-installed
146-
147-
If you're on Windows with Python 3.8, unzip thw wheelhouse archive to a ``wheelhouse``
148-
directory and install PyDYNA using the preceding command.
149-
15035
Documentation
15136
=============
15237
For comprehesive information on PyDYNA, see the latest release
@@ -247,9 +132,9 @@ Here is a basic solving example:
247132
248133
>>> import ansys.dyna.core.solver as solver
249134
>>> dyna=solver.DynaSovler(hostname,port) # connect to the container
250-
>>> dyna.push("input.k") # push an input file
135+
>>> dyna.push("cylinder_flow.k") # push an input file
251136
>>> dyna.start(4) # start 4 ranks of mppdyna
252-
>>> dyna.run("i=input.k memory=10m ncycle=20000") # begin execution
137+
>>> dyna.run("i=cylinder_flow.k memory=10m ncycle=20000") # begin execution
253138
254139
Here is a basic postprocessing example:
255140

doc/source/getting-started/index.rst

Lines changed: 71 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,49 +8,95 @@ the `Ansys LS-DYNA <https://www.ansys.com/products/structures/ansys-ls-dyna>`_
88
page on the Ansys website.
99

1010
Installation
11-
------------
11+
============
12+
To use PyDYNA, you must install Docker images for the ``pre`` and ``solver``
13+
services and the package.
1214

15+
Install Docker image for the ``pre`` service
16+
--------------------------------------------
17+
To launch the ``pre`` service locally, you must have Docker installed
18+
on your machine.
19+
20+
.. caution::
21+
22+
The ``pre`` service is available only as a Linux Docker image.
23+
Make sure that your Docker engine is configured to run Linux Docker images.
24+
25+
For information on installing the Docker container for the ``pre`` service,
26+
see the ``README.rst`` file in the repository's ``docker/pre`` directory.
27+
28+
Install Docker image for the ``solver`` service
29+
-----------------------------------------------
30+
For information on installing the Docker container for the ``solver`` service,
31+
see the ``README.rst`` file in the repository's ``docker/solver`` directory.
32+
33+
Install the package
34+
-------------------
1335
The ``ansys.dyna.core`` package supports Python 3.8 through
1436
Python 3.11 on Windows, Linux, and MacOS.
1537

1638
You should consider installing PyDYNA in a virtual environment.
1739
For more information, see Python's
1840
`venv -- Creation of virtual environments <https://docs.python.org/3/library/venv.html>`_.
1941

20-
Install the latest release from `PyPI <pydyna_pypi_>`_ with this
21-
command:
42+
PyDYNA has three installation modes: user, developer, and offline.
2243

23-
.. code:: console
44+
Install in user mode
45+
~~~~~~~~~~~~~~~~~~~~
2446

25-
pip install ansys-dyna-core
47+
Before installing PyDYNA in user mode, make sure you have the latest version of
48+
`pip`_ with this command:
2649

27-
Alternatively, install the latest release from the
28-
`GitHub repository <pydyna_repo_>`_ with this command:
50+
.. code:: bash
2951
30-
.. code:: console
31-
32-
pip install git+https://github.com/pyansys/pydyna.git
52+
python -m pip install -U pip
53+
54+
Then, install PyDYNA with this command:
55+
56+
.. code:: bash
57+
58+
python -m pip install ansys-dyna-core
59+
60+
.. caution::
61+
62+
PyDYNA is currently hosted in a private PyPI repository. You must provide the index
63+
URL to the private PyPI repository: ``https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/``.
64+
65+
If access to this package registry is needed, email `[email protected] <mailto:[email protected]>`_
66+
to request access. The PyAnsys team can provide you with a read-only token.
67+
68+
Once you have the token, run this command, replacing ``${PRIVATE_PYPI_ACCESS_TOKEN}`` with the
69+
read-only token:
70+
71+
.. code:: bash
72+
73+
pip install ansys-dyna-core --index-url=https://${PRIVATE_PYPI_ACCESS_TOKEN}@pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/
74+
75+
Install in developer mode
76+
~~~~~~~~~~~~~~~~~~~~~~~~~
77+
78+
Installing PyDYNA in developer mode allows you to modify the source and enhance it.
79+
80+
.. note::
3381

34-
If you plan on doing local *development* of PyDYNA with Git,
35-
install the latest ``ansys-dyna.core`` package with these
36-
commands:
82+
Before contributing to the project, ensure that you are thoroughly familiar
83+
with the `PyAnsys Developer's Guide`_.
3784

38-
.. code:: console
85+
Start by cloning and installing the repository with these commands:
3986

40-
git clone https://github.com/pyansys/pydyna.git
41-
cd pydyna
87+
.. code::
88+
89+
git clone https://github.com/pyansys/pyDyna
90+
cd pyDyna
4291
pip install -e .
4392
44-
The preceding commands clone and install the package, allowing you to modify it
45-
locally. After restarting the Python kernel, your changes are reflected in your
46-
Python setup.
93+
Install in offline mode
94+
~~~~~~~~~~~~~~~~~~~~~~~
4795

48-
Offline installation
49-
~~~~~~~~~~~~~~~~~~~~
5096
If you lack an internet connection on your installation machine (or you do not have access
5197
to the private Ansys PyPI packages repository), you should install PyDYNA by downloading
5298
the wheelhouse archive for your corresponding machine architecture from the
53-
`Releases <https://github.com/pyansys/pydyna/releases>`_ page.
99+
`Releases Page <https://github.com/pyansys/pydyna/releases>`_.
54100

55101
Each wheelhouse archive contains all the Python wheels necessary to install
56102
PyDYNA from scratch on Windows and Linux for Python 3.8 through 3.11. You can install
@@ -59,16 +105,14 @@ PyDYNA on an isolated system with a fresh Python installation or on a virtual en
59105
For example, on Linux with Python 3.8, unzip the wheelhouse archive and install PyDYNA
60106
with these commands:
61107

62-
.. code:: console
108+
.. code:: bash
63109
64-
unzip ansys-dyna-core-v0.3.1-wheelhouse-ubuntu-latest-3.8.zip wheelhouse
65-
pip install ansys-dyna-core -f wheelhouse --no-index --upgrade --ignore-installed
110+
unzip ansys-dyna-core-v0.3.dev0-wheelhouse-Linux-3.8.zip -d wheelhouse
111+
pip install ansys-dyna-core -f wheelhouse --no-index --upgrade --ignore-installed
66112
67113
If you're on Windows with Python 3.8, unzip the wheelhouse archive to a ``wheelhouse``
68114
directory and install PyDYNA using the preceding command.
69115

70-
.. include:: ../../../docker/pre/README.rst
71-
.. include:: ../../../docker/solver/README.rst
72116

73117
.. LINKS
74118
.. _pydyna_pypi: https://pypi.org/projects/ansys-dyna-core/

0 commit comments

Comments
 (0)