[Smtk-developers] Exodus bridge

David Thompson david.thompson at kitware.com
Mon Nov 17 11:29:13 EST 2014


Hi Yumin,

I've pushed a simple example bridge to SMTK master that uses VTK's Exodus reader to read side and node set information in as groups. No cells (volumes/faces/edges/vertices) are included, but the blocks and sets have tessellation information. You can do this:

  import smtk
  mgr = smtk.model.Manager.create()
  sess = mgr.createSession('exodus')
  rdr = sess.op('read')
  rdr.findAsFile('filename').setValue('can.ex2')
  res = rdr.operate()
  me = smtk.model.ModelEntity(res.findModelEntity('model').value(0))
  print '\n'.join([x.name() for x in me.groups()])

which will print this:

  Unnamed block ID: 1 Type: HEX
  Unnamed block ID: 2 Type: HEX
  Unnamed set ID: 4
  Unnamed set ID: 1
  Unnamed set ID: 100

Because each group has a Tessellation associated with it you should be able to render the side and node sets as well as element blocks. There are a few things left to do and then we will have an end-to-end example of simulation preparation using (unaltered) Exodus files.

1. Verify that the vtkModelMultiBlockSource properly includes the tessellation information attached to the side and node sets.
2. Add properties to the groups from the Exodus reader's metadata (describing set IDs).
3. Adapt an exporter to the new model.

I can do #1-2, but will need some help with #3.

	David


More information about the Smtk-developers mailing list