[petsc-users] FE Tabulation values

Matthew Knepley knepley at gmail.com
Tue Mar 26 18:17:07 CDT 2024


On Tue, Mar 26, 2024 at 2:23 PM Noam T. via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> Hello, I am trying to understand the FE Tabulation data obtained from e. g
> . PetscFEComputeTabulation. Using a 2D mesh with a single triangle, first
> order, with vertices (0,0), (0,1), (1,0) (see msh file attached), and a
> single quadrature point
> ZjQcmQRYFpfptBannerStart
> This Message Is From an External Sender
> This message came from outside your organization.
>
> ZjQcmQRYFpfptBannerEnd
> Hello,
>
> I am trying to understand the FE Tabulation data obtained from e.g .
> PetscFEComputeTabulation. Using a  2D mesh with a single triangle, first
> order, with vertices (0,0), (0,1), (1,0) (see msh file attached), and a
> single quadrature point at (1/3, 1/3), one gets Nb = 6, Nc = 2, Nq = 1, and
> the arrays for the basis and first derivatives are of sizes [Nq x Nb x Nc]
> = 12 and[Nq x Nb x Nc x dim] = 24, respectively
>

The tabulations from PetscFE are recorded on the reference cell. For
triangles, the reference cell is
(-1, -1) -- (1, -1) -- (-1, 1). The linear basis functions at these nodes
are

phi_0: -(x + y) / 2
phi_1: (x + 1) / 2
phi_2: (y + 1) / 2

and then you use the tensor product for Nc = 2.

/ phi_0 \  /    0     \   etc.
\    0     /  \ phi_0 /

The values of these two arrays are:
> basis (T->T[0])
> [-1/3, 0, 0, -1/3, 2/3, 0,
>  0, 2/3, 2/3, 0, 0, 2/3]
>

So these values are indeed the evaluations of those basis functions at
(1/3, 1/3). The derivatives are similar.

These are the evaluations you want if you are integrating in reference
space, as we do for the finite element integrals, and also the only way we
could use a single tabulation for the mesh.

  Thanks,

    Matt


> deriv (T->T[1])
> [-1/2, -1/2, 0, 0, 0, 0,
>  -1/2, -1/2, 1/2, 0, 0, 0,
>  0, 0, 1/2, 0, 0, 1/2,
>  0, 0, 0, 0, 0, 1/2]
>
> How does one get these values? I can't quite find a way to relate them to
> evaluating the basis functions of a P1 triangle in the given quadrature
> point.
>
> Thanks,
> Noam
>
>
>

-- 
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://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!d8GhOqpkJjEyg-Jdk6hvwyR7vg2vFqL9LClNxZuIOEKhjfIIOknalB0ZPB8qlb-PFQ9QOFJpkI3yqYMPcrLX$  <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!d8GhOqpkJjEyg-Jdk6hvwyR7vg2vFqL9LClNxZuIOEKhjfIIOknalB0ZPB8qlb-PFQ9QOFJpkI3yqfu8CBr3$ >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240326/e245146f/attachment-0001.html>


More information about the petsc-users mailing list