[petsc-users] Gauss quadrature for triangle or tetrahedral element and Nature ordering
Matthew Knepley
knepley at gmail.com
Tue Oct 16 13:55:51 CDT 2018
On Tue, Oct 16, 2018 at 12:31 PM Josh L <ysjosh.lo at gmail.com> wrote:
> Hi,
>
> Does anyone use PETSc to calculate the value determinant, basis function
> and the derivative of basis function at Gauss integration point?
>
> For quadrilateral element, I use PetscDTGaussQuadrature to get the
> location of integration point, and then use DMPlexComputeCellGeometryFEM to
> get the value of determinant.
>
> 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?
>
> Is there anyway to get the mapping between nature ordering and global
> ordering for vertex number?
>
The reason that it is a little disjointed is that we are in the process of
converting from what I had previously done:
https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMPLEX/DMPlexComputeCellGeometryFEM.html
to something which is much more flexible and nice
https://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/DM/DMFieldCreateFEGeom.html
You get the DMField object from
PetscErrorCode DMGetCoordinateField(DM dm, DMField *field)
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
old code until the documentation catches up. Otherwise, feel free to mail
DMField questions. The reason for DMField is that
you can have very general things that can evaluate themselves (particles,
Fourier bases, etc.) instead of just FEM.
Thanks,
Matt
> Thanks,
> Josh
>
>
--
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/20181016/bfd2e305/attachment.html>
More information about the petsc-users
mailing list