Proposal for telling an implementation what adjacency info an app/service needs

Carl Ollivier-Gooch cfog at mech.ubc.ca
Sat Nov 14 00:45:06 CST 2009


Jason Kraftcheck wrote:
> Tim Tautges wrote:
>> Hmm, I'm not sure I like this.  I thought setAdjTable was supposed to be
>> used to request which entities an application or service needed.  I've
>> coded it into MOAB's iMesh implementation that way, IIRC.  Looking at
>> the current comments to getAdjTable, we should put something there
>> describing what the values mean then.  I would vote for setAdjTable
>> being the function used to request intermediate-dimension entities.
>>
> 
>>From iMesh.h:
> 
>      * Get the adjacency table for this implementation.  This table
>      * is a 4x4 array, with indices 0-based, where A(i,j) (i=row, j=column)
>      * represents the relative cost of retrieving adjacencies between
>      * entities of dimension i to entities of dimension j
> 
> It clearly says the "cost of retrieving", not "will exist" or some such thing.

But the partial existence case you cite is included explicitly in the 
enumeration:

     iBase_UNAVAILABLE = 0,          /**< Adjacency information not 
supported */
     iBase_ALL_ORDER_1,              /**< No more than local mesh 
traversal required */
     iBase_ALL_ORDER_LOGN,           /**< Global tree search */
     iBase_ALL_ORDER_N,              /**< Global exhaustive search */
     iBase_SOME_ORDER_1,             /**< Only some adjacency info, local */
     iBase_SOME_ORDER_LOGN,          /**< Only some adjacency info, tree */
     iBase_SOME_ORDER_N              /**< Only some adjacency info, 
exhaustive */

Whether we would want to expand the enum to have an extra value or two 
for the still hypothetical setEntAdj is a good question:  something like 
iBase_REQUIRE_ALL, perhaps?  (Unlikely that iBase_REQUIRE_SOME would be 
much use...)

Since we don't currently use the diagonal for anything, we could choose 
to overload that to mean iterable (i.e., add an iBase_ITERABLE to the 
enum that can only appear on the diagonal).  The argument for retrieving 
this with getEntAdj is less strong, IMO, than the argument for being 
able to specify that a client needs it (in some way; setEntAdj gives a 
place to put that, though not necessarily the best place).

Carl

-- 
------------------------------------------------------------------------
Dr. Carl Ollivier-Gooch, P.Eng.                   Voice: +1-604-822-1854
Associate Professor                                 Fax: +1-604-822-2403
Department of Mechanical Engineering             email: cfog at mech.ubc.ca
University of British Columbia              http://www.mech.ubc.ca/~cfog
Vancouver, BC  V6T 1Z4                  http://tetra.mech.ubc.ca/ANSLab/
------------------------------------------------------------------------


More information about the tstt-interface mailing list