Skip to content

Commit 839f56e

Browse files
Add plotting tutorials to the main tutorials branch (#1903)
* add new basic tutorial and jupyter_ sphinx extension * add "plotting meshes" example * add files for the others examples * update index page for plotting tuts * add "plotting data on the meshe" example * update "plotting data on the meshe" example * updates * updates on the index page of the plotting section * updates * add plotting_data_on_specific_placements.rst tut * updates * add plotting_a_graph.rst tut * updates * add plot meshes container in plotting_meshes.rst tutorial * add plot meshes container in plotting_meshes.rst tutorial update * add plotting_data_on_deformed_mesh.rst tutorial * updates * erase the adapted examples * add separate plotting_data_on_geometry_elements.rst and plotting_data_on_specific_path.rst tutorials * update substitution text * use only the jupyter sphinx extension * updates the examples package references * update the plotting_meshes.rst to the tutorials guidelines * update the text of the plotting_meshes.rst to the tutorial * update the plotting_data_on_the_mesh.rst to the tutorials guidelines * update the text of the plotting_meshes.rst tutorial * updates the text of the plotting_data_on_the_mesh.rst tutorial * updates the text of the plotting_data_on_the_mesh.rst tutorial * add the plotting_deformed_meshes.rst tutorial * update the plotting_data_on_the_mesh.rst to the tutorials guidelines * update the plotting_meshes.rst to the tutorials guidelines * update the plotting_data_on_specific_path.rst to the tutorials guidelines * update the plotting_data_on_deformed_mesh.rst to the tutorials guidelines * update the plotting_data_on_geometry_elements.rst to the tutorials guidelines * update the plotting_a_graph.rst to the tutorials guidelines * add new links and substitution text to the links_and_refs.rst file * update the card of the plotting a graph tutorial in the index.rst page * delete file basic_tutorial.rst * Revert "erase the adapted examples" This reverts commit a2b474b. * Apply suggestions from code review Co-authored-by: Paul Profizi <[email protected]> * updates the files names, references and titles * updates the download buttons * updates the text of the plot_mesh.rst tutorial * updates the text of the plot_deformed_mesh.rst tutorial * updates the text of the plot_data_on_a_mesh.rst tutorial * updates the text of the plot_data_on_custom_geometry.rst tutorial * updates the text of the plot_data_on_custom_path.rst tutorial * Changes to tutorials/plot/index.rst * Changes to tutorials/plot/index.rst * Reword transform data tutorials * Rework plot_a_graph.rst * Fix create_a_mesh_from_scratch.rst * Finish plot_a_graph.rst * Update plot_mesh.rst * Update plot_mesh.rst switch example file * Update mesh plot tutorials * Fix reference to plot_data_on_a_mesh.rst * Refactor plot tutorials list -> one tutorial for contours, one for deformation * Refactor plot tutorials list -> one tutorial for contours, one for deformation * Rework plot_mesh.rst, plot_deformed_mesh.rst, and plot_contour.rst * Fixes to links in plot_a_graph.rst * Remove plot_data_on_custom_path.rst from plot tutorials (it is a mapping tutorial) * Remove plot_data_on_custom_geometry.rst from plot tutorials (it is a mapping tutorial) --------- Co-authored-by: Paul Profizi <[email protected]> Co-authored-by: PProfizi <[email protected]>
1 parent 31d7034 commit 839f56e

File tree

11 files changed

+1051
-85
lines changed

11 files changed

+1051
-85
lines changed

doc/source/links_and_refs.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
.. Other libraries repos
3434
.. _pyvista_github : https://github.com/pyvista/pyvista
35+
.. _matplotlib_github : https://github.com/matplotlib/matplotlib
3536

3637
.. External links
3738
.. _sphinx: https://www.sphinx-doc.org/en/master/

doc/source/user_guide/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Troubleshooting
6262
tutorials/post_processing_basics/index.rst
6363
tutorials/import_data/index.rst
6464
tutorials/mesh/index.rst
65-
tutorials/transform_data/index.rst
65+
tutorials/operators_and_workflows/index.rst
6666
tutorials/export_data/index.rst
6767
tutorials/plot/index.rst
6868
tutorials/animate/index.rst

doc/source/user_guide/tutorials/index.rst

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ of our package background so you can understand how to work with it.
5050
transform simulation data into output data that can be used to
5151
visualize and analyze simulation results.
5252

53-
:fa:`book-open-reader` Features usage
54-
*************************************
53+
:fa:`book-open-reader` Common topics
54+
************************************
5555

5656
.. grid:: 1 1 3 3
5757
:gutter: 2
@@ -72,12 +72,12 @@ of our package background so you can understand how to work with it.
7272

7373
Learn how to explore a mesh in DPF.
7474

75-
.. grid-item-card:: Transform data with PyDPF-Core
76-
:link: ref_tutorials_transform_data
75+
.. grid-item-card:: Manipulate data with operators and workflows
76+
:link: ref_tutorials_operators_and_workflows
7777
:link-type: ref
7878
:text-align: center
7979

80-
Learn how to transform and operate on data to obtain the desired input.
80+
Learn how to use operators to process your data and build workflows.
8181

8282
.. grid-item-card:: Export data from DPF
8383
:link: ref_tutorials_export_data
@@ -100,6 +100,21 @@ of our package background so you can understand how to work with it.
100100

101101
Explore the different approaches to visualise the data in an animation.
102102

103+
.. grid-item-card:: Mathematical operations
104+
:link: ref_tutorials_mathematics
105+
:link-type: ref
106+
:text-align: center
107+
108+
Learn how to do mathematical operations using PyDPF-Core and data structures
109+
110+
.. grid-item-card:: Manipulating physics data
111+
:link: ref_tutorials_manipulate_physics_data
112+
:link-type: ref
113+
:text-align: center
114+
115+
Learn how to manipulate the physics data associate to a
116+
data storage structure. (Unit, homogeneity ...)
117+
103118
.. grid-item-card:: Enriching DPF capabilities
104119
:link: ref_tutorials_enriching
105120
:link-type: ref
@@ -126,19 +141,4 @@ of our package background so you can understand how to work with it.
126141
:link-type: ref
127142
:text-align: center
128143

129-
Understand how to access the Entry and Premium licensing capabilities
130-
131-
.. grid-item-card:: Mathematical operations
132-
:link: ref_tutorials_mathematics
133-
:link-type: ref
134-
:text-align: center
135-
136-
Learn how to do mathematical operations using PyDPF-Core API and data structures
137-
138-
.. grid-item-card:: Manipulating physics data
139-
:link: ref_tutorials_manipulate_physics_data
140-
:link-type: ref
141-
:text-align: center
142-
143-
Learn how to manipulate the physics data associate to a
144-
data storage structure. (Unit, homogeneity ...)
144+
Understand how to access the Entry and Premium licensing capabilities

doc/source/user_guide/tutorials/mesh/create_a_mesh_from_scratch.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Here, we create a function that will find this connectivity.
5959

6060
def search_sequence_numpy(arr, node):
6161
"""Find the node location in an array of nodes and return its index."""
62-
indexes = np.isclose(arr, seq)
62+
indexes = np.isclose(arr, node)
6363
match = np.all(indexes, axis=1).nonzero()
6464
return int(match[0][0])
6565

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
.. _ref_tutorials_operators_and_workflows:
2+
3+
=========================================
4+
Process data with operators and workflows
5+
=========================================
6+
7+
An operator is the main object used to create, transform, and stream data in DPF.
8+
9+
They can perform different modifications of the data: direct mathematical operations,
10+
averaging on the mesh, changes in the model locations.... They can also be chained together
11+
to create workflows for more complex operations and customizable results.
12+
13+
The tutorials in this section present how to create and use these operators and workflows in PyDPF-Core.
14+
15+
For more information on how to program with PyDPF-Core check the
16+
:ref:`ref_tutorials_language_and_usage` tutorial.
17+
18+
19+
.. grid:: 1 1 3 3
20+
:gutter: 2
21+
:padding: 2
22+
:margin: 2
23+
24+
.. grid-item-card:: Use operators
25+
:link: ref_tutorials
26+
:link-type: ref
27+
:text-align: center
28+
29+
This tutorial
30+
31+
.. grid-item-card:: Create workflows
32+
:link: ref_tutorials
33+
:link-type: ref
34+
:text-align: center
35+
36+
This tutorial
37+
38+
.. toctree::
39+
:maxdepth: 2
40+
:hidden:
41+

doc/source/user_guide/tutorials/plot/index.rst

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,46 @@
44
Plot
55
====
66

7-
These tutorials demonstrate some different approaches to visualise the data in plots.
7+
These tutorials demonstrate different ways one can visualize the data in plots using PyDPF-Core.
88

99
.. grid:: 1 1 3 3
1010
:gutter: 2
1111
:padding: 2
1212
:margin: 2
1313

14-
.. grid-item-card:: Plotting meshes
15-
:link: ref_tutorials
14+
.. grid-item-card:: Plot a mesh
15+
:link: ref_tutorials_plot_mesh
1616
:link-type: ref
1717
:text-align: center
1818

19-
This tutorial
19+
This tutorial shows several ways to plot meshes.
2020

21-
.. grid-item-card:: Plotting data on the mesh
22-
:link: ref_tutorials
21+
.. grid-item-card:: Add deformation
22+
:link: ref_tutorials_plot_deformed_mesh
2323
:link-type: ref
2424
:text-align: center
2525

26-
This tutorial
26+
This tutorial shows how to add deformation to plots.
2727

28-
.. grid-item-card:: Plotting data on specific placements
29-
:link: ref_tutorials
28+
.. grid-item-card:: Plot contours
29+
:link: ref_tutorials_plot_contour
3030
:link-type: ref
3131
:text-align: center
3232

33-
This tutorial
33+
This tutorial shows how to plot contours.
3434

35-
.. grid-item-card:: Plotting a graph
36-
:link: ref_tutorials
35+
.. grid-item-card:: Plot a graph
36+
:link: ref_tutorials_plot_graph
3737
:link-type: ref
3838
:text-align: center
3939

40-
This tutorial
40+
This tutorial shows how to plot graphs using matplotlib.
4141

4242
.. toctree::
4343
:maxdepth: 2
4444
:hidden:
45+
46+
plot_mesh.rst
47+
plot_deformed_mesh.rst
48+
plot_contour.rst
49+
plot_a_graph.rst

0 commit comments

Comments
 (0)