Hi, FiPy.

I've recently been working with FiPy on a Windows 8.1 OS and I have run
into some difficulties using the Gmsh2D() function when supplying a .msh
file path as its argument. I tried a few things to trouble shoot the
problem, but I have not been able to pinpoint whats happening.

To start the error crops up running the following lines of code:

from fipy import *
file_path="C:\path\square.msh"
mesh=Gmsh2D(file_path)

The error I get is:

line 3, in <module>
    mesh=Gmsh2D(file_path)
  File "C:\Python27\lib\site-packages\fipy\meshes\gmshMesh.py", line 1578,
in __init__
    background=background)
  File "C:\Python27\lib\site-packages\fipy\meshes\gmshMesh.py", line 151,
in openMSHFile
    raise EnvironmentError("Gmsh version must be >= 2.0.")
EnvironmentError: Gmsh version must be >= 2.0.

As far as the trouble shooting I've done thus far, I opened up the
gmshMesh.py file to check out where the errors were coming from. I copy and
paste up to the openMSHFile() definition in that code, and run it to see if
I could get some info about what the code was getting in terms of
recognizing gmsh and what version it was getting. As a note I have gmsh 2.8
installed.

Oddly enough, when I run the segment of code from the gmshMesh.py I find
that that:
_checkForGmsh()  -- True
_gmshVersion() -- 2.8

I'm puzzled as to why this works when I run the segment of code but not
when I call on the Gmsh2D() function. I think that likely, it is how I have
gmsh installed on my computer. But the code seems to recognize it. Is there
a specific location that I should have the gmsh program? Hopefully, this is
an easy fix and I have complicated things. Looking forward to hearing back.

Thanks ahead of time and Happy New Year!
Kyle
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to