Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
64074f7
Add Accessing and enriching DPF capabilities section on introduction
anslpa Jun 26, 2023
93ead94
Fix apply_server in getting_started_with_dpf_server
anslpa Jun 26, 2023
3f7d232
Update compatibility
anslpa Jun 26, 2023
711076d
update
anslpa Jun 26, 2023
015dad8
Update github way of using
anslpa Jun 26, 2023
0562893
Fix vale
anslpa Jun 26, 2023
12a1e5d
fix vale compatibility
anslpa Jun 26, 2023
a159524
Update link
anslpa Jun 27, 2023
8d68877
Update wayofusing
anslpa Jun 27, 2023
d3703d3
Fix way of using
anslpa Jun 27, 2023
b3ad7ee
Update ways of using
anslpa Jun 27, 2023
e64252c
Update ways of using
anslpa Jun 27, 2023
1341fc8
Update docs/source/concepts/waysofusing.rst
anslpa Jun 27, 2023
f07e1f7
Update docs/source/concepts/waysofusing.rst
anslpa Jun 27, 2023
45ca690
Update docs/source/concepts/waysofusing.rst
anslpa Jun 27, 2023
94212b0
Update docs/source/concepts/waysofusing.rst
anslpa Jun 27, 2023
af05d8c
Update docs/source/concepts/waysofusing.rst
anslpa Jun 27, 2023
ef32875
Update docs/source/concepts/waysofusing.rst
anslpa Jun 27, 2023
3f16f11
Update docs/source/concepts/waysofusing.rst
anslpa Jun 27, 2023
5592d15
Update docs/source/concepts/waysofusing.rst
anslpa Jun 27, 2023
961854a
Update docs/source/concepts/waysofusing.rst
anslpa Jun 27, 2023
c62e816
Update docs/source/concepts/waysofusing.rst
anslpa Jun 27, 2023
d5356ff
Update docs/source/getting_started/compatibility.rst
anslpa Jun 27, 2023
f5bcfe1
Update docs/source/index.rst
anslpa Jun 27, 2023
8740134
Update docs/source/index.rst
anslpa Jun 27, 2023
4992c73
Update docs/source/index.rst
anslpa Jun 27, 2023
b3f2bc3
Update docs/source/index.rst
anslpa Jun 27, 2023
8e80cf5
Update docs/source/index.rst
anslpa Jun 27, 2023
2b27175
Update docs/source/index.rst
anslpa Jun 27, 2023
0957cbf
Update docs/source/index.rst
anslpa Jun 27, 2023
98a0acd
Update docs/source/index.rst
anslpa Jun 27, 2023
736869d
Update docs/source/index.rst
anslpa Jun 27, 2023
7b96022
Update
anslpa Jun 27, 2023
4ffe2dc
Merge branch 'doc/introduction/doc_pages' of https://github.com/pyans…
anslpa Jun 27, 2023
005b0a1
Fix vale
anslpa Jun 27, 2023
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
83 changes: 69 additions & 14 deletions docs/source/concepts/waysofusing.rst
Original file line number Diff line number Diff line change
@@ -1,26 +1,81 @@
.. _user_guide_waysofusing:

=======================
DPF scripting languages
=======================
DPF is available as a standalone tool and as a tool in Ansys Mechanical.
Each one uses a different language for scripting, so you should decide
whether you want to use standalone DPF or DPF in Mechanical before
creating any scripts.

CPython
-------
Standalone DPF uses CPython and can be accessed with any Python console.
========================================
DPF capabilities and scripting languages
========================================

DPF as a Framework enabling data computation capabilities
---------------------------------------------------------

DPF application: kernel and operator's libraries
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

DPF is a framework that provides data computation capabilities. These capabilities are provided
through libraries of operators. To learn more about the computed data and the operator concepts, see :ref:`user_guide_concepts`.

A DPF application is always composed of a kernel (DataProcessingCore and DPFClientAPI binaries),
that enables capabilities by loading libraries of operators (for example, mapdlOperatorsCore library
is basic library enabled by DPF).
This application is also called a **DPF Server application**.

When starting a DPF application, you can customize the list of operator's libraries that the kernel loads.
To learn more on how to customize the initialization of a DPF application, see :ref:`user_guide_xmlfiles`.

DPF client: available APIs and languages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

DPF is a framework that provides data computation capabilities. These capabilities are
enabled using the DPF Server application.
These capabilities can be accessed through client APIs, as shown here:

.. image:: ../images/drawings/apis_2.png



1. DPF server application can be accessed using Ansys Inc product, or DPF Server package (see :ref:`ref_getting_started_with_dpf_server`) available on the Customer portal.

2. Several client APIs are available (CPython, IronPython, C++, and so on).

3. Communication in the same process, or through gRPC, allows you to have the client and the servers on different machines.

Note that **IronPython and CPython APIs are different**, each has specific syntax.

The **list of available operators when using DPF is independent from the language or API which is used**, it only depends
on how the DPF application has been initialized.

Most of the DPF capabilities can be accessed using the operators. For more information about the existing operators, see the **Operators** tab.

Enhance DPF capabilities
~~~~~~~~~~~~~~~~~~~~~~~~

The available DPF capabilities loaded in a DPF application can be enhanced by creating new operator's libraries.
DPF offers multiple development APIs depending on your environment. These plugins can be:

- CPython based (see :ref:`user_guide_custom_operators`)

- C++ based (see C++ documentation)

DPF integration
---------------
DPF is available as a standalone tool and as a tool in Ansys Mechanical. You should decide whether you want
to use standalone DPF or DPF in Mechanical before creating any scripts.

DPF as a standalone application
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

**Standalone DPF** can be used through any of the previously mentioned APIs.

In particular, DPF Standalone capabilities can be enabled using **CPython** and can be accessed via any Python console.
Data can be exported to universal file formats, such as VTK, HDF5, and TXT
files. You can use it to generate TH-plots, screenshots, and animations or
to create custom result plots using the `numpy <https://numpy.org/>`_
and `matplotlib <https://matplotlib.org/>`_ packages.

.. image:: ../images/drawings/dpf-reports.png

IronPython
----------
DPF in Mechanical uses IronPython and is accessible with the **ACT Console**.
Mechanical
~~~~~~~~~~
**DPF in Mechanical** uses IronPython and is accessible with the **ACT Console**.
Use it to perform custom postprocessing and visualization of results directly
within the Mechanical application.

Expand Down
9 changes: 8 additions & 1 deletion docs/source/getting_started/compatibility.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ version 0.3.0 or later. With Ansys 2021 R1, you must use a PyDPF-Core 0.2
version.

As new features are developed, every attempt is made to ensure backward
compatibility from the client to the server.
compatibility from the client to the server. Backward compatibility is ensured for
the 4 latest Ansys versions. For example, ansys-dpf-core module with 0.8.0 version has been
developed for Ansys 2023 R2 pre1 release, for 2023 R2 Ansys version. It is compatible with
2023 R2, 2023 R1, 2022 R2 and 2022 R1 Ansys versions.

**Ansys strongly encourages you to use the latest packages available**, as far they are compatible
with the Server version you want to use. Using Ansys 2022 R2, if ansys-dpf-core module with
0.8.0 version is the latest available package, it should be used.

The `ansys.grpc.dpf <https://pypi.org/project/ansys-grpc-dpf/>`_ package
should also be synchronized with the server version.
Expand Down
Binary file added docs/source/images/drawings/apis_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,53 @@ DPF is developed around two core entities:
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.

Accessing and enriching DPF capabilities
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Most of the DPF capabilities can be accessed using the operators.
For more information about the existing operators, see the **Operators** tab.

The following sections are summaries. For more detailed content, see :ref:`user_guide_waysofusing`.

**Accessing DPF Server files**

DPF capabilities are accessible when DPF Server files are available. These files can be accessed using:

- The **Ansys installer**. To use it, download the standard installation using your preferred distribution channel,
and install Ansys following the installer instructions. For information on getting a licensed copy of Ansys,
visit the `Ansys website <https://www.ansys.com/>`_.

- The DPF Server package (see :ref:`ref_getting_started_with_dpf_server`).
It is independent of the Ansys installer.

**Accessing capabilities with scripting**

- C++ documentation:

1. The Data Processing Framework section in `Platform panel <https://ansysapi.ansys.com/account/secured?returnurl=/Views/Secured/main_page.html?lang=en>`_.

2. `Developer Portal <https://developer.ansys.com/product/DPF-Server-Client-Library/index.xhtml>`_

- CPython modules documentation:

1. `ansys-dpf-core <https://dpf.docs.pyansys.com/version/stable/>`_

2. `ansys-dpf-post <https://post.docs.pyansys.com/version/stable/>`_

- Mechanical scripting (IronPython):

1. `DPF through Automation Scripting <https://ansysproducthelpdev.win.ansys.com/account/secured?returnurl=/Views/Secured/corp/v231/en/act_script/mech_apis_data_process_frame.html>`_

2. `Python Result object <https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v231/en/wb_sim/ds_python_result.html>`_

**Enriching DPF capabilities**

- C++ operator's library (see C++ documentation)

- `C++ solver reader plugin <https://astonishing-hyacinth-e64.notion.site/How-to-write-a-new-solver-reader-as-a-DPF-s-plugin-bd2d2a3cf51f47ef9e70df45d64f89cb>`_

- :ref:`user_guide_custom_operators`


.. toctree::
:maxdepth: 2
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user_guide/getting_started_with_dpf_server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ To update the context, apply a new server context:

.. code::

dpf.apply_server_context(dpf.AvailableServerContexts.premium)
server.apply_context(dpf.AvailableServerContexts.premium)

.. _target_to_ansys_license_increments_list:

Expand Down