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

Matthew Knepley knepley at gmail.com
Fri Jul 15 07:13:12 CDT 2022


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/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220715/32a476a0/attachment-0001.html>


More information about the petsc-users mailing list