[petsc-users] DMLabelFilter start index 0 question

Matthew Knepley knepley at gmail.com
Thu Jul 19 05:48:45 CDT 2018


On Thu, Jul 19, 2018 at 6:21 AM Emiel van de Ven <emiel.van.de.ven at gmail.com>
wrote:

> Dear PETSc users,
>
> I have a mesh where I have a label that contains some elements. If I
> understand correctly, after uniform refinement, the label also contains the
> refined faces and vertices. Since I'd like to have only cells in the label,
> I thought to remove the rest using something like:
>
> DMPlexGetDepthStratum(dm, 3, &vStart, &vEnd);
> DMLabelFilter(label, vStart, vEnd);
>
> However, I don't fully understand the functioning of DMLabelFilter. When
> vStart>0, it works as I would expect, but when vStart=0, it simply removes
> all the points from the label. Why is this happening?
>
> Since for the cells vStart usually is 0, I can't use this method. Am I
> missing something?
>
> Attached is a minimal working example.
>

I have just compiled and run your example. This is what I get:

master *:~/Downloads/tmp$ ./main

Label 'Cell Sets':

  Index has been calculated in [1, 10)

[0]: 1 (4)

[0]: 2 (4)

[0]: 3 (4)

[0]: 4 (4)

[0]: 5 (4)

[0]: 6 (4)

[0]: 7 (4)

[0]: 8 (4)

[0]: 9 (4)

Label 'Cell Sets':

  Index has been calculated in [0, 10)

[0]: 1 (4)

[0]: 2 (4)

[0]: 3 (4)

[0]: 4 (4)

[0]: 5 (4)

[0]: 6 (4)

[0]: 7 (4)

[0]: 8 (4)

[0]: 9 (4)

What version are your running with?

  Thanks,

    Matt


> Best,
> Emiel
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180719/e71b78c8/attachment-0001.html>


More information about the petsc-users mailing list