3
$\begingroup$

I am trying to understand 1D $L^2$-projections using quadratic basis functions. Using 3 data points, and the Lagrange polynomial it is easy enough to see how to write out 3 basis functions. With the hat functions from the linear basis, it is easy to see how to expand a function. The hat functions are like delta-functions. With the quadratic basis I am having trouble writing out an explicit expression for the basis function because there are three functions in the same interval. (Fig 8.36 here : https://people.fh-landshut.de/~maurer/femeth/node265.html#SHP3).

The next step of what I am looking to do is construct the so called "mass matrix". Is there a way to visualize the quadratic basis like a hat-function? Once the basis functions are known, the mass matrix elements can be computed by looking at the overlap between the basis functions, L2-inner product.

Thanks ahead, any advice or comments appreciated.

Mass matrix structure for the linear-hat functions (x's denote a non-zero entry):
linear

Edit:

This information is based off of the accepted answer below, which gives good references for figuring this out.

Structure of the mass matrix with quadratic basis functions: quad

$\endgroup$
  • $\begingroup$ I don't understand your question. Are you trying to visualize the quadratic interpolation functions? If that's the case, the figure you ever to is av depiction of them. It also seems that you are trying to program the Finite Element Method. $\endgroup$ – nicoguaro Mar 15 '15 at 3:59
  • $\begingroup$ Yes ultimately I am learning about the finite element method. Before I get there though, I am learning about just L^2-projection. I know how to plot the quadratic interpolation functions. I understand how to use them to approximate a function with 3-nodes. But I am unsure how to extend the quadratic interpolation functions to a larger range say k+1 points. Is this something that can be done? I've done it for the linear interpolation functions. I don't understand how to think of these 3-functions as a single basis function, for which I can compute the mass matrix. $\endgroup$ – wgwz Mar 15 '15 at 13:24
  • $\begingroup$ Let me rephrase that. You have 3 questions: 1) Is it possible to use higher order polynomials for the FEM?, 2) How do you interpolate a function, or, how do you find the coefficients for the linear combination of basis functions?, 3) After knowing how to interpolate, how to form the _mass matrix? Am I right? All these questions have answers, but please rewrite your question. $\endgroup$ – nicoguaro Mar 15 '15 at 14:35
  • $\begingroup$ @nicoguaro Hi, I am not asking 1). Yes, for 2.) and 3.). The post below has helped me with some of my confusion. $\endgroup$ – wgwz Mar 19 '15 at 2:24
1
$\begingroup$

With linear elements, you put the shape functions together into little hat-shaped basis functions and overlap them like this:

linear basis

With quadratic shape functions, you do something similar and overlap them in a similar way, but you gain an interior point inside the element that doesn't overlap with its neighboring element:

quadratic basis

*Images from http://hplgit.github.io/INF5620/doc/pub/sphinx-fem/._main_fem003.html and http://nptel.ac.in/courses/112104116/lecture-8/8_3.htm, respectively.

$\endgroup$
  • $\begingroup$ Does the mass matrix become 5-diagonal? In the linear element case the mass matrix is tri-diagonal (3-diagonal). Is there an exact quadrature rule for a 4th order polynomial? (The mass matrix is the product of two 2nd order polynomials). $\endgroup$ – wgwz Mar 19 '15 at 2:10
  • 1
    $\begingroup$ Yes. Though the interior degrees of freedom only have 3 non-zeros per row since they only overlap with their co-element DOFs. And yes, there are exact quadrature rules for quartics (e.g. a 3-point Gauss rule integrates up to quintics exactly). $\endgroup$ – Bill Barth Mar 19 '15 at 12:41
  • $\begingroup$ Can you take a look the structure of the mass matrix I have? It's shown in the original post. I suppose it's incorrect, as I have some rows with 5 non-zeros. Looking at the quadratic basis functions you posted, it seems that $M_{3,4} = (\phi_3, \phi_4)$ certainly has some overlap and hence a non-zero value. Whereas an entry like $M_{4,6}$ is a not for basis functions with common support so it is zero. Perhaps I viewing these functions the wrong way. The picture I posted shows non-zero values as x's. $\endgroup$ – wgwz Mar 19 '15 at 14:59
  • 1
    $\begingroup$ That's exactly what I said you should expect. 3 non-zeros per row for the interior DOFs and 5 for the DOFs on element boundaries. $\endgroup$ – Bill Barth Mar 19 '15 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.