[petsc-users] DMLabelFilter start index 0 question
Emiel van de Ven
emiel.van.de.ven at gmail.com
Thu Jul 19 09:30:31 CDT 2018
Ah, that's the problem, I was running version 3.8.3, with 3.9.3 it's
working fine. I see that the implementation of DMLabelFilter changed in
version 3.9 to mitigate this problem, that when the start is below or at
the start of the label node range it wont allocate.
Thanks for the quick response!
Best,
Emiel
Op do 19 jul. 2018 om 12:48 schreef Matthew Knepley <knepley at gmail.com>:
> 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/596da7d7/attachment-0001.html>
More information about the petsc-users
mailing list