### General Information

• Solver Fortran File: MMG2D_MetricAniso.F90
• Solver Name: ElmerIce_MeshAdapt2D(MMG2D_MetricAniso)
• Required Output Variable(s):
• (1) Metric (dofs = 3)
• (2) hessian (dofs = 3)
• Required Input Variable(s):
• (1) Nodal gradient (dofs = 2)
• Optional Output Variable(s): None
• Optional Input Variable(s): None

### General Description

This solver is used for the mesh adaptation (Mesh Adaptation) to compute the anisotropic metric M.

The metric M , used to define the element size, derives from a geometric error estimate based on an upper bound for the interpolation error of a continuous field to piecewise linear elements (Frey and Alauzet, 2005).

For a variable v, M depends on the eigenvalues and eigenvector matrix R of the hessian matrix of v, H (i.e. small elements are required where the curvature is the highest): with and where

• is a geometric constant equal to 2/9 in 2D
• (resp. ) is a prescribed minimal (resp. maximal) edge size
• is the prescribed maximum error

First this solver compute the hessian matrix H; As computing second derivatives in linear elements in not straightforward this is done by solving the diffusive equation , where is a diffusivity proportionnal to the local element size ( ) and are the nodal gradients of the variable v (This can be computed using using the Compute2DNodalGradient Solver).

Finally, the metric M is then computed from Eq. (1)

### SIF contents

Solver 5
Equation = "Metric2"
Variable = -nooutput dumy

Metric Variable Name = String "M2"

Hessian Variable Name = String "ddx2"
Diffusivity = Real 0.5 !! the diffusivity k; the total diffusivity is kA

Linear System Solver = Direct
Linear System Direct Method = umfpack

Exported Variable 1 = -dofs 3 "M2"
Exported Variable 2 = -dofs 3 "ddx2"
End


Body Force 1
!! Parameters in Eq. 1
M2 Hmin = Real 1.0e-3
M2 Hmax = Real 1.0
M2 err =  Real 0.0033
End

### Example

Examples for anisotropic mesh adaptation can be found under [ELMER_TRUNK]/elmerice/Tests/MMG2D_Aniso1 and [ELMER_TRUNK]/elmerice/Tests/MMG2D_Aniso2, where the mesh size is adapted using 1 or 2 variables (i.e. combining metric informations), respectively. 