<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;">Hi Nico,<br>
"shared" entities means entities that are shared with other tasks<br>
<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF873637"><font color="#000000" face="Tahoma" size="2"><b>From:</b> moab-dev-bounces@mcs.anl.gov [moab-dev-bounces@mcs.anl.gov] on behalf of Nico Schlömer [nico.schloemer@gmail.com]<br>
<b>Sent:</b> Monday, December 07, 2015 7:45 AM<br>
<b>To:</b> Vijay S. Mahadevan<br>
<b>Cc:</b> moab-dev@mcs.anl.gov<br>
<b>Subject:</b> Re: [MOAB-dev] get uniquely owned vertices<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">Thanks Vijay for the explanation.
<div>So both<span style="line-height:1.5"> `</span><span style="line-height:1.5">get_entities_by_dimension` and </span><span style="line-height:1.5">`</span><span style="line-height:1.5">get_shared_entities`</span><span style="line-height:1.5"> return owned
and ghosted entities?</span></div>
<div><br>
</div>
<div>Cheers,</div>
<div>Nico</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Mon, Dec 7, 2015 at 2:31 PM Vijay S. Mahadevan <<a href="mailto:vijay.m@gmail.com" target="_blank">vijay.m@gmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
Hi Nico,<br>
<br>
You can use pstatus tag to filter out [1] your desired entities once<br>
you have a superset of entities you care about. All calls on MOAB<br>
Core/Interface return matching entities that are local (owned + shared<br>
+ ghosted) only. So if you want only owned entities, or only ghosted<br>
ones, you can do something like this:<br>
```<br>
moab::Range allverts, ownverts, ghostverts;<br>
ierr = mb->get_entities_by_dimension(0, 0, allverts);<br>
ierr = pcomm->filter_pstatus(allverts, PSTATUS_NOT_OWNED,<br>
PSTATUS_NOT, -1, &ownverts);<br>
ierr = pcomm->filter_pstatus(allverts, PSTATUS_GHOST, PSTATUS_OR,<br>
-1, &ghostverts);<br>
```<br>
<br>
Vijay<br>
<br>
[1] <a href="ftp://ftp.mcs.anl.gov/pub/fathom/moab-docs/classmoab_1_1ParallelComm.html#ad151b3b024cfd0ab7adc00f77e2551c2" rel="noreferrer" target="_blank">
ftp://ftp.mcs.anl.gov/pub/fathom/moab-docs/classmoab_1_1ParallelComm.html#ad151b3b024cfd0ab7adc00f77e2551c2</a><br>
<br>
On Mon, Dec 7, 2015 at 6:25 AM, Nico Schlömer <<a href="mailto:nico.schloemer@gmail.com" target="_blank">nico.schloemer@gmail.com</a>> wrote:<br>
> Hi everyone,<br>
><br>
> When reading a mesh in parallel, I would like to get the vertices such that<br>
> every vertex belong to exactly one process. When reading with<br>
> ```<br>
> moab::Range verts;<br>
> ierr = mb->get_entities_by_dimension(0, 0, verts);<br>
> ```<br>
> the vertices along the process interfaces will be shared, i.e., they appear<br>
> on two processes.<br>
><br>
> I used to believe the above does the right thing and I have to use get the<br>
> shared entities separately<br>
> ```<br>
> moab::Range shared;<br>
> ierr = mcomm_->get_shared_entities(-1, shared, 0);<br>
> all.merge(shared);<br>
> ```<br>
> but it seems I'm on the wrong track.<br>
><br>
> Any hints?<br>
><br>
> Cheers,<br>
> Nico<br>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>