Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tutorial to show how to use pyvista-gmsh which is inspired by gmsh tutorial #1

Merged
merged 46 commits into from
Dec 23, 2023
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
7518f69
Add Gmsh Python tutorial 1
tkoyama010 Jul 25, 2022
f3639ae
Apply suggestions from code review
tkoyama010 Jul 27, 2022
bf51731
Apply suggestions from code review
tkoyama010 Jul 27, 2022
69e747f
Update test_gmsh.py
tkoyama010 Jul 27, 2022
78705f4
Update test_gmsh.py
tkoyama010 Jul 27, 2022
c310942
Update test_gmsh.py
tkoyama010 Jul 27, 2022
a4f3a43
Update test_gmsh.py
tkoyama010 Jul 27, 2022
7d6d207
Update test_gmsh.py
tkoyama010 Jul 27, 2022
191f40c
Create testing-and-deployment.yml
tkoyama010 Jul 28, 2022
fc3dc04
Update testing-and-deployment.yml
tkoyama010 Jul 28, 2022
f392c53
Update testing-and-deployment.yml
tkoyama010 Jul 28, 2022
3282555
Create requirements_test.txt
tkoyama010 Jul 28, 2022
dafe7d6
Update requirements_test.txt
tkoyama010 Jul 28, 2022
22d0322
Update testing-and-deployment.yml
tkoyama010 Jul 28, 2022
4fb7e69
Create __init__.py
tkoyama010 Jul 28, 2022
c98ae8e
Update test_gmsh.py
tkoyama010 Jul 28, 2022
f8e2d7d
Update test_gmsh.py
tkoyama010 Jul 28, 2022
36b4a09
Update testing-and-deployment.yml
tkoyama010 Jul 28, 2022
5b13c23
Update test_gmsh.py
tkoyama010 Jul 28, 2022
de2da97
Update test_gmsh.py
tkoyama010 Jul 28, 2022
7bd9c57
Update __init__.py
tkoyama010 Jul 29, 2022
1cfb1d9
Update __init__.py
tkoyama010 Jul 29, 2022
b49b7c2
Update __init__.py
tkoyama010 Jul 29, 2022
0b9f14b
Update __init__.py
tkoyama010 Jul 29, 2022
26fdc47
Update testing-and-deployment.yml
tkoyama010 Aug 1, 2022
6afc9d5
Update test_gmsh.py
tkoyama010 Aug 1, 2022
8180a0a
Update __init__.py
tkoyama010 Aug 1, 2022
08bee79
Update requirements_test.txt
tkoyama010 Aug 1, 2022
716f4a2
Create tutorial1.py
tkoyama010 Apr 23, 2023
ed00b6f
Create .pre-commit-config.yaml
tkoyama010 Apr 23, 2023
94f4e1f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 23, 2023
1ad238f
Update test_gmsh.py
tkoyama010 Apr 23, 2023
3f98c28
Update __init__.py
tkoyama010 Apr 24, 2023
94d81f4
Update testing-and-deployment.yml
tkoyama010 Dec 21, 2023
c48edfa
Update testing-and-deployment.yml
tkoyama010 Dec 22, 2023
68e3841
Update testing-and-deployment.yml
tkoyama010 Dec 22, 2023
c0b8ead
Update testing-and-deployment.yml
tkoyama010 Dec 22, 2023
f1b1838
Add pyproject.toml
tkoyama010 Dec 23, 2023
392f7d1
Update point operation
tkoyama010 Dec 23, 2023
ce753b3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 23, 2023
44230ef
Update
tkoyama010 Dec 23, 2023
7cd9b63
Merge branch 'feat/tutorial-1' of https://github.com/pyvista/pyvista-…
tkoyama010 Dec 23, 2023
67bee58
Update
tkoyama010 Dec 23, 2023
e74649a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 23, 2023
f70f750
Update
tkoyama010 Dec 23, 2023
0c4f549
Update .pre-commit-config.yaml
tkoyama010 Dec 23, 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
Next Next commit
Add Gmsh Python tutorial 1
tkoyama010 committed Jul 25, 2022
commit 7518f69b2ba75c8094ac40f1cca20f64aecc0a97
22 changes: 22 additions & 0 deletions tests/test_gmsh.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import pvgmsh


def test_tutorial1():
# Gmsh Python tutorial 1
# https://gitlab.onelab.info/gmsh/gmsh/blob/gmsh_4_10_5/tutorials/python/t1.py

vertices = np.array([[0, 0, 0], [0.1, 0, 0], [0.1, 0.3, 0], [0.3, 0, 0]])

faces = np.hstack([[4, 0, 1, 2, 3]])

surf = pvgmsh.PolyData(vertices, faces, lc=1e-2)
tkoyama010 marked this conversation as resolved.
Show resolved Hide resolved

surf["points group number"] = np.array([1, 1, 1])
surf["surface group number"] = np.array([2])

tkoyama010 marked this conversation as resolved.
Show resolved Hide resolved
surf.add_physical_group(["points group number", "surface group number"])
surf.generate(2)
tkoyama010 marked this conversation as resolved.
Show resolved Hide resolved

surf.save("t1.msh")

surf.plot()
tkoyama010 marked this conversation as resolved.
Show resolved Hide resolved