[MOAB-dev] Sparse vs. dense tags

Iulian Grindeanu iulian at mcs.anl.gov
Wed Dec 15 15:34:10 CST 2010


Hello,
In my opinion, it should be sparse. Dense tags should be used when continuous sequences of the same type exist (in this case, geometric face sets, for GEOM_SENSE_2). If we can somehow guarantee that all geometric face sets are contiguous, then dense tags save memory. If face sets are intercalated by region sets, or edge or even vertex (geometric) sets, then dense tags will waste memory.

My understanding is that for dagmc, the regions, faces, edges, vertices are contiguous, so it may make sense to use there dense tags. For other applications, there is no such guarantee, so sparse should be used. 

Variable length tags are anyway more "similar" to sparse tags, (GEOM_SENSE_N_ENTS and GEOM_SENSE_N_SENSES, used for edge/face orientation, are variable length).
Iulian


----- Original Message -----
> The "GEOM_SENSE_2" tag, used to record the volumes on either side of a
> surface, is not consistently created as either sparse or dense. When
> created from DagMC and its utility tools, the tag is created as dense,
> but when created from GeomTopoTool (via ReadCGM), the tag is sparse.
> 
> Questions:
> 
> * How big a problem is this inconsistency? It doesn't seem to cause
> any errors or disruption.
> 
> * Should the tag be dense or sparse? The tag is only used on entity
> sets that represent surfaces, so my guess is that it ought to be
> sparse, but I don't understand the implementation difference deeply
> enough to be sure.
> 
> ~S


More information about the moab-dev mailing list