In Elmer/Ice, the dynamics of the grounding line is treated as a contact problem between the bedrock and the ice. We didn't use the floating hypothesis to determinate the GL position, neither we impose a Schoof type condition at the GL.

Many solvers and user functions are required to solve this complex problem. Here is a flowchart of the SIF file required to solve for the GL dynamics.

- 1/ Initialise the
`GroundedMask`

variable using GroundedSolverInit: (+ 1 if grounded, - 1 if floating, 0 if on the grounding line (also grounded but allow to localise the GL))

- 2/ Compute the Normal vector only where the ice is grounded. This is done by setting
`Compute Normal`

to`False`

for all boundaries, excepted at the bedrock where:

ComputeNormal Condition = Variable GroundedMask Real MATC "tx + 0.5"

- 3/ Compute the nodal force induced by the water pressure at the base of the ice-shelf using GetHydrostaticLoads (executed only on the bedrock bc).

- 4/ Execute the
*Stokes*solver. The contact is tested and updated during the non-linear iteration loop from the USF_Contact user function in the bedrock bc:

Slip Coefficient 2 = Variable Coordinate 1 Real Procedure "ElmerIceUSF" "SlidCoef_Contact"

- 6/ Solve for the lower free surface evolution.

- 7/ Update the Mesh using
*MeshUpdate*.

- 8/ Update the
`GroundedMask`

using GroundedSolver.

Favier L., O. Gagliardini, G. Durand and T. Zwinger, 2012. A three-dimensional full Stokes model of the grounding line dynamics: effect of a pinning point beneath the ice shelf. The Cryosphere, 6, 101-112, doi:10.5194/tc-6-101-2012.

Durand G., O. Gagliardini, B. de Fleurian, T. Zwinger and E. Le Meur. 2009. Marine Ice-Sheet Dynamics: Hysteresis and Neutral Equilibrium, J. of Geophys. Res., Earth Surface, 114, F03009, doi:10.1029/2008JF001170. [pdf]

Durand G., O. Gagliardini, T. Zwinger, E. Le Meur and R.C.A. Hindmarsh, 2009. Full-Stokes modeling of marine ice-sheets: influence of the grid size., Annals of Glaciology, 50(52), p. 109-114.

Gagliardini, O., D. Cohen, P. Råback and T. Zwinger (2007) Finite-element modeling of subglacial cavities and related friction law , J. Geophys. Res., 112, F0227, doi:10.1029/2006JF000576.

An example, not solving for the grounding line, but for a basal cavity opening at the interface between ice and a rigid bedrock, can be found in `[ELMER_TRUNK]/elmerice/Tests/Contact`

. This test is similar to what was done in Gagliardini et al. (2007), but it includes the recent developments induced by solving for the grounding line dynamics.
A second example using the MISMIP setup and two free surfaces can be found in `[ELMER_TRUNK]/elmerice/Tests/GL_MISMIP`

.