[Smtk-developers] Exodus bridge
Yumin Yuan
yumin.yuan at kitware.com
Mon Nov 17 17:55:47 EST 2014
On Mon, Nov 17, 2014 at 5:43 PM, David Thompson <david.thompson at kitware.com>
wrote:
> Hi all,
>
> I've merged some changes to master that store element block, side set, and
> node set IDs on the SMTK model entities. So, in Python you can
>
> # ... load file as in script below ...
> result = rdr.operate()
> model = smtk.model.ModelEntity(res.findModelEntity('model').value(0))
> for group in model.groups():
> print group.name(), group.stringProperty('exodus type'),
> group.integerProperty('exodus id')
>
> and get
>
> Unnamed block ID: 1 Type: HEX ['element block'] [1]
> Unnamed block ID: 2 Type: HEX ['element block'] [2]
> Unnamed set ID: 4 ['side set'] [4]
> Unnamed set ID: 1 ['node set'] [1]
> Unnamed set ID: 100 ['node set'] [100]
>
>
Nice!
> I am about halfway through modernizing the Hydra Python exporter script to
> use the new model. Once I'm done and Yumin has the association widget
> working we should have an end-to-end demo. (!!!)
>
>
The association widget is working now. I have to change the template file a
little bit.
Associations="f" ==> Associations="g" // for group
Associations="r" ==> Associations="m" // for model to assign material, I
guess the "Exodus" reader-parser did not construct a volume.
Caveat, there are some runtime warnings from cmb_v4 related to "duplicate
command function". I think this is happening when loading CMB_plugin, and
erdcAppCommon is also linking against CMB_plugin. I will track this down
later.
Yumin
David
>
> > ...
> > I can certainly help with the exporter part. I will call you to discuss
> a bit.
> >
> > Yumin
> >
> > On Mon, Nov 17, 2014 at 11:29 AM, David Thompson <
> david.thompson at kitware.com> wrote:
> > 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
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/smtk-developers/attachments/20141117/7ed1858e/attachment-0001.html>
More information about the Smtk-developers
mailing list