I have a mesh of a 3D surface composed by triangles, and I have the value of a function $u(x,y,z)$ in every vertex of the mesh (every vertex of each triangle).

I need to calculate the following integral:

$\iint_S u_{xx}dA$

Normally, I calculate this integral as a sum over each triangle supposing that $u$ is linear on each triangle (because I know the value in the vertex o each triangle). So I can use the basis polinomial (typical of fem). My problem is that this basis must be polynomials of degree 1, but I need the second partial derivate, so this integral will be zero.

How can I calculate this integral?

  • $\begingroup$ didn't know it, I'll google now to see what it's about $\endgroup$
    – yemino
    Commented Dec 18, 2020 at 19:27
  • $\begingroup$ Is function $u(\vec{r})$ known for the whole space? Or only on the surface? If it is known then maybe one can use the Stokes theorem to convert the surface integral to a volume integral. $\endgroup$ Commented Dec 19, 2020 at 6:09
  • $\begingroup$ I have data only on the (not closed) surface. $\endgroup$
    – yemino
    Commented Dec 21, 2020 at 23:50

1 Answer 1


Why you are saying this integral even with linear interpolation is going to be zero? Are you familiar with VTK library?

Basically, it's the procedure to calculate your integral on your surface:

  1. Calculate $u_{xx}$ on each point or vertex by using vtkGradientFilter.

  2. Do the integration over the surface by using vtkIntegrateAttributes.

It should work. You can follow this procedure of taking derivative to calculate $u_{xx}$ by using FDM and then calculate the integral in any other programming language or libraries.

  • $\begingroup$ I said that because I was considering to interpolate the value of the function as a polynomial of degree less that 1 over each element, and then, when I calculate the second derivative on each element it is zero. It is easy, but do not have sense. I going to explore your idea, I think that the best solution is follows it. $\endgroup$
    – yemino
    Commented Dec 30, 2020 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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