-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sphinx-gallery to builds an HTML gallery of examples (#374)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
ae34ae2
commit 961ba3d
Showing
8 changed files
with
76 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,3 @@ python: | |
path: . | ||
extra_requirements: | ||
- docs | ||
- requirements: docs/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.. _examples: | ||
|
||
Examples | ||
======== | ||
|
||
A gallery of examples. Coarse meshes are used whenever possible to make the examples run | ||
fast. Some examples require external packages to be installed. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
"""scikit-gmsh package for polygon with hole mesh generation test.""" | ||
r""" | ||
Polygon with hole geometry example | ||
---------------------------------- | ||
from __future__ import annotations | ||
Polygon with hole geometry example. | ||
""" | ||
|
||
from shapely import Polygon | ||
from __future__ import annotations | ||
|
||
import skgmsh as sg | ||
|
||
polygon_with_hole = Polygon( | ||
[(0, 0, 0), (0, 10, 0), (10, 10, 0), (10, 0, 0), (0, 0, 0)], holes=[[(2, 2, 0), (2, 4, 0), (4, 4, 0), (4, 2, 0), (2, 2, 0)]] | ||
) | ||
shell = [(0, 0, 0), (0, 10, 0), (10, 10, 0), (10, 0, 0), (0, 0, 0)] | ||
holes = [[(2, 2, 0), (2, 4, 0), (4, 4, 0), (4, 2, 0), (2, 2, 0)]] | ||
alg = sg.Delaunay2D(shell=shell, holes=holes) | ||
|
||
# %% | ||
# Generate the mesh. | ||
|
||
delaunay2d = sg.Delaunay2D(polygon_with_hole) | ||
delaunay2d.mesh.plot(show_edges=True, color="white", cpos="xy") | ||
mesh = alg.mesh | ||
mesh.plot(show_edges=True, color="white", cpos="xy") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters