<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">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>