Miguel,
   One possible way is to store the global numbering of any edge/vertex in the 
"component" attached to it. Once the mesh gets partitioned, the components are 
also distributed so you can easily retrieve the global number of any 
edge/vertex by accessing its component. This is what is done in the DMNetwork 
example pf.c although the global numbering is not used for anything.

Shri
From: Matthew Knepley <[email protected]<mailto:[email protected]>>
Date: Mon, 23 Feb 2015 07:54:34 -0600
To: Miguel Angel Salazar de Troya 
<[email protected]<mailto:[email protected]>>
Cc: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: Re: [petsc-users] DMNetworkGetEdgeRange() in parallel

On Sun, Feb 22, 2015 at 3:59 PM, Miguel Angel Salazar de Troya 
<[email protected]<mailto:[email protected]>> wrote:
Thanks. Once I obtain that Index Set with the routine 
DMPlexCreateCellNumbering() (I assume that the edges in DMNetwork correspond to 
cells in DMPlex) can I use it to partition a vector with as many components as 
edges I have in my network?

I do not completely understand the question.

If you want a partition of the edges, you can use DMPlexCreatePartition() and 
its friend DMPlexDistribute(). What
are you trying to do?

   Matt

Thanks
Miguel

On Sun, Feb 22, 2015 at 12:15 PM, Matthew Knepley 
<[email protected]<mailto:[email protected]>> wrote:
On Sun, Feb 22, 2015 at 11:01 AM, Miguel Angel Salazar de Troya 
<[email protected]<mailto:[email protected]>> wrote:
Hi

I noticed that the routine DMNetworkGetEdgeRange() returns the local indices 
for the edge range. Is there any way to obtain the global indices? So if my 
network has 10 edges, the processor 1 has the 0-4 edges and the processor 2, 
the 5-9 edges, how can I obtain this information?

One of the points of DMPlex is we do not require a global numbering. Everything 
is numbered
locally, and the PetscSF maps local numbers to local numbers in order to 
determine ownership.

If you want to create a global numbering for some reason, you can using 
DMPlexCreatePointNumbering().
There are also cell and vertex versions that we use for output, so you could do 
it just for edges as well.

  Thanks,

     Matt

Thanks
Miguel

--
Miguel Angel Salazar de Troya
Graduate Research Assistant
Department of Mechanical Science and Engineering
University of Illinois at Urbana-Champaign
(217) 550-2360<tel:%28217%29%20550-2360>
[email protected]<mailto:[email protected]>




--
What most experimenters take for granted before they begin their experiments is 
infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener



--
Miguel Angel Salazar de Troya
Graduate Research Assistant
Department of Mechanical Science and Engineering
University of Illinois at Urbana-Champaign
(217) 550-2360<tel:%28217%29%20550-2360>
[email protected]<mailto:[email protected]>




--
What most experimenters take for granted before they begin their experiments is 
infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener

Reply via email to