Skip to content

Commit

Permalink
Use import alias pg inspired by import pyvista as pv (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoyama010 authored Dec 25, 2023
1 parent d7c7dea commit bf6e64f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Usage
.. code-block:: python
>>> import pyvista as pv
>>> import pvgmsh
>>> import pvgmsh as pg
We can define the surface using PyVista.

Expand All @@ -37,7 +37,7 @@ We can then generate a 2D mesh.

.. code-block:: python
>>> mesh = pvgmsh.frontal_delaunay_2d(geometry, target_size=1.0)
>>> mesh = pg.frontal_delaunay_2d(geometry, target_size=1.0)
To visualize the model we can use PyVista.

Expand Down
4 changes: 2 additions & 2 deletions src/pvgmsh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def frontal_delaunay_2d(edge_source, target_size=None):
triangulation.
>>> import pyvista as pv
>>> import pvgmsh
>>> import pvgmsh as pg
>>> geometry = pv.Polygon(n_sides=4, radius=8, fill=False)
>>> geometry = geometry.rotate_z(45, inplace=False)
>>> geometry
Expand All @@ -58,7 +58,7 @@ def frontal_delaunay_2d(edge_source, target_size=None):
>>> geometry.lines
array([5, 0, 1, 2, 3, 0])
>>> mesh = pvgmsh.frontal_delaunay_2d(geometry, target_size=1.0)
>>> mesh = pg.frontal_delaunay_2d(geometry, target_size=1.0)
<BLANKLINE>
>>> mesh
Expand Down

0 comments on commit bf6e64f

Please sign in to comment.