Skip to content

Commit

Permalink
debug + update titles of examples
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrilleBonamy committed Oct 28, 2021
1 parent 7620197 commit 3b1029b
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 26 deletions.
3 changes: 3 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
import matplotlib.pyplot as plt
plt.ioff()

#import sphinx_gallery
from sphinx_gallery.sorting import FileNameSortKey

import fluidfoam

here = os.path.dirname(__file__)
Expand Down
2 changes: 1 addition & 1 deletion examples/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Gallery of Examples

First examples
--------------
This gallery consists of introductory examples.
This gallery consists of introductory examples to read and plot OpenFoam output files with Python.
4 changes: 2 additions & 2 deletions examples/plot_0_field.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Read and Plot OpenFoam output field
===================================
First example
=============
This example doesn't do much, it just reads and makes a simple plot of OpenFoam
field
Expand Down
4 changes: 2 additions & 2 deletions examples/plot_1_timeseries.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Read and Plot a time series of OpenFoam scalar field
====================================================
Time series of OpenFoam scalar field
====================================
This example reads and plots a time series of an OpenFoam scalar field
"""
Expand Down
4 changes: 2 additions & 2 deletions examples/plot_2_postprocforce.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Read and Plot a time series of OpenFoam postProcessing force
============================================================
Time series of postProcessing force
===================================
This example reads and plots a series of postProcessing force
"""
Expand Down
4 changes: 2 additions & 2 deletions examples/plot_3_postprocprobe.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Read and Plot a time series of OpenFoam postProcessing probe
============================================================
Time series of postProcessing probe
===================================
This example reads and plots a series of postProcessing probe
"""
Expand Down
4 changes: 2 additions & 2 deletions examples/plot_4_sampledfield.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Read and Plot OpenFoam output field of files without header
===========================================================
output field of files without header (sampling)
===============================================
This example doesn't do much, it just reads and makes a simple plot of OpenFoam
field in case of files without header (as for example the output of sampling
Expand Down
7 changes: 3 additions & 4 deletions examples/structured/plot_0_averagedfield.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Read and Plot a spatially averaged profile from a structured mesh
=================================================================
Spatially averaged profile
==========================
This example reads and plots a spatially averaged profile of the first
component of an OpenFoam vector field from a structured mesh
Expand All @@ -16,7 +16,7 @@
# import readmesh function from fluidfoam package
from fluidfoam import readmesh

sol = '../output_samples/box/'
sol = '../../output_samples/box/'

x, y, z = readmesh(sol, True)

Expand All @@ -30,7 +30,6 @@
# import readvector function from fluidfoam package
from fluidfoam import readvector

sol = '../output_samples/box/'
timename = '0'
vel = readvector(sol, timename, 'U', True)

Expand Down
7 changes: 3 additions & 4 deletions examples/structured/plot_1_contour.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Read and Plot a contour of OpenFoam output from a structured mesh
=================================================================
Contour from a slice in domain
==============================
This example reads and plots a contour of the first component of an OpenFoam
vector field from a structured mesh
Expand All @@ -17,7 +17,7 @@
from fluidfoam import readmesh


sol = '../output_samples/box/'
sol = '../../output_samples/box/'

x, y, z = readmesh(sol, True)

Expand All @@ -34,7 +34,6 @@
# import readvector function from fluidfoam package
from fluidfoam import readvector

sol = '../output_samples/box/'
timename = '0'
vel = readvector(sol, timename, 'U', True)

Expand Down
7 changes: 3 additions & 4 deletions examples/structured/plot_2_boundary.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Read and Plot a OpenFoam field from a boundary/patch of a structured mesh
=========================================================================
Contour and scatter from a boundary/patch
=========================================
This example reads and plots the first component of an OpenFoam
vector field from a boundary (patch) of a structured mesh
Expand All @@ -17,7 +17,7 @@
from fluidfoam import readmesh


sol = "../output_samples/box/"
sol = "../../output_samples/box/"

x, y, z = readmesh(path=sol, structured=True, boundary="topWall")

Expand All @@ -34,7 +34,6 @@
# import readvector function from fluidfoam package
from fluidfoam import readvector

sol = "../output_samples/box/"
timename = "0"
vel = readvector(sol, timename, "U", structured=True, boundary="topWall")

Expand Down
6 changes: 3 additions & 3 deletions examples/unstructured/plot_contour_unstructured.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Read and Plot a contour of OpenFoam output from an unstructured mesh
====================================================================
Contour from an unstructured mesh
=================================
This example reads and plots a contour of an OpenFoam vector field from an
unstructured mesh by interpolation on a structured grid
Expand All @@ -17,7 +17,7 @@
from fluidfoam import readmesh


sol = '../output_samples/pipeline/'
sol = '../../output_samples/pipeline/'

x, y, z = readmesh(sol)

Expand Down

0 comments on commit 3b1029b

Please sign in to comment.