[vtkusers] write 2D mesh to ExodusII
Adrian Croucher
a.croucher at auckland.ac.nz
Wed Jan 18 21:02:39 EST 2017
hi,
I am writing a 2D mesh to an ExodusII file using vtkExodusIIWriter (in
Python). I'm using VTK 5.8.
The ExodusII file has a 'dimension' property which appears to be set to
3 by default. I would like to be able to set this to 2 for 2D meshes.
Otherwise it doesn't read in properly in other applications (e.g. PETSc).
From reading the C++ documentation for vtkExodusIIWriter it looks like
there is a SetModelMetadata() method which takes a vtkModelMetadata
object as argument. This object in turn has a SetCoordinateNames()
method which takes an integer dimension parameter and an array of
coordinate names.
However in Python this method doesn't seem to be exposed- I get an
AttributeError when I try to use it. I also get a segfault when I try to
use the SetModelMetadata() method (maybe because the vtkModelMetadata
object isn't set up right).
Not sure if I'm on the right track here, or if there is some other way
to achieve what I want?
Regards, Adrian
--
Dr Adrian Croucher
Senior Research Fellow
Department of Engineering Science
University of Auckland, New Zealand
email: a.croucher at auckland.ac.nz
tel: +64 (0)9 923 4611
More information about the vtkusers
mailing list