[petsc-users] node DG with DMPlex
Yann Jobic
yann.jobic at univ-amu.fr
Wed Mar 18 11:58:29 CDT 2020
Hi matt,
Le 3/17/2020 à 4:00 PM, Matthew Knepley a écrit :
> On Mon, Mar 16, 2020 at 5:20 PM Yann Jobic <yann.jobic at univ-amu.fr
> <mailto:yann.jobic at univ-amu.fr>> wrote:
>
> Hi all,
>
> I would like to implement a nodal DG with the DMPlex interface.
> Therefore, i must add the internal nodes to the DM (GLL nodes), with
> the
> constrains :
> 1) Add them as solution points, with correct coordinates (and keep the
> good rotational ordering)
> 2) Find the shared nodes at faces in order to compute the fluxes
> 3) For parallel use, so synchronize the ghost node at each time steps
>
>
> Let me get the fundamentals straight before advising, since I have never
> implemented nodal DG.
>
> 1) What is shared?
I need to duplicate an edge in 2D, or a facet in 3D, and to sync it
after a time step, in order to compute the numerical fluxes
(Lax-Friedrichs at the beginning).
>
> We have an implementation of spectral element ordering
> (https://gitlab.com/petsc/petsc/-/blob/master/src/dm/impls/plex/examples/tutorials/ex6.c).
> Those share
> the whole element boundary.
>
> 2) What ghosts do you need?
In order to compute the numerical fluxes of one element, i need the
values of the surrounding nodes connected to the adjacent elements.
>
> 3) You want to store real space coordinates for a quadrature?
It should be basically the same as PetscFE of higher order.
I add some vertex needed to compute a polynomal solution of the desired
order. That means that if i have a N, order of the local approximation,
i need 0.5*(N+1)*(N+2) vertex to store in the DMPlex (in 2D), in order to :
1) have the correct number of dof
2) use ghost nodes to sync the values of the vertex/edge/facet for
1D/2D/3D problem
2) save correctly the solution
Does it make sense to you ?
Maybe like
https://www.mcs.anl.gov/petsc/petsc-current/src/ts/examples/tutorials/ex11.c.html
With the use of the function SplitFaces, which i didn't fully understood
so far.
Thanks,
Yann
>
> We usually define a quadrature on the reference element once.
>
> Thanks,
>
> Matt
>
> I found elements of answers in those threads :
> https://lists.mcs.anl.gov/pipermail/petsc-users/2016-August/029985.html
> https://lists.mcs.anl.gov/mailman/htdig/petsc-users/2019-October/039581.html
>
> However, it's not clear for me where to begin.
>
> Quoting Matt, i should :
> " DMGetCoordinateDM(dm, &cdm);
> <Set field information into cdm instead of dm>
> DMCreateLocalVector(cdm, &coordinatesLocal);
> <Fill in higher order coordinate values>
> DMSetCoordinatesLocal(dm, coordinatesLocal);"
>
> However, i will not create ghost nodes this way. And i'm not sure to
> keep the good ordering.
> This part should be implemented in the PetscFE interface, for high
> order
> discrete solutions.
> I did not succeed in finding the correct part of the source doing it.
>
> Could you please give me some hint to begin correctly thoses tasks ?
>
> Thanks,
>
> Yann
>
>
>
> --
> 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/>
More information about the petsc-users
mailing list