dunecurvedgrid
dunecurvedgrid
A metagrid for dune grids mapping flat geometries to curved geometries
Requires: 
dunegrid
dunecurvedgeometry

Suggests: 
dunelocalfunctions
dunefunctions
dunefoamgrid
dunealugrid

Maintainer:  Simon Praetorius, Florian Stenger 
Git repository: 
https://gitlab.mn.tudresden.de/iwr/dunecurvedgrid 
DuneCurvedGrid  A Dune module for geometry parametrization
This Dune module provides a metagrid for wrapping other grid implementations and providing a curved geometry on each element, parametrized by a DuneCurvedGeometry class.
Example of usage
// 1. Construct a reference grid
auto refGrid = GmshReader< FoamGrid<2,3> >::read("sphere.msh");
// 2. Define the geometry mapping
auto sphere = [](const auto& x) { return x / x.two_norm(); };
auto sphereGF = analyticDiscreteFunction(sphere, *refGrid, order);
// 3. Wrap the reference grid to build a curved grid
CurvedGrid grid{*refGrid, sphereGF};
At first, we have to create a reference grid that acts as a parametrization domain for the
target curved grid. In the example, we use DuneFoamGrid
and read a piecewise flat grid
from a GMsh file sphere.msh
.
In a second step, we describe the parametrization of the curved surface/domain by a
closestpoint projection to the sphere. This projection is given by a callable sphere
and is wrapped into a gridfunction by a call to analyticDiscreteFunction
. This
gridfunction wrapper associates the lambdaexpression with a grid and a polynomial order
for the local interpolation of the projection into a Lagrange basis. This interpolation
allows to obtain values and derivatives of the geometry mapping.
Finally, the reference grid and the parametrization together build the curved grid. This
metagrid CurvedGrid
implements the Dune grid interface and can thus be used as
replacement for, e.g., the reference grid.
Further reading
The description of the module for surface parametrizations is written in the paper
and an illustration of its functionality is given in the presentation
S. Praetorius: “Curved Grid, A Dune module for surface parametrization”. 2020