MMG2D_MetricAniso.F90
ElmerIce_MeshAdapt2D(MMG2D_MetricAniso)
Metric
(dofs = 3)hessian
(dofs = 3)Nodal gradient
(dofs = 2)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
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)
Solver 5 Equation = "Metric2" Variable = -nooutput dumy Procedure = "ElmerIce_MeshAdapt2D" "MMG2D_MetricAniso" Metric Variable Name = String "M2" Hessian Variable Name = String "ddx2" Gradient Name = String "Gradient2" 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
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.