[petsc-users] FE Tabulation values

Matthew Knepley knepley at gmail.com
Tue Apr 2 07:11:15 CDT 2024


On Tue, Apr 2, 2024 at 4:42 AM Noam T. <dontbugthedevs at proton.me> wrote:

> Thank you for the clarification.
>
> Are there references specifically for this tabulation method and its
> construction? I have seen some references about  the "FIAT" algorithm, but
> from a quick look I could not find all details.
>

The basis for tabulation is this algorithm:
https://urldefense.us/v3/__https://dl.acm.org/doi/10.1145/1039813.1039820__;!!G_uCfscf7eWS!f6jEiH1CuazpOliQttQfGv2Idl6TtDFefOQi3LMsOc1x75ElNLSY-l0BBvHSJhRf_B0HkkN0nvj0yEAhY_eJ$ 


> ---
>
> On a related note, I stated the values of Nq, Nc and Nb, as they can be
> checked. But to be sure; for the given 2D example:
>
>    - Nc = 2 refers to the two compoents as in x/y in 2D
>
> It means that you have a vector quantity here.

>
>    -
>
>
>    - Nb = 3 * 2 i.e. 3 shape functions (or nodes) times 2 components
>
> Yes. I am explicitly representing the tensor product structure, since
sometimes you do not have a
tensor product and I wanted to be general.


> Testing with a 3D mesh (e.g. a 4-node linear tetrahedron), Nc = 3 and Nb =
> 12, so the same math seems to work, but perhaps there is a different idea
> behind it.
>

Yes, that is right.

  Thanks,

    Matt


> Thanks.
> Noam
> On Tuesday, March 26th, 2024 at 11:17 PM, Matthew Knepley <
> knepley at gmail.com> wrote:
>
> 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!f6jEiH1CuazpOliQttQfGv2Idl6TtDFefOQi3LMsOc1x75ElNLSY-l0BBvHSJhRf_B0HkkN0nvj0yC6i1AIh$ 
> <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!f6jEiH1CuazpOliQttQfGv2Idl6TtDFefOQi3LMsOc1x75ElNLSY-l0BBvHSJhRf_B0HkkN0nvj0yADZFpMQ$ >
>
>
>

-- 
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!f6jEiH1CuazpOliQttQfGv2Idl6TtDFefOQi3LMsOc1x75ElNLSY-l0BBvHSJhRf_B0HkkN0nvj0yC6i1AIh$  <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!f6jEiH1CuazpOliQttQfGv2Idl6TtDFefOQi3LMsOc1x75ElNLSY-l0BBvHSJhRf_B0HkkN0nvj0yADZFpMQ$ >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240402/7681fa59/attachment-0001.html>


More information about the petsc-users mailing list