• No results found

6.4 Level set reinitialisation with adaptive mesh refinement: numerical examples

6.4.1 hp-convergence study: circular interface

The first experiment presented here is the reinitialisation of a level set function which can be

described analytically by the quadric (4.58) in the domain Ω = (−2, 2)2, which corresponds to

a circular interface centred at the origin. The signed distance function with the same interface, and therefore the analytical solution to the reinitialisation of (4.58) is stated in Equation (4.59). An hp-convergence study is performed, as described above, whereby the level set function is initialised on a Cartesian mesh with square elements of size, h = 0.4, of uniform polynomial order, p = 2, which is then, after each reinitialisation, adaptively refined and the initial level set function reprojected onto the new mesh, which continues in a loop until one of the stopping criteria is satisfied.

Figure 6.1 presents the error at which the Elliptic Reinitialisation method converges, for the circular interface problem on a sequence of adaptively refined meshes. The x-axis denotes a measure of the density of each of the meshes by taking the square root of the total number of degrees of freedom inside the narrow band. The reported number of degrees of freedom is chosen as the number of degrees of freedom inside the narrow band, as this is the computational domain over which both the problem is solved and the error is computed, and whilst there are more degrees of freedom in the domain (outside the narrow band) no solution exists on those

25 30 35 40 45 50 55 60 65 70 ndof1/2 10-7 10-6 10-5 10-4 10-3 10-2 10-1 100 Error L2 Error DG Error Error Estimate

Figure 6.1: Error against the square root of the number of degrees of freedom (ndof), for the solution of the circular interface reinitialisation problem, on an hp-adaptively refined mesh. The red line denotes the error tolerance defining one of the stopping criteria, which can change as the area of narrow band changes.

elements. Should the curve plotted on a semi-log plot of error against the square root of the number of degrees of freedom be a straight line with a negative gradient, one can say that the error decreases exponentially with mesh refinement. It is the aim of an hp-adaptive refinement strategy, that the error should decrease exponentially with increased mesh refinement.

In Figure 6.1 it can be seen that there is a region of roughly exponential convergence. Initially there is a region of slower convergence which corresponds to the set of meshes within which the singularity at the centre of the conic signed distance function describing the circular interface, still exists within the computational domain, as the mesh isn’t sufficiently fine such that the criterion defining the narrow band (see Section 5.2) is sufficient to remove this part of the mesh from the narrow band. In this region the convergence is relatively slow. As soon as the mesh is sufficiently refined to remove the singularity the error decays much more quickly. During the initial region of slower convergence it can be noted that even though the largest errors are near to the singularity at the centre of the circular interface on the reinitialised level set function and thus the refinement flags appropriately positioned, the computeAnalyticityTest function computes that the solution on these elements is smooth enough for p-refinement. The reason for this is that the analyticity estimate is based on a finite Legendre expansion, which for low order p will only have p + 1 points which could be too few to compute an accurate estimate. This is compounded with the fact that when there are few Legendre coefficients, the coefficient associated with the constant Legendre function has greater weight on the apparent decay rate of the remaining coefficients and thus the same singular function with greater magnitude will appear to decay faster. For these reasons the poor accuracy in the singular region is maintained until the upper limit on p-refinement is reached, that being p = 8 for this example problem, at which point the enforceRefinementLimits function, will switch the refinement flags from p to

4 5 6 7 8 Polynomial Order

Figure 6.2: Final computed mesh configuration for the circular interface reinitialisation problem on an hp-adaptively refined mesh where the colour of the element denotes the polynomial order of that element. The thick black line denotes the computed interface position.

h-refinement flags, which finally allows the mesh to become fine enough to remove the singularity from the narrow band. This is reflected in the final mesh shown in Figure 6.2. Beyond this point the problem is smooth and the rate of convergence increases.

It can also be seen in Figure 6.1, that the signed distance error roughly bounds the L2 error

from above and the DG error from below. In the earlier numerical examples in this thesis where a level set function is reinitialised on a series of fixed Cartesian meshes, generally speaking this same pattern could be noticed. This was less true during evolution, as reinitialisation during evolution can allow one to maintain a constant signed distance error, especially in the case that the curvature of the interface remains roughly constant throughout the evolution, whereas the

DG and L2 error norms are defined relative to an analytical solution and therefore additional

error at each step which accumulates over time using these measures is not reflected in the signed distance error estimate. However, there still seems to be a relationship between these quantities as of course an interface evolving such that it becomes more complicated means that it is more difficult to capture on a mesh and therefore both reinitialise and evolve.

The mesh shown in Figure 6.2, is the first mesh upon which the converged solution to the circular interface reinitialisation problem satisfies a stopping criterion of the mesh refinement loop, in this case the tolerance on the signed distance error. It can be seen in this figure, first of all, that the area of greatest refinement is near to the singularity at the vertex of the conic level set function which describes the signed distance function to the circular interface. The effect of the smoothing algorithm enforcing the bounds on local variation in both h and p is also obvious from the figure from the radial staircase pattern in the polynomial order spreading outwards from the singularity. Another point of note is that due to the regular distribution of square elements in the initial mesh, which is vastly maintained due to the smoothness of the solution away from the singularity, the level set interface in elements near to the x = 0 and

y = 0 planes aligns more congruently with the background grid, whereas this is not the case

for all of the remaining examples in this chapter, the thick black line denoting the position of the level set interface is drawn using the built-in MATLAB function contour, interpolating on

each element at a set of (pτ + 1)2 equidistant interpolation points on each element. Further, it

should also be noted that the white space inside the domain indicates the positions of the set of elements which are not inside the narrow band, and thus that white is never used as a colour to denote polynomial order.