[vtkusers] Segmentation fault using vtkModelMetadata for ExodusII files

Kevin Manktelow kevin071586 at gmail.com
Sat Mar 22 03:31:00 EDT 2014


Hi all,
I'm trying to read the SideSet and NodeSet data on an Exodus II file using
VTK, and I'm having some trouble.  I think I might be misunderstanding what
I need to do, but I've exhausted the documentation that I could find.

I'm currently loading and displaying an exodus II file using a
vtkExodusIIReader object.  This works fine.  I can extract simple things
like the number of nodes from the reader object:

rdr->GetNumberOfNodes();

I'd like to extract which nodes are in a particular nodeset, sideset, etc.
 It seems to me that this information would be stored in a vtkModelMetadata
object, which i've tried to create in the following way:

  rdr->ExodusModelMetadataOn();
  vtkSmartPointer<vtkExodusModel> model_dat =
vtkSmartPointer<vtkExodusModel>::New();
  model_dat = rdr->GetExodusModel();

// ---------- This line causes the program to crash ------------
  vtkSmartPointer<vtkModelMetadata> model_metadata =
model_dat->GetModelMetadata();


Creating the vtkExodusModel object seems to work fine.  However, the last
line is causing a segmentation fault when the program runs (I am using the
QVTKWidget with QT).  Can anybody explain to me if I am missing some steps
here, or what I am doing wrong?

Thanks,
Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140322/491d134a/attachment.html>


More information about the vtkusers mailing list