<div dir="ltr">I trust the last line is supposed to be<div>```</div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:16px;line-height:24px">rval = mb->tag_get_data(gid, verts, &globalids[0]);</span><br></div><div>```</div><div>Anyhow, good to know! That would have cost me time for sure.</div><div><br></div><div>Cheers,</div><div>Nico</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Nov 2, 2015 at 2:37 PM Grindeanu, Iulian R. <<a href="mailto:iulian@mcs.anl.gov">iulian@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt"><br>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div style="direction:ltr"><font face="Tahoma" color="#000000" size="2"><b>From:</b> <a href="mailto:moab-dev-bounces@mcs.anl.gov" target="_blank">moab-dev-bounces@mcs.anl.gov</a> [<a href="mailto:moab-dev-bounces@mcs.anl.gov" target="_blank">moab-dev-bounces@mcs.anl.gov</a>] on behalf of Nico Schlömer [<a href="mailto:nico.schloemer@gmail.com" target="_blank">nico.schloemer@gmail.com</a>]<br>
<b>Sent:</b> Monday, November 02, 2015 4:30 AM<br>
<b>To:</b> <a href="mailto:moab-dev@mcs.anl.gov" target="_blank">moab-dev@mcs.anl.gov</a><br>
<b>Subject:</b> [MOAB-dev] moab, tpetra::map<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr"></div></div></div></div></div><div><div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt"><div style="font-family:Times New Roman;color:#000000;font-size:16px"><div><div dir="ltr">I would liket to create a Tpetra::Map [1] from a MOAB parallel partition. To this end, I need to following:
<div><br>
</div>
</div></div></div></div></div><div><div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt"><div style="font-family:Times New Roman;color:#000000;font-size:16px"><div><div dir="ltr"><div> * 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.<br>
<br></div></div></div></div></div></div><div><div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt"><div style="font-family:Times New Roman;color:#000000;font-size:16px"><div><div dir="ltr"><div>
No, the EntityHandle refers only to a local partition<br>
In general, we keep a Global ID of a node in a tag called exactly like that <br>
"GLOBAL_ID"<br>
<br>
When you just load a file, in different partitions, EntityHandle for vertices starts at 1 on each partition<br>
So they "overlap", it can't be used as global id;<br>
<br>
to get the global id, you need to do something like this, on each partition<br>
Range verts;<br>
rval = mb->get_entities_by_dimensions(0,0, verts);<br>
std::vector<int> globalids;<br>
globalids.resize(verts.size());<br>
Tag gid;<br>
rval = mb->tag_get_handle("GLOBAL_ID", gid);<br>
<br>
rval = mb->tag_get_data(gid, verts, &gid[0]);<br>
<br>
<br>
</div></div></div></div></div></div><div><div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt"><div style="font-family:Times New Roman;color:#000000;font-size:16px"><div><div dir="ltr">
<div> * Translate a Range into a std::vector. Seems easy given Range's operator[].</div>
<div> * Get owned nodes. Get owned plus shared nodes.</div>
<div>    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.</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Nico</div>
<div><br>
</div>
<div>[1] <a href="https://trilinos.org/docs/dev/packages/tpetra/doc/html/classTpetra_1_1Map.html" target="_blank">https://trilinos.org/docs/dev/packages/tpetra/doc/html/classTpetra_1_1Map.html</a></div>
</div></div></div></div></div></blockquote></div>