Export to GitHub

sfepy - issue #92

improve gmv support


Posted on May 29, 2009 by Quick Kangaroo

The attached patch makes it work with the newest libmesh, but it will fail with previous versions, so don't push it in yet. Here is how to convert set of gmv files (that libmesh outputs) into a set of .pos files, that gmsh can process:

from sfepy.geom.meshutils import mesh

m = mesh() for i in range(1, 16): scalars = \ m.readGMV("/home/ondrej/repos/libmesh/examples/ex18/out.gmv.%03i" % i) m.writescalarspos3("b%03i.pos" % i, scalars)

it'd be cool if sfepy could import all those different input formats and output them to any other format.

Note that in the gmv file above, there is both mesh and a scalar field on it. Both is converted to the pos file.

Attachments

Comment #1

Posted on Jun 1, 2009 by Massive Hippo

Thank you. Yes, that would be cool. What is missing is to add write() to all the MeshIO classes. It should be easy by following the meshes used for tests. What about adding an issue and labeling it for beginners?

As for this patch, shall I wait till you polish it? What are your plans? I do not care much about old libmesh versions, as there was no previous support in sfepy.

Comment #2

Posted on Jun 1, 2009 by Quick Kangaroo

I would like to have something, that we can use in femhub with hermes too.

My mesh() class above is a mess, it's just a stub to get started, but it should be put into some nice classes in sfepy and those classes should preferably work with hermes too.

Comment #3

Posted on Jan 30, 2012 by Massive Hippo

Migrated to http://github.com/sfepy/sfepy/issues/94

Status: Migrated

Labels:
Type-Enhancement Priority-Medium