<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">yes, sorry about that<br>
this happens when I don't compile the code :)<br>
<br>
Also, we have another tag, that we can use for more than 2B global vertices.<br>
I will look at the tpetra format and let you know <br>
thanks,<br>
Iulian<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF559464"><font face="Tahoma" color="#000000" size="2"><b>From:</b> Nico Schlömer [nico.schloemer@gmail.com]<br>
<b>Sent:</b> Monday, November 02, 2015 7:42 AM<br>
<b>To:</b> Grindeanu, Iulian R.; moab-dev@mcs.anl.gov<br>
<b>Subject:</b> Re: [MOAB-dev] moab, tpetra::map<br>
</font><br>
</div>
<div></div>
<div>
<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" target="_blank">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>
</div>
</div>
</div>
</body>
</html>