In DMPLEX, we compute the unweighted edge cut with this code 
https://gitlab.com/petsc/petsc/blob/master/src/dm/impls/plex/plex.c#L955 
<https://gitlab.com/petsc/petsc/blob/master/src/dm/impls/plex/plex.c#L955>
You may reuse most of this code to compute the edge cut in your case

> On Dec 5, 2019, at 10:34 PM, Mark Adams <[email protected]> wrote:
> 
> 
> 
> On Thu, Dec 5, 2019 at 11:20 AM Eda Oktay <[email protected] 
> <mailto:[email protected]>> wrote:
> Hello all,
> 
> I am trying to find edge cut information of ParMETIS and CHACO. When I use 
> ParMETIS, 
> MatPartitioningViewImbalance(part,partitioning)
> works and it gives also number of cuts.
> 
> However, when I used CHACO, it only gives imbalance information, not edge 
> cut. I have index sets but I couldn't find how to calculate edge cut.
> 
> I've never heard of edge-cuts wrt Chaco. I'm sure it does not collect that 
> information but you could look at the code.
>  
> 
> Also, does ParMETIS calculate edge cuts according to the values of weights or 
> number of weights?
> 
> Good question, I would assume this is an integer, the number of edge cuts, 
> and not the sum of the weights. If it prints and integer then that would be a 
> hint. 
>  
> 
> Thanks!
> 
> Eda

Reply via email to