Dune-MeshDist
Compute the Hausdorff-distance between parametrized grids.
The one-sided Hausdorff-distance between two grids G_1 and G_2 is defined as
d^H(G_1,G_2) = \sup_{p \in G_1} \inf_{q \in G_2} \|p - q\|_2
and the symmetric (two-sided) Hausdorff-distance as
d^S(G_1,G_2) = \max\{d^H(G_1,G_2), d^H(G_2,G_1)\}
The surface distance d(p, G_2) for p\in G_1 is implemented using a box background grid to identify the elements in G_2 that are "close" to p. In those elements the minimization problem to find the closest point is solved using a constrained LM method.
Example
Assume you have a reference grid and two parametrizations X1
and X2
on
this grid describing possibly curved geometries.
The following computes the one-sided Hausdorff-distance:
Dune::MeshDist::hausdorffDistance(X1, X2)
The two-sided (symmetric) Hausdorff-distance can be computed with
Dune::MeshDist::symmetricHausdorffDistance(X1, X2)
Additionally, there are L^1-distance and L^2-distance called the meanError(X1,X2)
and
meanSquareError(X1,X2)
also with symmetric versions.
Dependencies
In order to use this module, the following Dune dependencies must be installed
- dune-functions