<html><head><style type='text/css'>p { margin: 0; }</style></head><body><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>> (tautges@mcs.anl.gov <mailto:tautges@mcs.anl.gov> <mailto:tautges@mcs.anl.gov> <mailto:tautges@mcs.anl.gov>>)<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>> (tautges@mcs.anl.gov <mailto:tautges@mcs.anl.gov>) (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> (tautges@mcs.anl.gov) (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></body></html>