On Sat, Jan 12, 2019 at 6:59 PM Manav Bhatia via petsc-users < petsc-users@mcs.anl.gov> wrote:
> I have been studying the source code and the manual entries in the > documentation and have a better understanding of setting up a high-order DG > analysis. > > I have been able to identify the routines that set the order of the space > and its continuity (CG/DG). > > The following is still unclear and I would appreciate some guidance: > > — A implicit DG solve of the inviscid Euler equations would require > Jacobian contributions from the Riemann Solver at element interfaces. I do > not see the ability to define Jacobian contribution in > PetscDSSetRiemannSolver. What would be the best approach to do this? > See https://www.mcs.anl.gov/petsc/petsc-current/src/ts/examples/tutorials/ex11.c.html The Riemann solver computes the flux and the Jacobian is assembled in PETSc. > > — It appears that the only two choices for polynomials are Lagrange and > “simple”. I am not clear what the “simple” basis implies. Are these just > powers of x, y and z? > > — Are Legendre polynomials available elsewhere in PETSc? I saw some > mention of it in TS, but not in FE. > > Thanks, > Manav > > > > > On Jan 12, 2019, at 2:46 AM, Manav Bhatia <bhatiama...@gmail.com> wrote: > > > > While looking through some examples I see that both PetscDSSetJacobian > and DMPlexSNESComputeJacobianFEM are being used to set the functions to > evaluate the Jacobian contributions on each rank. > > > > This is my understanding after studying these (please correct if I am > wrong): > > > > — The PetscDSSetJacobian (and its corresponding residual routine) does > not seem to have the concept of an element. Instead, it provides the > derivatives of solution at a point and requires that the coefficients for > each form g_0, g_1, … be evaluated. Then, PETSc combines that in the > background. > > > > — DMPlexSNESComputeJacobianFEM is a method that calls PetscDSSetJacobian > to compute the Jacobian. > > > > > > If this is correct, I am a bit confused about the following: > > > > — For a DG solve, I can see that PetscDSSetRiemannSolver can be used to > compute the convective flux at the interface of two elements. However, I > don’t see how the Jacobian contribution of this flux can be computed and > added to the system Jacobian. > > > > — A more conventional FEM assembly iterates over elements, then over the > quadrature points, where the shape functions and their derivatives are > initialized and used for computation of residual and Jacobian. Is it > possible to follow this procedure in PETSc with DMPlex/DMForest and still > use multigrid? Is there an example that demonstrates this? > > > > — Is there some form of an index for elements that exist on the local > processor that can be used to iterate on local elements? > > > > > > I have tried to look, but could not find a document that outlines these > concepts. Is there one that exists and I have missed it? > > > > I would greatly appreciate some direction. > > > > Regards, > > Manav > > > > > > > > > >> On Jan 11, 2019, at 10:03 PM, Manav Bhatia <bhatiama...@gmail.com> > wrote: > >> > >> Hi, > >> > >> I am interested in setting up a high-order DG FEM solution with PETSc > on an octree mesh with adaptivity and geometric multigrid preconditioning. > Is there an example that demonstrates this with either DMForest or DMPlex. > >> > >> Thanks, > >> Manav > >> > >> > > > >