[MOAB-dev] synchronisation of ranges
Vijay S. Mahadevan
vijay.m at gmail.com
Wed Apr 1 14:30:49 CDT 2015
Lukasz,
The Range data-structure stores locally visible data (EntityHandles)
only and you can store these from various queries on the Interface
class. If you specifically want to store the shared entities in a
range, you can apply a Pstatus filter like below:
Range vlocal, vowned, vghost, adjs;
// Get all local vertices: owned + ghosted (including shared)
merr = mbiface->get_entities_by_dimension(0, 0, vlocal, false);MB_CHK_ERR(merr);
// filter based on parallel status
merr = pcomm->filter_pstatus(vlocal,PSTATUS_NOT_OWNED,PSTATUS_NOT,-1,vowned);MB_CHK_ERR(merr);
// filter all the non-owned and shared entities out of the list
adjs = moab::subtract(vlocal, vowned);
merr = pcomm->filter_pstatus(adjs,PSTATUS_GHOST|PSTATUS_INTERFACE,PSTATUS_OR,-1,&vghost);MB_CHK_ERR(merr);
adjs = moab::subtract(adjs, vghost);
vlocal = moab::subtract(vlocal, adjs);
Instead of PSTATUS_GHOST, you could use PSTATUS_SHARED if you wanted
to filter different set of (shared) entities locally. Hope this helps.
If not, let us know what is unclear.
Vijay
On Wed, Apr 1, 2015 at 6:43 AM, Lukasz Kaczmarczyk
<Lukasz.Kaczmarczyk at glasgow.ac.uk> wrote:
> Hello,
>
> It is quick method to synchronise ranges.
>
> 1) Range on each processor keeps entities, some of those entities are shared between one or more processors.
>
> 2) I need collectively synchronise that ranges, such that if entity is in range on one of processors is as well in range on other processors (only if it is shared).
>
> 3) I do not need to send entity, only synchronise entities in range which are shared.
>
> This is needed for collective operations on tags, instead of exchanging tags values, I need to synchronise range and then collectively set tags.
>
>
> Kind regards,
> Lukasz Kaczmarczyk
>
More information about the moab-dev
mailing list