[petsc-users] DMPlex total point counts

Nicholas Arnold-Medabalimi narnoldm at umich.edu
Mon Aug 8 10:56:21 CDT 2022


Thanks, this helped a great deal.

I wondered if there is any issue in using the IS generated by
DMPlexGetCellNumbering to count the cells instead? It looks like the IS
values will be -(globalID+1) if they are not on the local processor, so I
just count negative values instead of having to check the SF.

Sincerely
Nicholas

On Wed, Aug 3, 2022 at 10:33 AM Matthew Knepley <knepley at gmail.com> wrote:

> On Tue, Aug 2, 2022 at 4:00 PM Nicholas Arnold-Medabalimi <
> narnoldm at umich.edu> wrote:
>
>> Hi
>>
>> Currently, in my distributed DMPlex object, every so often, I want to
>> look at total cell counts. To do this in my current implementation, I get
>> the cell stratum from the DMplex and search through the PetscSF to remove
>> any overlapped (not owned) cells and then reduce over all the ranks to get
>> the total cell count. Is there a more graceful way of doing this already
>> built into DM?
>>
>
> If all you want is the global cell count, this is probably the easiest
> way. If you want a global numbering, you can use
>
>   https://petsc.org/main/docs/manualpages/DMPLEX/DMPlexGetCellNumbering/
>
>   Thanks,
>
>      Matt
>
>
>> Sincerely
>> Nicholas
>>
>> --
>> Nicholas Arnold-Medabalimi
>>
>> Ph.D. Candidate
>> Computational Aeroscience Lab
>> University of Michigan
>>
>
>
> --
> 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.cse.buffalo.edu/~knepley/>
>


-- 
Nicholas Arnold-Medabalimi

Ph.D. Candidate
Computational Aeroscience Lab
University of Michigan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220808/2911a9d3/attachment.html>


More information about the petsc-users mailing list