i have some problems when reading the metis code

in METIS_partgraphkway
why coarsento is chosen as
coarsento=gk_max((*nvtxs)/(20*gk_log2(*nparts)), 30*(*nparts))
if i have more nvtxs and less nparts
it leads to the larger coarsento and less coarse levels
did it mean the level of recursive bisection is better than coarsen-refine level

i'm also curious about the reason why
nIparts = (ctrl->CoarsenTo == 30*(*nparts) ? 4 : 5)

RE: You are correct that if nvtxs

You are correct that if nvtxs is large and nparts is small, the coarsento will be larger. The rationale for that is in such cases, the code can afford to spend more time during the initial partitioning in finding a better solution, as the time required by the coarsening/refinement of the kway solution will be rather high.

As far as the second condition, it is again a speed vs quality trade-off. It applies when the code failed to achieve the desired coarsening level.