[petsc-users] How to refine the Vertex Sets in DMPlex

Lawrence Mitchell lawrence.mitchell at imperial.ac.uk
Wed Jun 8 02:46:16 CDT 2016


> On 8 Jun 2016, at 06:45, Rongliang Chen <rl.chen at siat.ac.cn> wrote:
> 
> Hi Matt,
> 
> I tried your suggestions but I still can not get the refined Vertex Sets. What I am doing looks like this:
> -----------------------------------------------------------------------
> if (!rank) {
>   DMPlexSetLabelValue(dm, "Vertex Sets", xx, xx)
>   DMPlexSetLabelValue(dm, "Face Sets", xx, xx)
> }
> 
> DMPlexDistribute(dm, xx, xx)
> 
> DMPlexGetStratumIS(dm, "Vertex Sets", xx, &vertexIS)
> ISGetLocalSize(vertexIS, &numVertexes1)
> 
> DMRefine(dm, xx)
> 
> DMPlexGetLabel(dm, "Face Sets", &facelabel)
> DMPlexLabelComplete(dm, facelabel)

There are no points in the transitive closure of the vertices, only the faces, so completion only changes the Face Sets label.

If you want to extract the refined DM's vertices and mark them in the Vertex Sets label you need to walk the points marked by the Face Sets label and transfer the values to the Vertex Sets when the point is a vertex.

Cheers,

Lawrence
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160608/79825df0/attachment.pgp>


More information about the petsc-users mailing list