<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Sat, Jan 12, 2019 at 6:59 PM Manav Bhatia via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">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. <br>
<br>
I have been able to identify the routines that set the order of the space and its continuity (CG/DG). <br>
<br>
The following is still unclear and I would appreciate some guidance: <br>
<br>
— 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? <br></blockquote><div><br></div><div>You would set a BdResidual/BdJacobian function. You need my branch that makes these integrals 2-sided. However, you would also probably need to make an aux field with the geometric quantities you need. I can help you do that. Then we could roll that up and put it in the library.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
— 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? <br></blockquote><div><br></div><div>Correct. We would have to stick in another polynomial space. This is actually pretty easy. We already have code for Legendre in the</div><div>PetscQuadrature code, and we should also probably add Chebyshev. In addition, you probably want GLL quadrature. Some frustrating</div><div>people put GLL code in TS, which should be pulled out and made a PetscQuadrature. You can see that this is some coding to do, but</div><div>none of it is design/hard, it just needs to be done.</div><div><br></div><div>  Thanks,</div><div><br></div><div>    Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
— Are Legendre polynomials available elsewhere in PETSc? I saw some mention of it in TS, but not in FE. <br>
<br>
Thanks,<br>
Manav<br>
<br>
<br>
<br>
> On Jan 12, 2019, at 2:46 AM, Manav Bhatia <<a href="mailto:bhatiamanav@gmail.com" target="_blank">bhatiamanav@gmail.com</a>> wrote:<br>
> <br>
> 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. <br>
> <br>
> This is my understanding after studying these (please correct if I am wrong): <br>
> <br>
> — 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. <br>
> <br>
> — DMPlexSNESComputeJacobianFEM is a method that calls PetscDSSetJacobian to compute the Jacobian. <br>
> <br>
> <br>
> If this is correct, I am a bit confused about the following: <br>
> <br>
> — 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. <br>
> <br>
> — 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? <br>
> <br>
> — Is there some form of an index for elements that exist on the local processor that can be used to iterate on local elements? <br>
> <br>
> <br>
> 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? <br>
> <br>
> I would greatly appreciate some direction. <br>
> <br>
> Regards,<br>
> Manav<br>
> <br>
> <br>
> <br>
> <br>
>> On Jan 11, 2019, at 10:03 PM, Manav Bhatia <<a href="mailto:bhatiamanav@gmail.com" target="_blank">bhatiamanav@gmail.com</a>> wrote:<br>
>> <br>
>> Hi,<br>
>> <br>
>>  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. <br>
>> <br>
>> Thanks,<br>
>> Manav<br>
>> <br>
>> <br>
> <br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>