# 2D Anisotropic Metric Costruction

Hello to all,

I am carrying out simulations on a rocket under super sonic conditions. I started by generating an isotropic grid adaptation based on the gradient node base obtaining a value for each node. As second step, I wanted to move on to generating an anisotropic adaptation based on knowing :

• The gradient vector for each node ( to impose a direction )
• The knowledge of the error for each node ( to impose a dimension )

In conclusion, my question is whether there is a way to derive the three terms of the matrix ( two of the diagonal and the extra-diagonal) to impose the new metric from the data listen above, or does one have to start with other data.

Thank you in advance,

Lorenzo

Hello,
The expression of metric tensor you choose to drive the mesh adaptation process typically depends from the error estimator which best suits your numerical problem.

With linear finite elements, the metrics is often related to the Hessian of the numerical solution, as it can be proven to control the solution interpolation error. If an Hessian-based error estimator is also suitable to your numerical problem, there are several reconstruction techniques available to approximate the Hessian when second derivatives are not directly available.
A search for metric based mesh adaptation in the academic literature could give you more complete answers, both about error estimation and Hessian reconstruction

If, instead, as a first trial you want to produce a metric tensor M based on some heuristics (just to test Mmg, for example), you should keep care for it to be symmetric positive definite, thus having an eigendecomposition M = R \Lambda R^T with strictly positive eigenvalues (those being the squared inverse of the sizes you desire in the directions of the eigenvectors). But I am not aware of any error estimator using the gradient vector to reliably build a metric tensorâ€¦

Hope this helps,

Luca