[petsc-users] DMSetLabelValue takes a lot of time for large domain

Danyang Su danyang.su at gmail.com
Tue Apr 24 22:57:26 CDT 2018


Hi All,

I use DMPlex in unstructured grid code and recently found 
DMSetLabelValue takes a lot of time for large problem, e.g., num. of 
cells > 1 million. In my code, I use

DMPlexCreateFromCellList ()

Loop over all cells/nodes{

DMSetLabelValue

}

DMPlexDistribute

The code works fine except DMSetLabelValue takes a lot of time for large 
problem. I use DMSetLabelValue to set material id for all the nodes or 
cells so that each subdomain has a copy of material id. Is there any 
other functions that can be used more efficient, e.g. set labels by 
array, not 1 by 1?

Thanks,

Danyang



More information about the petsc-users mailing list