<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Oct 16, 2018 at 12:31 PM Josh L <<a href="mailto:ysjosh.lo@gmail.com">ysjosh.lo@gmail.com</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"><div dir="ltr">Hi,<div><br></div><div>Does anyone use PETSc to calculate the value determinant, basis function and the derivative of basis function at Gauss integration point?</div><div><br></div><div>For quadrilateral element, I use PetscDTGaussQuadrature to get the location of integration point, and then use DMPlexComputeCellGeometryFEM to get the value of determinant. <br></div><div><br></div><div>But I don't know how to do it for triangle element, and don't know how to use PETSc to calculate basis function and it's derivative?<br></div><div><br></div><div>Is there anyway to get the mapping between nature ordering and global ordering for vertex number? </div></div></blockquote><div><br></div><div>The reason that it is a little disjointed is that we are in the process of converting from what I had previously done:</div><div><br></div><div>  <a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMPLEX/DMPlexComputeCellGeometryFEM.html">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMPLEX/DMPlexComputeCellGeometryFEM.html</a></div><div><br></div><div>to something which is much more flexible and nice</div><div><br></div><div>  <a href="https://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/DM/DMFieldCreateFEGeom.html">https://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/DM/DMFieldCreateFEGeom.html</a></div><div><br></div><div>You get the DMField object from</div><div><br></div><div>  PetscErrorCode DMGetCoordinateField(DM dm, DMField *field)</div><div><br></div><div>which is sadly not documented yet, but just gives back the right thing. If the DMField stuff looks too new, you can just use the</div><div>old code until the documentation catches up. Otherwise, feel free to mail DMField questions. The reason for DMField is that</div><div>you can have very general things that can evaluate themselves (particles, Fourier bases, etc.) instead of just FEM.</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"><div dir="ltr"><div>Thanks,</div><div>Josh</div><div><br></div></div>
</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></div></div></div>