[MOAB-dev] moab, tpetra::map

Grindeanu, Iulian R. iulian at mcs.anl.gov
Mon Nov 2 07:46:45 CST 2015


yes, sorry about that
this happens when I don't compile the code :)

Also, we have another tag, that we can use for more than 2B global vertices.
I will look at the tpetra format and let you know
thanks,
Iulian

________________________________
From: Nico Schlömer [nico.schloemer at gmail.com]
Sent: Monday, November 02, 2015 7:42 AM
To: Grindeanu, Iulian R.; moab-dev at mcs.anl.gov
Subject: Re: [MOAB-dev] moab, tpetra::map

I trust the last line is supposed to be
```
rval = mb->tag_get_data(gid, verts, &globalids[0]);
```
Anyhow, good to know! That would have cost me time for sure.

Cheers,
Nico

On Mon, Nov 2, 2015 at 2:37 PM Grindeanu, Iulian R. <iulian at mcs.anl.gov<mailto:iulian at mcs.anl.gov>> wrote:

________________________________
From: moab-dev-bounces at mcs.anl.gov<mailto:moab-dev-bounces at mcs.anl.gov> [moab-dev-bounces at mcs.anl.gov<mailto:moab-dev-bounces at mcs.anl.gov>] on behalf of Nico Schlömer [nico.schloemer at gmail.com<mailto:nico.schloemer at gmail.com>]
Sent: Monday, November 02, 2015 4:30 AM
To: moab-dev at mcs.anl.gov<mailto:moab-dev at mcs.anl.gov>
Subject: [MOAB-dev] moab, tpetra::map

I would liket to create a Tpetra::Map [1] from a MOAB parallel partition. To this end, I need to following:

 * The notion of global ID of a node. I trust EntityHandle is what I'm looking for? EntityID appears to be the index a lot of times, aka, a local ID.

No, the EntityHandle refers only to a local partition
In general, we keep a Global ID of a node in a tag called exactly like that
"GLOBAL_ID"

When you just load a file, in different partitions, EntityHandle for vertices starts at 1 on each partition
So they "overlap", it can't be used as global id;

to get the global id, you need to do something like this, on each partition
Range verts;
rval = mb->get_entities_by_dimensions(0,0, verts);
std::vector<int> globalids;
globalids.resize(verts.size());
Tag gid;
rval = mb->tag_get_handle("GLOBAL_ID", gid);

rval = mb->tag_get_data(gid, verts, &gid[0]);


 * Translate a Range into a std::vector. Seems easy given Range's operator[].
 * Get owned nodes. Get owned plus shared nodes.
    I'm still not quite familiar on how to best pick out entity sets from a pcomm. I see there's `get_pstatus_entities()`, but I don't see a PSTATUS_OWNED.

Cheers,
Nico

[1] https://trilinos.org/docs/dev/packages/tpetra/doc/html/classTpetra_1_1Map.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20151102/ef80e958/attachment-0001.html>


More information about the moab-dev mailing list