[petsc-users] Generating data on dmplex with varying DOFs

Prateek Gupta prateekgupta1709 at gmail.com
Sun Jul 17 10:51:37 CDT 2022


SD is a collocation method. Imagine a finite volume method, but instead of
a single point (cell and face centers), data is distributed over a grid
within the cell and the intersection of the grid with each of the cell's
faces. So unlike FV, the communication is for a DIM-1 dimensional grid on
the faces. I'll see if the SEM closures help me.



Thank you.
Sincerely,
Prateek Gupta, PhD


On Sun, Jul 17, 2022 at 7:59 PM Matthew Knepley <knepley at gmail.com> wrote:

> On Sun, Jul 17, 2022 at 7:41 AM Prateek Gupta <prateekgupta1709 at gmail.com>
> wrote:
>
>> Thanks!
>> On a similar note, is it possible to define data on faces of a parallel
>> (distributed) dmplex? I have seen the example particular to finite volume
>> methods. But the examples I am building are block-spectral where each
>> element has a higher order polynomial running (much like spectral element
>> methods without the nuisance to separate edge modes and nodal modes).
>>
>
> Yes, you can do this. For example,
> https://gitlab.com/petsc/petsc/-/blob/main/src/dm/impls/plex/tutorials/ex8.c
> shows closures for spectral elements.
>
>
>> What I am interested in is,
>>
>> 1. Define face data with multiple DOFs.
>>
>
> Yes, faces are mesh points, just like vertices, edges, and cells.
>
>
>> 2. A quick way of exchanging this face data between processors for
>> calculating fluxes.
>>
>
> GlobalToLocal will do this.
>
>
>> I have written all of this by hand already. Just wanted to check and
>> compare if dmplex would offer some performance improvement.
>>
>
> Possibly. There are some nice optimizations in PetscSF.
>
>
>> Additionally, petscFV could be extended to petscSD (SD stands for
>> spectral difference), where finite volume implementation is the zeroth
>> order special case.
>>
>
> How is SD different from a spectral element method, with respect to data
> layout and communication?
>
>   Thanks,
>
>      Matt
>
>
>> Thank you.
>> Sincerely,
>> Prateek Gupta, PhD
>>
>>
>> On Fri, Jul 15, 2022 at 5:43 PM Matthew Knepley <knepley at gmail.com>
>> wrote:
>>
>>> On Fri, Jul 15, 2022 at 7:08 AM Prateek Gupta <
>>> prateekgupta1709 at gmail.com> wrote:
>>>
>>>> Hi,
>>>> Is it possible to generate data using PetscSection with varying degrees
>>>> of freedom? I am building a sample example on a mixed grid (with both
>>>> hexahedra and tetrahedra) and thinking if it is possible to generate the
>>>> face data using PetscSection (or something else) on the resulting. The quad
>>>> faces have p*p data points and tri faces have p*(p-1)/2 data points.
>>>>
>>>
>>> Yes, you can set the size to whatever you want using
>>>
>>>   PetscSectionSetDof()
>>>   PetscSectionSetFieldDof()
>>>
>>> The DMPlexCreateSection() routine is overly simplistic here since I
>>> assume all k-cells have the same layout.
>>>
>>>   Thanks,
>>>
>>>      Matt
>>>
>>>
>>>> Thank you.
>>>> Sincerely,
>>>> Prateek Gupta, PhD
>>>>
>>> --
>>> 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/>
>>>
>>
>
> --
> 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/>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220717/1dec4d9b/attachment.html>


More information about the petsc-users mailing list