[MOAB-dev] subdomains, sparse tags

Nico Schlömer nico.schloemer at gmail.com
Thu Apr 7 12:19:47 CDT 2016


Thanks Iulian for the reply!

I've read a bit more and played around a little, and I'm thinking that tags
are perhaps not what I want.
My use case exactly:
I have a bunch of functions `is_inside(x)` that give you true or false for
any 3D input vector x. For each of those functions, I need to find (and
iterate over, several times) all vertices which fulfill `is_inside`. At
first I thought about creating a BitTag for every function that tells you
true or false, but perhaps `meshset`s [1] are the way to go. I'll play
around with it some more..

Cheers,
Nico


[1] https://www.mcs.anl.gov/~fathom/moab-docs/html/classmoab_1_1MeshSet.html



On Thu, Apr 7, 2016 at 6:54 PM Grindeanu, Iulian R. <iulian at mcs.anl.gov>
wrote:

> Hi Nico,
> If the tags are dense or sparse affects the way they are stored in memory
> or on the hdf5 file;
> Sparse tags are kept in pairs <entity handle, value>
> dense tags are kept in contiguous arrays, corresponding to entity sequences
>
> I would use dense tags if possible;
> On those entities on domains, do you need to identify domains or the value
> of the tag?
>
> I mean, are you using the tag for grouping entities or they have the same
> value ?
>
> In general, we create sets, and then "tag" them with a tag to
> identify/classify the sets.
> (partition sets, or material sets, etc, which are usually sparse tags)
>
> If every entity has a different value, you should use a dense tag defined
> on entities (not on sets)
>
> If the tags are dense you can access them more efficiently with tag_iterate
>
> there are some examples here
>
>
> http://ftp.mcs.anl.gov/pub/fathom/moab-docs/DirectAccessWithHoles_8cpp-example.html
>
>
> http://ftp.mcs.anl.gov/pub/fathom/moab-docs/DirectAccessNoHoles_8cpp-example.html
>
> Not sure what you need exactly.
> Iulian
>
> ------------------------------
> *From:* moab-dev-bounces at mcs.anl.gov [moab-dev-bounces at mcs.anl.gov] on
> behalf of Nico Schlömer [nico.schloemer at gmail.com]
> *Sent:* Thursday, April 07, 2016 10:41 AM
> *To:* moab-dev at mcs.anl.gov
> *Subject:* Re: [MOAB-dev] subdomains, sparse tags
>
> I'm kind of lost here on the tags side anyways. Is there a piece of code
> that uses tags that I can look at?
>
> Cheers,
> Nico
>
> On Thu, Apr 7, 2016 at 3:13 PM Nico Schlömer <nico.schloemer at gmail.com>
> wrote:
>
>> Hi everyone,
>>
>> I'm just reading up on tags, all starting from the problem that I have
>> mesh on which there are multiple subdomains which may or may not overlap,
>> may or may not fill the the entire mesh. What I will need to do is to set
>> those tags on the mesh and then to iterate over all entities with that tag
>> (probably multiple times).
>>
>> Do I see correctly that sparse tags [1] are the way to go then?
>>
>> Cheers,
>> Nico
>>
>> [1]
>> https://www.mcs.anl.gov/~fathom/moab-docs/html/classmoab_1_1SparseTag.html
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20160407/1e116ed1/attachment.html>


More information about the moab-dev mailing list