giving weights in partnmesh

I was reading the code for partnmesh ver 5.0pre2
according to what i read, If i add a 3rd value to the 1st line .mesh file ( for example -1) then it will be called a subroutine that reads the elements and weights too

in the case of a tetrahedra

30000 2 -1
1 2 3 4 1
2 5 6 7 3
.......

in theory the last (fifth number is a cell weight) , is that correct? , how should be the format of the weights ? the code says is idxtype(aka int) because i get always seg. fault

In any case how can I assign weights at the element level ?

RE: I think the cleanest way to

I think the cleanest way to assign weights to the element level is to extract the dual graph using metis's routines, then add weights to the vertices (which now correspond to elements), and then partition that using Metis's graph partitioning routines.