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

pass dim to pygmsh.generate_mesh in 2d examples #142

Merged
merged 1 commit into from
Mar 21, 2019
Merged

pass dim to pygmsh.generate_mesh in 2d examples #142

merged 1 commit into from
Mar 21, 2019

Conversation

gdmcbain
Copy link
Contributor

Not a big thing.

@kinnala
Copy link
Owner

kinnala commented Mar 21, 2019

What does it change?

@kinnala kinnala merged commit b5095b2 into kinnala:master Mar 21, 2019
@gdmcbain
Copy link
Contributor Author

The (quite reasonable) default for pygmsh.helpers.generate_mesh is

https://github.com/nschloe/pygmsh/blob/78a32cd6711d158d0c9f27228f45b7e8f163b976/pygmsh/helpers.py#L80

and the gmsh executable is passed -{}.format(dim) which causes it to run through one-, two-, and three-dimensional meshing; e.g. (on master, before merging this)

python docs/examples/ex12.py

produces standard output

Info : Running 'gmsh -3 /tmp/tmpm0n09x1d.geo -format msh -bin -o /tmp/tmpq5r3twa2.msh' [Gmsh 4.2.3-git-7bc72f5de, 1 node, max. 1 thread]
Info : Started on Fri Mar 22 09:40:54 2019
Info : Reading '/tmp/tmpm0n09x1d.geo'...
Info : Done reading '/tmp/tmpm0n09x1d.geo'
Info : Meshing 1D...
Info : Meshing curve 1 (Circle)
Info : Meshing curve 2 (Circle)
Info : Meshing curve 3 (Circle)
Info : Done meshing 1D (0.00205061 s)
Info : Meshing 2D...
Info : Meshing surface 5 (Plane, Delaunay)
Info : Done meshing 2D (0.0160051 s)
Info : Meshing 3D...
Info : Done meshing 3D (8.4368e-05 s)
Info : 303 vertices 606 elements
Info : Writing '/tmp/tmpq5r3twa2.msh'...
Info : Done writing '/tmp/tmpq5r3twa2.msh'
Info : Stopped on Fri Mar 22 09:40:54 2019

and the user might puzzle over seeing

Info : Meshing 3D...
Info : Done meshing 3D (8.4368e-05 s)

when they know that their problem is two-dimensional.

Not a big thing. Is it worth typing dim=2 to avoid this? I don't know.

@gdmcbain gdmcbain deleted the pygmsh-dim branch March 21, 2019 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants