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

Overall edit of PyPDF-Core files. #452

Merged
merged 13 commits into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ jobs:
- name: "Upload Documentation Build log"
uses: actions/upload-artifact@v3
with:
name: doc-${{inputs.PACKAGE_NAME}}-log
name: doc-${{env.PACKAGE_NAME}}-log
path: docs/*.txt
if: always()

Expand Down Expand Up @@ -379,7 +379,6 @@ jobs:

retro:
name: "Retro-compatibility"
if: startsWith(github.head_ref, 'master') || contains(github.head_ref, 'release') || contains(github.head_ref, 'retro') || startsWith(github.ref, 'refs/tags/v')
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion docs/source/_static/simple_example.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Here's how you would open a result file generated by MAPDL (or another ANSYS solver) and
Here's how you would open a result file generated by Ansys MAPDL (or another Ansys solver) and
extract results:

.. code-block:: default
Expand Down
10 changes: 5 additions & 5 deletions docs/source/api/index.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.. _ref_api_section:

================
APIs
================
=============
API reference
=============
.. toctree::
:maxdepth: 1
:caption: APIs
:maxdepth: 2
:caption: API reference

ansys.dpf.core
2 changes: 1 addition & 1 deletion docs/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ To reach the PyAnsys support team, email `pyansys.support@ansys.com <pyansys.sup
View documentation
------------------
Documentation for the latest stable release of PyDPF-Core is hosted at
`PyDPF-Core Documentation <http://dpfdocs.pyansys.com/>`_.
`PyDPF-Core Documentation <https://dpf.docs.pyansys.com/>`_.
12 changes: 6 additions & 6 deletions docs/source/getting_started/compatibility.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ should also be synchronized with the server version.
:widths: 20 20 20 20 20
:header-rows: 1

* - Ans.Dpf.Grpc.exe server version
- ansys.dpf.gatebin binaries Python package version
- ansys.dpf.gate Python package version
- ansys.grpc.dpf Python package version
- ansys.dpf.core Python package version
* - ``Ans.Dpf.Grpc.exe`` server version
- ``ansys.dpf.gatebin`` binaries Python module version
- ``ansys.dpf.gate`` Python module version
- ``ansys.grpc.dpf`` Python module version
- ``ansys.dpf.core`` Python module version
* - 5.0 (Ansys 2023 R1)
- 0.2.0 and later
- 0.2.0 and later
Expand Down Expand Up @@ -67,6 +67,6 @@ Environment variable
The ``start_local_server`` method uses the ``Ans.Dpf.Grpc.bat`` file or
``Ans.Dpf.Grpc.sh`` file to start the server. Ensure that the ``AWP_ROOT{VER}``
environment variable is set to your installed Ansys version. For example, if Ansys
2022 installation is installed, ensure that the ``AWP_ROOT222`` environment
2022 R2 is installed, ensure that the ``AWP_ROOT222`` environment
variable is set to the path for this Ansys installation.

2 changes: 2 additions & 0 deletions docs/source/getting_started/dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ installed. Package dependencies follow:

- `ansys.dpf.gate <https://pypi.org/project/ansys-dpf-gate/>`_, which is the gate
to the DPF C API or Python gRPC API. The gate depends on the server configuration:

- `ansys.grpc.dpf <https://pypi.org/project/ansys-grpc-dpf/>`_ is the gRPC code
generated from protobuf files.
- `ansys.dpf.gatebin <https://pypi.org/project/ansys-dpf-gatebin/>`_ is the
operating system-specific binaries with DPF C APIs.

- `psutil <https://pypi.org/project/psutil/>`_
- `tqdm <https://pypi.org/project/tqdm/>`_
- `packaging <https://pypi.org/project/packaging/>`_
Expand Down
2 changes: 1 addition & 1 deletion docs/source/getting_started/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Install the DPF image


Note that the preceding command shares the current directory to the ``/dpf``
directory contained within the image. This is necessary as the DPF
directory contained within the image. This is necessary as the DPF
binary within the image must access the files within the image
itself. Any files that you want to have DPF read must be placed in
``pwd``. You can map other directories as needed, but these
Expand Down
5 changes: 2 additions & 3 deletions docs/source/getting_started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ Ansys 2021 R1 or later. For more information on getting a licensed copy of Ansys
visit the `Ansys website <https://www.ansys.com/>`_.

.. toctree::
:hidden:
:maxdepth: 2

:maxdepth: 3

compatibility
install
dependencies
Expand Down
91 changes: 26 additions & 65 deletions docs/source/getting_started/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,92 +4,53 @@
Installation
************

PIP installation
----------------
Install using ``pip``
---------------------

To use PyDPF-Core with Ansys 2021 R2 or later, install the latest version
of PyDPF-Core with:
`pip <https://pypi.org/project/pip/>`_ is the package installer for Python.

To use PyDPF-Core with Ansys 2021 R2 or later, install teh latest version
with:

.. code::

pip install ansys-dpf-core


To use PyDPF-Core with Ansys 2021 R1, install a 0.2.* PyDPF-Core version with:
To use PyDPF-Core with Ansys 2021 R1, install the latest version
with:

.. code::

pip install ansys-dpf-core<0.3.0


Wheel file installation
-----------------------
If you are unable to install PyDPF-Core on the host machine due to
network isolation, download the latest wheel file or the wheel file
for a specific release from `PyDPF-Core
GitHub <https://github.com/pyansys/pydpf-core/releases>`_ or
`PyDPF-Core PyPi <https://pypi.org/project/ansys-dpf-core/>`_.

Tryout installation
-------------------

For a quick tryout installation, use:

.. code-block:: default

from ansys.dpf.core import Model
from ansys.dpf.core import examples
model = Model(examples.simple_bar)
print(model)
Install using a wheel file
--------------------------

If you are unable to install PyDPF-Post on the host machine due to
network isolation, download the latest wheel file from `PyDPF-Post
GitHub <https://github.com/pyansys/pydpf-post>`_ or
`PyDPF-Post PyPi <https://pypi.org/project/ansys-dpf-post/>`_.

Install for a quick tryout
--------------------------

.. rst-class:: sphx-glr-script-out
For a quick tryou, use:

Out:

.. code-block:: none
.. code::

DPF Model
------------------------------
Static analysis
Unit system: Metric (m, kg, N, s, V, A)
Physics Type: Mechanical
Available results:
- displacement: Nodal Displacement
- element_nodal_forces: ElementalNodal Element nodal Forces
- elemental_volume: Elemental Volume
- stiffness_matrix_energy: Elemental Energy-stiffness matrix
- artificial_hourglass_energy: Elemental Hourglass Energy
- thermal_dissipation_energy: Elemental thermal dissipation energy
- kinetic_energy: Elemental Kinetic Energy
- co_energy: Elemental co-energy
- incremental_energy: Elemental incremental energy
- structural_temperature: ElementalNodal Temperature
------------------------------
DPF Meshed Region:
3751 nodes
3000 elements
Unit: m
With solid (3D) elements
------------------------------
DPF Time/Freq Support:
Number of sets: 1
Cumulative Time (s) LoadStep Substep
1 1.000000 1 1

from ansys.dpf.core import Model
from ansys.dpf.core import examples
model = Model(examples.simple_bar)
print(model)


Development mode installation
-----------------------------
Install in development mode
---------------------------

If you want to edit and potentially contribute to PyDPF-Core,
clone the repository and install it using pip with the ``-e``
clone the repository and install it using ``pip`` with the ``-e``
development flag:

.. code::

git clone https://github.com/pyansys/pydpf-core
cd pydpf-core
pip install -e .

.. include:: ../pydpf-post_clone_install.rst
Binary file modified docs/source/images/drawings/Workflow2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 33 additions & 20 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
PyDPF-Core
==========

The Data Processing Framework (**DPF**) provides numerical simulation
The Data Processing Framework (DPF) provides numerical simulation
users and engineers with a toolbox for accessing and transforming simulation
data. With DPF, you can perform complex preprocessing or postprocessing of
large amounts of simulation data within a simulation workflow.

DPF is an independent, physics-agnostic tool that you can plug into many
apps for both data input and data output, including visualization and
result plots.It can access data from solver result files and other neutral
result plots. It can access data from solver result files and other neutral
formats, such as CSV, HDF5, and VTK files.

Using the many DPF operators that are available, you can manipulate and
Expand All @@ -23,53 +23,66 @@ a modular and easy-to-use tool with a large range of capabilities.

.. image:: images/drawings/dpf-flow.png
:width: 670
:alt: DPF FLow
:alt: DPF flow

The ``ansys.dpf.core`` package provides a Python interface to DPF, enabling
rapid postprocessing of a variety of Ansys file formats and physics solutions
without ever leaving the Python environment.


Brief demo
~~~~~~~~~~
Here is how you open a result file generated by MAPDL (or another ANSYS solver)
and extract results:

.. code:: python

>>> from ansys.dpf.core import Model
>>> from ansys.dpf.core import examples
>>> model = Model(examples.simple_bar)
>>> print(model)


.. include:: _static/simple_example.rst
Here is how you plot displacement results:

For comprehesive demos, see :ref:`gallery`.
.. code:: python

>>> disp = model.results.displacement().X()
model.metadata.meshed_region.plot(disp.outputs.fields_container())

For comprehensive demos, see :ref:`gallery`.


Key features
~~~~~~~~~~~~

**Computation efficiency**
**Computational efficiency**

DPF is a modern framework based on new hardware architectures.
Thanks to continued development, new capabilities are frequently added.
DPF is a modern framework based on new hardware architectures. Thanks
to continued development, new capabilities are frequently added.

**Generic interface**

DPF is physics-agnostic, which means that its use is not limited to a
particular field, physics solution, or file format.
DPF is physics-agnostic, which means that its use is not limited to a particular
field, physics solution, or file format.

**Extensibility and customization**

DPF is developed around two core entities:
DPF is developed around two core entities:

- Data represented as a *field*
- An *operator* to act upon this data
- An *operator* to act upon this data

Each DPF capability is developed through operators that allow for
componentization of the framework. Because DPF is plugin-based, new
features or formats can be easily added.
Each DPF capability is developed through operators that allow for componentization
of the framework. Because DPF is plugin-based, new features or formats can be easily added.


.. toctree::
:hidden:
:maxdepth: 2

:caption: Getting Started
:hidden:

getting_started/index
user_guide/index
api/index
operator_reference
examples/index
contributing
2 changes: 1 addition & 1 deletion docs/source/operator_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Operators
=========

Loading operators...
Loading operators.

.. raw:: html

Expand Down
Loading