Hi Derek,

Thanks for your quick response. What if the elem pointer is not available, 
i.e., how can I 
obtain the i-th element in a parallel mesh without iterating over the mesh? 
Shall I use 
mesh.query_elem()?

Cheers,
Dafang

On 9/1/2015 5:17 PM, Derek Gaston wrote:
> if (elem->processor_id() == mesh.processor_id())
>
> On Tue, Sep 1, 2015 at 5:12 PM Dafang Wang <dafang.w...@jhu.edu 
> <mailto:dafang.w...@jhu.edu>> wrote:
>
>     Hi,
>
>     I am wondering how to query whether a processor owns a given element in a 
> parallel mesh,
>     assuming that the finite-element mesh is partitioned across multiple 
> processors. One
>     way I
>     can think of is to use an iterator over 
> ParallelMesh::active_local_elements() on each
>     processor, but this way is quite cumbersome.
>
>     Apparently the function ParallelMesh::query_element(const dof_id_type 
> elementID)
>     seems to
>     do the job, but it didn't work out when I ran in the parallel mode.
>
>     Any suggestions will be greatly appreciated. Thanks!
>
>     Cheers,
>     Dafang
>     --
>     Dafang Wang, Ph.D.
>     Postdoctoral Fellow
>     Institute of Computational Medicine
>     Department of Biomedical Engineering
>     Hackerman Hall 218
>     Johns Hopkins University, Baltimore, 21218
>
>     
> ------------------------------------------------------------------------------
>     _______________________________________________
>     Libmesh-users mailing list
>     Libmesh-users@lists.sourceforge.net 
> <mailto:Libmesh-users@lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/libmesh-users
>

-- 
Dafang Wang, Ph.D.
Postdoctoral Fellow
Institute of Computational Medicine
Department of Biomedical Engineering
Hackerman Hall 218
Johns Hopkins University, Baltimore, 21218
------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to