evalf / nutils

The nutils project
http://www.nutils.org/
MIT License
88 stars 48 forks source link

gmsh with quadrilaterals #230

Open scdivi opened 7 years ago

scdivi commented 7 years ago

when .msh files are loaded using mesh.gmsh('filename.msh') results keyword error as the .msh file doesn't have the labels for the physical names. And gmsh creates physical names in .msh only when the physical groups are manually labeled in the .geo file. That is, if the following lines are missing in the .msh file then it leads to Keyword error.

$PhysicalNames 5 1 1 "right" 1 2 "top" 1 3 "bottom" 1 4 "left" 2 5 "interior" $EndPhysicalNames

Moreover the physical names should be given same as the names used in the domain.boundary['right'].

gertjanvanzwieten commented 7 years ago

The KeywordError is intended behaviour; .msh files that do not define physical groups results in topologies without subtopologies or sub-boundary topologies. Could you elaborate on the "moreover"?

scdivi commented 7 years ago

Ok. The intended behaviour explains the "moreover" part which lead to KeyError 13.

Sorry for not being clear in the previous comment. The important issue is that nutils is unable to load the gmsh file generated with quadrilaterals and leads to KeyError 3.

issue_nutils.zip

uploaded a issue_nutils.zip folder with three files: laplace.py, quadrilateral.msh and trianglular.msh. laplace script using quadrilateral.msh and leads to keyerror3 where as works perfectly with triangular.msh (The laplace script can be edited to select the triangular.msh )