[MOAB-dev] Questions about Tags and Topology

Christopher Mueller cmueller at asascience.com
Thu Feb 16 14:40:27 CST 2012


Alright – then it was probably working but the '1' I was assigning to [1,1] was being set to '7' under the hood, so I wasn't seeing the change because I still had the 'workaround' patch applied (meaning the table was starting with [1,1]=7).

All seems to be working as expected now!

Thanks Jim,
Chris

From: James Porter <jvporter at wisc.edu<mailto:jvporter at wisc.edu>>
Date: Thu, 16 Feb 2012 15:35:55 -0500
To: Christopher Mueller <cmueller at asascience.com<mailto:cmueller at asascience.com>>
Cc: Iulian Grindeanu <iulian at mcs.anl.gov<mailto:iulian at mcs.anl.gov>>, Tim Tautges <tautges at mcs.anl.gov<mailto:tautges at mcs.anl.gov>>, "moab-dev at mcs.anl.gov<mailto:moab-dev at mcs.anl.gov>" <moab-dev at mcs.anl.gov<mailto:moab-dev at mcs.anl.gov>>, Guy De Wardener <gdewardener at asascience.com<mailto:gdewardener at asascience.com>>, David Stuebe <DStuebe at asascience.com<mailto:DStuebe at asascience.com>>, don brittain <don.brittain at instanteffects.com<mailto:don.brittain at instanteffects.com>>
Subject: Re: [MOAB-dev] Questions about Tags and Topology

On Thu, 2012-02-16 at 15:20 -0500, Christopher Mueller wrote:
Ahh – ok.  I almost had it – I tried setting adjTable using a whole
4x4 numpy.array - but I neglected to try using a whole 4x4 python
array.

That should work:

mesh = iMesh.Mesh()
adj = mesh.adjTable
adj
array([[7, 4, 4, 1],
       [1, 0, 5, 5],
       [1, 5, 0, 5],
       [1, 5, 5, 7]], dtype=int32)
adj[1,1] = 1
mesh.adjTable = adj
mesh.adjTable
array([[7, 4, 4, 1],
       [1, 7, 5, 5],
       [1, 5, 0, 5],
       [1, 5, 5, 7]], dtype=int32)

However, note that when you set the adjTable, you won't necessarily get
the same thing back. The table is modified to use whatever works best
for MOAB while still meeting your requirements, if possible.

Also, you can use the enum values in iBase to refer to these, e.g.
iBase.AdjCost.unavailable.

- Jim



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20120216/e2dbe625/attachment-0001.htm>


More information about the moab-dev mailing list