I am trying to determine quality of my mesh elements using the Jacobian determinant as the measure. My algorithm takes vertices of nodes in triangular mesh and moves them around so as to form distorted triangles. Let us assume my vertex P(x,y,z) moves to P'(x',y',z') How to calculate the resulting change in mesh quality? One way to do this is to calculate jacobian of every triangle in mesh, but I cannot understand how to calculate the partial derivatives given only the displacement of nodes.

All the existing literature on Jacobian calculation seem to use a function to do so. Can anyone explain in simple terms?

  • $\begingroup$ Before thinking in an answer, I would like to ask a couple of things. Are your elements linear (how many nodes they have)? Is your problem nonlinear? $\endgroup$
    – nicoguaro
    Commented Sep 20, 2016 at 3:00
  • $\begingroup$ My elements are linear. I am working on triangular mesh with ~1000 vertices. Right now, I only displace the nodes so it is safe to assume that the problem is linear. $\endgroup$
    – Vidhi
    Commented Sep 20, 2016 at 6:14

1 Answer 1


You can define multiple measures for the quality of your mesh. For example, gmsh uses a criterion that measures the element shape. It is based on the element radii ratio, i.e., the ratio between the inscribed and circumscribed circles (See reference 1). I think that you can use the Jacobian to describe the quality of elements as well, although you might want to check reference 2.

Regarding the Jacobian, the first thing to mention is that is a function of the element coordinates in higher-order elements. Then, for those elements, you would need to compute a figure o merit per element, e.g., the average of the determinant or the maybe the norm. In the case of linear elements, you will have a transformation like the one described in the following image

Transformation from given triangle to axis-aligned right-angled triangle

For this simple case the transformation is given by $$\begin{pmatrix}x\\ y \end{pmatrix} = \mathbf{T}\begin{pmatrix}r\\ s \end{pmatrix} \equiv [J]\begin{pmatrix}r\\ s \end{pmatrix} + \begin{pmatrix}x_A\\ y_A \end{pmatrix} \enspace ,$$ with $$[J] = \begin{bmatrix} x_B - x_A &x_C - x_A\\ y_B - y_A &y_C - y_A \end{bmatrix} \enspace ,$$ and $\det J = (x_B - x_A)(y_C - y_A) - (x_C - x_A)(y_B - y_A)$. That is the simplest way to think about the transformation, and you can just find it solving a linear system of equations, and it just depends on the position of your nodes.

For your problem, you would like to compute the Jacobian then apply the displacement to each node, and compute it one more time.


  1. Geuzaine, Christophe, and Jean‐François Remacle. "Gmsh: A 3‐D finite element mesh generator with built‐in pre‐and post‐processing facilities." International Journal for Numerical Methods in Engineering 79.11 (2009): 1309-1331.
  2. Pébay, Philippe, and Timothy Baker. "Analysis of triangle quality measures." Mathematics of Computation 72.244 (2003): 1817-1839.
  • $\begingroup$ Thanks nicoguaro. The J matrix you define, can it be used to determine the quality of the triangle? The determinant of J needs to be positive for a triangular element in mesh to be valid. I was wondering if this holds for your definition of J. Cool references. I checked Philippe's paper before but for some reason I need to add Jacobians in my quality analysis along with the metrics described in paper. $\endgroup$
    – Vidhi
    Commented Sep 20, 2016 at 19:03
  • $\begingroup$ @Vidhi, I think so. Ideally you would like a determinant of 1, and you definitely don't want it to be too big or too small. The expression I wrote for $J$ should give the same values than using the the derivatives of the interpolation functions, it's just simpler this way for linear elements. But there are other ways of writing it. $\endgroup$
    – nicoguaro
    Commented Sep 20, 2016 at 20:06
  • $\begingroup$ Thanks! I will accept your answer. But I am open to more ways of calculating Jacobian if anyone want to contribute. $\endgroup$
    – Vidhi
    Commented Sep 20, 2016 at 22:56
  • $\begingroup$ could you please explain how did you get the J matrix and could you explain how to formulate J matrix with three coordinates(x,y,z). $\endgroup$ Commented Mar 6, 2020 at 12:57
  • $\begingroup$ Though the question is pretty old, still to answer @AravindhSK any preliminary book on FEM may be consulted to see the derivation of the Jacobian; for example, Chandrupatla and Belegundu (2002), Introduction to Finite Elements in Engineering, Prentice Hall $\endgroup$
    – sb1966
    Commented Apr 1, 2020 at 17:32

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.