0

this question is probably due to my lack of knowledge of python, nonetheless here it is: is it possible to import a gmsh mesh file.geo instead of writing it entirely on the fipy script as is it done in this tutorial ?

http://www.ctcms.nist.gov/fipy/examples/diffusion/generated/examples.diffusion.circle.html#module-examples.diffusion.circle

a procedure like this: open file; read/store the content in data_var; mesh = Gmsh2D(data_var) # generate the mesh with gmsh

Thanks

user3442072
  • 45
  • 1
  • 6

1 Answers1

3

There's no need to "read/store the content in data_var".

Per http://www.ctcms.nist.gov/fipy/fipy/generated/fipy.meshes.html#module-fipy.meshes.gmshMesh, the first argument to Gmsh2D et al. is:

arg: a string giving (i) the path to an MSH file, (ii) a path to a Gmsh geometry (”.geo”) file, or (iii) a Gmsh geometry script

Just supply the path to your .geo file.

jeguyer
  • 2,379
  • 1
  • 11
  • 15