<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; "><div>Tim, Iulian,</div><div><br></div><div>Thank you for the very quick replies on this – the modification worked perfectly!</div><div><br></div><div>Best,</div><div>Chris</div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Iulian Grindeanu <<a href="mailto:iulian@mcs.anl.gov">iulian@mcs.anl.gov</a>><br><span style="font-weight:bold">Date: </span> Thu, 16 Feb 2012 12:30:30 -0500<br><span style="font-weight:bold">To: </span> Tim Tautges <<a href="mailto:tautges@mcs.anl.gov">tautges@mcs.anl.gov</a>><br><span style="font-weight:bold">Cc: </span> David Stuebe <<a href="mailto:DStuebe@asascience.com">DStuebe@asascience.com</a>>, Guy De Wardener <<a href="mailto:gdewardener@asascience.com">gdewardener@asascience.com</a>>, don brittain <<a href="mailto:don.brittain@instanteffects.com">don.brittain@instanteffects.com</a>>, "<a href="mailto:moab-dev@mcs.anl.gov">moab-dev@mcs.anl.gov</a>" <<a href="mailto:moab-dev@mcs.anl.gov">moab-dev@mcs.anl.gov</a>>, Christopher Mueller <<a href="mailto:cmueller@asascience.com">cmueller@asascience.com</a>><br><span style="font-weight:bold">Subject: </span> Re: [MOAB-dev] Questions about Tags and Topology<br></div><div><br></div><blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;"><div><style type="text/css">p { margin: 0; }</style><div><div style="font-family: Times New Roman; font-size: 12pt; color: #000000">I think that until we will have a way to modify adjTable directly in pytaps, you need to modify this in <br>itaps/imesh/MBiMesh.hpp<br><br>iBase_AdjacencyCost tmp_table[] = {<br> iBase_ALL_ORDER_1, iBase_SOME_ORDER_1, iBase_SOME_ORDER_1, iBase_ALL_ORDER_1,<br> iBase_ALL_ORDER_1, iBase_UNAVAILABLE, iBase_SOME_ORDER_LOGN, iBase_SOME_ORDER_LOGN,<br> iBase_ALL_ORDER_1, iBase_SOME_ORDER_LOGN, iBase_UNAVAILABLE, iBase_SOME_ORDER_LOGN,<br> iBase_ALL_ORDER_1, iBase_SOME_ORDER_LOGN, iBase_SOME_ORDER_LOGN, iBase_ALL_ORDER_1<br> };<br> memcpy(AdjTable, tmp_table, 16*sizeof(iBase_AdjacencyCost));<br><br>with something like<br><br>iBase_AdjacencyCost tmp_table[] = {<br> iBase_ALL_ORDER_1, iBase_SOME_ORDER_1, iBase_SOME_ORDER_1, iBase_ALL_ORDER_1,<br> iBase_ALL_ORDER_1, iBase_ALL_ORDER_1, iBase_SOME_ORDER_LOGN, iBase_SOME_ORDER_LOGN,<br> iBase_ALL_ORDER_1, iBase_SOME_ORDER_LOGN, iBase_ALL_ORDER_1, iBase_SOME_ORDER_LOGN,<br> iBase_ALL_ORDER_1, iBase_SOME_ORDER_LOGN, iBase_SOME_ORDER_LOGN, iBase_ALL_ORDER_1<br> };<br> memcpy(AdjTable, tmp_table, 16*sizeof(iBase_AdjacencyCost));<br><br>I did not test it, but it "should" work.<br><br>Iulian<br><br><hr id="zwchr"><blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px;"><br><br>On 02/16/2012 11:13 AM, Christopher Mueller wrote:<br>><br>><br><br>> This has likely not been reflected in the pytaps implementation. Jim?<br>><br>><br>> Ultimately, it would be great to be able to do this on a case-by-case basis (via PyTAPS). In the interim, is there any<br>> way of changing the AdjTable 'statically' (i.e. from a config file or even directly modifying a file) so that the table<br>> defaults to create all missing entities? At this point, it would be nice to always have all entities as opposed to only<br>> having the ones explicitly created (and vertices).<br>><br><br>see itaps/imesh/MBiMesh.hpp, line 59. Alternatively, if you can call into MOAB directly from somewhere, get all the <br>entities, then ask for all adj edges/faces with create_if_missing flag = true.<br><br>- tim<br><br>> Thanks,<br>> Chris<br>><br>><br>> - tim<br>><br>><br>> In [1]: from itaps import iMesh<br>> In [2]: mesh=iMesh.Mesh()<br>> In [3]: mesh.adjTable<br>> Out[3]:<br>> array([[7, 4, 4, 1],<br>> [1, 0, 5, 5],<br>> [1, 5, 0, 5],<br>> [1, 5, 5, 7]], dtype=int32)<br>> In [4]: mesh.adjTable[1,1]<br>> Out[4]: 0<br>> In [5]: mesh.adjTable[1,1]=1<br>> In [6]: mesh.adjTable[1,1]<br>> Out[6]: 0<br>> In [7]: import numpy<br>> In [8]: mesh.adjTable=numpy.array([[7,4,4,1],[1,1,5,5],[1,5,0,5],[1,5,5,7]],dtype='int32')<br>> ---------------------------------------------------------------------------<br>> AttributeError Traceback (most recent call last)<br>> /Users/cmueller/Development/OOI/Dev/datamodel/prototypes/<ipython-input-8-5671b50e588e> in <module>()<br>> ----> 1 mesh.adjTable=numpy.array([[7,4,4,1],[1,1,5,5],[1,5,0,5],[1,5,5,7]],dtype='int32')<br>><br>> AttributeError: attribute 'adjTable' of 'itaps.iMesh.Mesh' objects is not writable<br>><br>><br>><br>><br>><br>><br>> - tim<br>><br>> ><br>> ><br>> > Thanks in advance,<br>> > Chris<br>> ><br>> > Hope this helps,<br>> > Iulian<br>> ><br>> ><br>> > Thanks,<br>> > Chris<br>><br>> --<br>> ================================================================<br>> "You will keep in perfect peace him whose mind is<br>> steadfast, because he trusts in you." Isaiah 26:3<br>><br>> Tim Tautges Argonne National Laboratory<br>> (<a href="mailto:tautges@mcs.anl.gov">tautges@mcs.anl.gov</a> <<a href="mailto:tautges@mcs.anl.gov">mailto:tautges@mcs.anl.gov</a>> <<a href="mailto:tautges@mcs.anl.gov">mailto:tautges@mcs.anl.gov</a>> <<a href="mailto:tautges@mcs.anl.gov>>">mailto:tautges@mcs.anl.gov>></a>)<br>> (telecommuting from UW-Madison)<br>> phone (gvoice): (608) 354-1459 1500 Engineering Dr.<br>> fax: (608) 263-4499 Madison, WI 53706<br>><br>><br>><br>> --<br>> ================================================================<br>> "You will keep in perfect peace him whose mind is<br>> steadfast, because he trusts in you." Isaiah 26:3<br>><br>> Tim Tautges Argonne National Laboratory<br>> (<a href="mailto:tautges@mcs.anl.gov">tautges@mcs.anl.gov</a> <<a href="mailto:tautges@mcs.anl.gov>">mailto:tautges@mcs.anl.gov></a>) (telecommuting from UW-Madison)<br>> phone (gvoice): (608) 354-1459 1500 Engineering Dr.<br>> fax: (608) 263-4499 Madison, WI 53706<br>><br>><br><br>-- <br>================================================================<br>"You will keep in perfect peace him whose mind is<br> steadfast, because he trusts in you." Isaiah 26:3<br><br> Tim Tautges Argonne National Laboratory<br> (<a href="mailto:tautges@mcs.anl.gov">tautges@mcs.anl.gov</a>) (telecommuting from UW-Madison)<br> phone (gvoice): (608) 354-1459 1500 Engineering Dr.<br> fax: (608) 263-4499 Madison, WI 53706<br><br></blockquote><br></div></div></div></blockquote></span></body></html>