{'fraction_non_alphanumeric': 0.031229493527411563, 'fraction_numerical': 0.008709658175744199, 'mean_word_length': 4.648079514824798, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Higher-order Adaptive Finite Difference Methods for Fully Nonlinear Elliptic Equations

We introduce generalised finite difference methods for solving fully nonlinear elliptic partial differential equations. Methods are based on piecewise Cartesian meshes augmented by additional points along the boundary. This allows for adaptive meshes and complicated geometries, while still ensuring consistency, monotonicity, and convergence. We describe an algorithm for efficiently computing the non-traditional finite difference stencils. We also present a strategy for computing formally higher-order convergent methods. Computational examples demonstrate the efficiency, accuracy, and flexibility of the methods.


Introduction
In this article we design generalised finite difference methods for a large class of fully nonlinear degenerate elliptic partial differential equations (PDEs). The approximation schemes are almost-monotone, which allows us to exploit the Barles-Souganidis convergence framework. A key feature of these methods is the use of piecewise Cartesian grids, augmented by additional discretisation points along the boundary. Because of the underlying structure of the grids, the methods we design overcome several hurdles that exist for current numerical methods. 1) The nonstandard finite difference stencils can be constructed efficiently. 2) The monotone approximation schemes preserve consistency near the boundary. 3) Higher-order schemes are easily designed. 4) Complicated geometries are easily handled.
In recent years, the numerical solution of these equations has received a great deal of attention, and several new methods have been developed including finite difference methods [BFO10,FDC08,LR05,SAK15,SWR11], finite element methods [Awa15,Böh08,BGNS11,SS14], least squares methods [DG06], and methods involving fourth-order regularisation terms [FN09]. However, these methods are not designed to compute weak solutions. When the ellipticity of the equation is degenerate or no smooth solution exists, methods become very slow, are unstable, or converge to an incorrect solution.
Using a framework developed by Barles and Souganidis [BS91], provably convergent (monotone) methods have recently been constructed for several fully nonlinear equations using wide finite difference stencils [Obe08a]. Recently, the idea of wide stencil schemes has been adapted to produce monotone approximations for a large class of fully nonlinear elliptic operators posed on very general meshes or points clouds [Fro17b]. However, constructing the necessary finite difference stencils is a very expensive process, and the resulting approximations have only O( √ h) accuracy.
1.2. Contributions of this work. The goal of this article is to design higherorder, adaptive, convergent finite difference methods for the solution of the degenerate elliptic PDE where u θθ denotes the second directional derivative of u in the direction e θ = (cos θ, sin θ) ∈ R 2 . This includes a wide range of PDE operators including monotone functions of the eigenvalues of the Hessian matrix D 2 u and general convex functions of the Hessian matrix [Eva82,Proposition 5.3]. We note that the maxima can also be taken over a subset of directions by simply setting F θ = −1 for directions that are not active in the PDE operator. The methods described in this article can also be trivially adapted to include minima and other monotone functions of the operators F θ . We remark that the PDE operator can also include Lipschitz continuous dependence on the gradient ∇u. Monotone approximation of first-order operators is fairly well-established and does not require the wide-stencil structure that is necessary to correctly discretise second-order operators. In this article, we omit terms involving the gradient for the sake of compactness and clarity.
We take as a starting point the meshfree finite difference approximations developed in [Fro17b]. Given a set of discretisation points G, that work introduced a generalised finite difference approximation of (1) of the form Above, the set of neighbours N (i, θ) gives indices of several points that are near x i and align closely with the e θ direction. In the original paper, these sets of neighbours are computed through brute force, by finding and inspecting all nodes lying within a distance √ h of each other. In this article, we describe the construction of piecewise Cartesian meshes using a quadtree structure, which is augmented by additional discretisation points along the boundary in order to preserve consistency. We demonstrate that the resulting set of discretisation points satisfies the conditions required by [Fro17b,Theorem 13]. This ensures that it is possible to build monotone (convergent) approximations. Moreover, the structure of these quadtrees allows for easy mesh adaptation, with refinement criteria that can either be specified a priori or determined automatically from the quality of the solution of (2).
By exploiting the underyling structure of the quadtree meshes, we design an efficient method for constructing the set of neighbours N (i, θ) required by our generalised finite difference stencils. This leads to a much faster numerical method for approximating solutions of (1) that can easily handle singular solutions, complicated geometries, and highly non-uniform meshes.
Finally, we describe a strategy for producing higher-order almost-monotone methods using the framework of [FO13]. This requires combining the monotone scheme with a formally higher-order approximation. By utilising the structure and symmetry within the quadtree mesh, we obtain a simple strategy for constructing higherorder schemes in the interior of the domain. Near the boundary, where these simple schemes no longer exist, we propose a least-squares approach to constructing higher-order schemes.
1.3. Contents. In section 2, we review the theory of generalised finite difference approximations for fully nonlinear elliptic equations. In section 3, we describe our strategy for constructing meshes and finite difference stencils. In section 4, we describe a higher-order implementation of these methods. In section 5, we present several computational examples. Finally, in section 6, we provide conclusions and perspectives.

Generalised Finite Difference Schemes
In this section we review existing results on the construction and convergence of numerical methods for fully nonlinear elliptic equations.
2.1. Weak solutions. One of the challenges associated with the approximation of fully nonlinear PDEs is the fact that classical (smooth) solutions may not exist. It thus becomes necessary to interpret PDEs using some notion of weak solution, and the numerical methods that are used need to respect this notion of weak solution. The most common concept of weak solution for this class of PDEs is the viscosity solution, which involves transferring derivatives onto smooth test functions via a maximum principle argument [CIL92].
The PDEs we consider in this work belong to the class of degenerate elliptic equations, We note that the operator is also defined on the boundary ∂Ω of the domain, which allows both the PDE and the boundary conditions to be contained within equation (3). For example, if Dirichlet data u(x) = g(x) is given on the boundary, the elliptic operator at the boundary will be defined by The PDE operators (1) that we consider in this work are degenerate elliptic if they are non-decreasing functions of their second argument (u) and non-increasing functions of all subsequent arguments (which involve second directional derivatives).
Since degenerate elliptic equations need not have classical solutions, solutions need to be interpreted in a weak sense. The numerical methods developed in this article are guided by the very powerful concept of the viscosity solution [CIL92]. Checking the definition of the viscosity solution requires checking the value of the PDE operator for smooth test functions lying above or below the semi-continuous envelopes of the candidate solution.  ). An upper (lower) semicontinuous function u is a viscosity subsolution (supersolution) of (1) if for every φ ∈ C 2 (Ω), whenever u − φ has a local maximum (minimum) at x ∈Ω, then Definition 2.4 (Viscosity solution). A function u is a viscosity solution of (1) if u * is a subsolution and u * a supersolution.
An important property of many elliptic equations is the comparison principle, which immediately implies uniqueness of the solution. 2.2. Convergence of elliptic schemes. In order to construct convergent approximations of elliptic operators, we will rely on the framework provided by Barles and Souganidis [BS91] and further developed by Oberman [Obe06].
We consider finite difference schemes that have the form where ǫ is a small parameter. The convergence framework requires notions of consistency and monotonicity, which we define below.
Definition 2.6 (Consistency). The scheme (4) is consistent with the equation (1) if for any smooth function φ and x ∈Ω, Definition 2.7 (Monotonicity). The scheme (4) is monotone if F ǫ is a nondecreasing function of its final two arguments.
Schemes that satisfy these two properties respect the notion of the viscosity solution at the discrete level. In particular, these schemes preserve the maximum principle and are guaranteed to converge to the solution of the underlying PDE.
Theorem 2.8 (Convergence [Obe06]). Let u be the unique viscosity solution of the PDE (1), where F is a degenerate elliptic operator with a comparison principle. Let the finite difference approximation F ǫ be consistent and monotone and let u ǫ be any solution of the scheme (4), with bounds independent of ǫ. Then u ǫ converges uniformly to u as ǫ → 0.
The above theorem assumes existence of a bounded solution to the approximation scheme. This is typically straightforward to show for a consistent, monotone approximation of a well-posed PDE, though the precise details can vary slightly and rely on available well-posedness theory for the PDE in question.
Theorem 2.9 (Existence and Stability [Fro17a,). Let F ǫ be a consistent, monotone scheme that is Lipschitz in its last two arguments. Suppose also that there exist strict classical sub-and super-solutions to the PDE (3). Then for small enough ǫ > 0, the scheme (4) has a solution u ǫ . Moreover, there exists a constant M > 0 such that u ǫ ∞ ≤ M for sufficiently small ǫ > 0.
In many cases, simple quadratic functions will serve as the sub-and supersolutions required by Theorem 2.9. For more complicated PDE operators, particularly those with a non-trivial dependence on the gradient ∇u, the theory of classical solutions of the equation can often be used to show the existence of these sub-and super-solutions.
2.3. Meshfree finite difference approximations. In [Fro17b], a new generalised finite difference method was introduced for approximating fully nonlinear second order elliptic operators on point clouds. We review the key results of that work, which will be foundational to the higher-order adaptive methods that will be developed in the remainder of this article. |x − y| is the distance between the set of interior discretisation points and the boundary. In particular, if x i ∈ G ∩ Ω and x j ∈ ∂Ω, then the distance between x i and x j is at least δ. (N6) dφ is the angular resolution used to approximate the second directional derivatives u θθ . (N7) dθ is the angular resolution used to approximate the nonlinear operator. (N8) ǫ is the search radius associated with the point cloud.
Discretising the PDE requires approximating second directional derivatives u θθ at each interior discretisation point x i ∈ G. To accomplish this, we consider all points x j ∈ G ∩ B(x i , ǫ) within a search neighbourhood of radius ǫ centred at x i . Discretisation points within this neighbourhood can be written in polar coordinates (r, φ) with respect to the axes defined by the lines x 0 + t(cos θ, sin θ), x 0 + t(− sin θ, cos θ). We seek one neighbouring discretisation point in each quadrant described by these axes, with each neighbour aligning as closely as possible with the line x 0 + tν, where ν = (cos θ, sin θ). That is, we select the neighbours Figure 1. We say that a stencil with angular resolution dφ exists for the point cloud G if for all interior discretisation points, the four discretisation points x j ∈ G defined by (5) exist and satisfy dφ = max{φ j }.
Because of the "wide-stencil" nature of these approximations (since the search radius ǫ ≫ h), care must be taken near the boundary. In order to preserve consistency up to the boundary, it is necessary that the boundary be more highly resolved than the interior (h B ≪ h). In particular, this means that a simple Cartesian mesh (or piecewise Cartesian mesh) is not sufficient for producing consistent schemes up to the boundary. Then a consistent, monotone approximation of u θθ is where we use the polar coordinate characterisation of the neighbours to define S j = r j sin φ j , C j = r j cos φ j and the coefficients are given by .
In general, the PDE requires evaluating second directional derivatives in all possible directions. Instead, we consider a finite subset Then we can substitute these coefficients into (2) to obtain the scheme: We recall the convergence result from [Fro17b, Theorem 18].
Theorem 2.11 (Convergence). Let F be a degenerate elliptic operator with a comparison principle that is Lipschitz continuous in u θθ for each θ ∈ [0, 2π) and let u be the unique viscosity solution of the PDE (1). Suppose also that (1) has a strict classical sub-and super-solution. Consider a sequence of point clouds G n , with parameters defined as in Definition 2.10, which satisfy the following conditions.
• The spatial resolution h n → 0 as n → ∞.
• The boundary resolution satisfies h n B /δ n → 0 as n → ∞. • The search radius satisfies both ǫ n → 0 and h n /ǫ n → 0 as n → ∞.
Then for sufficiently large n, the approximation scheme (6) admits a solution u n and u n converges uniformly to u as n → ∞.
We note that the angular resolution that emerges from the scheme satisfies dφ = O(max{h/ǫ, h B /δ}) (Figure 2). For a uniform grid, a natural choice of parameters . This leads to a formally optimal discretisation error of O( √ h). We remark also that these parameters can be defined locally instead of globally in order to accommodate highly non-uniform meshes.

Construction of Meshes and Stencils
In this section, we explain how we use augmented quadtrees [dBCvKO08, Chapter 14] to build piecewise Cartesian meshes with additional discretisation points on the boundary. We organise this section as follows. In subsection 3.1, we recall the basic structure of a quadtree. In subsection 3.2 we explain how we augment the quadtree to deal with the boundary. In subsection 3.4, we explain how the quadtrees are used to efficiently find the stencils. Finally, in subsection 3.3 we discuss mesh adaptation. Figure 2. The angular resolution of a generalised finite difference stencil.
3.1. Quadtrees. Quadtrees are based on a simple idea: a square can be divided into four smaller squares which correspond to the four quadrants of the square. A quadtree is then a rooted tree in which every internal node has four children and every node in the tree corresponds to a square. A square with no children is called a leaf square. See Quadtrees can then easily be used to build uniform and non-uniform meshes: the squares' vertices are the mesh points. This structure is appealing because it is general enough to allow for local mesh adaptation, while still maintaining enough structure to efficiently build the finite difference stencils. Indeed, as we will see in subsection 3.4, the quadtree structure allow us to significantly reduce the number of mesh points inspected when constructing our stencils. However, the quadtree in and of itself is not ideal for handling complicated geometries as the mesh points are restricted to be vertices of the squares. We observe that the global spatial resolution h of a quadtree corresponds to the length-scale of the largest leaf square. However, the quadtree can be highly non-uniform and the local spatial resolution near a particular point may be much less than h.

3.2.
Meshing the boundary. Quadtrees alone are not enough for the schemes proposed here: the boundary requires additional treatment. As discussed in section 2, the boundary must be more highly resolved than the interior to maintain consistency of the numerical method. As a result, we cannot restrict the mesh points to be the vertices of the squares in the quadtree.
To overcome this, we build augmented quadtrees: each leaf square that intersects the boundary is marked as such and additional mesh points that lie on the boundary are added and associated with this boundary leaf square. The immediate advantage of this approach is that mesh points may lie exactly on the boundary, which allows us to handle complicated geometries with ease. In addition, by keeping track of which boundary leaf square the mesh points belong to, we preserve one of the key properties of the quadtree: knowledge of the relative position of the mesh points. This allows for efficient construction of the finite difference stencils.
We make the following general assumption: each edge of a leaf square intersects the boundary at most once. This is a reasonable assumption that simply entails that our quadtree must be sufficiently refined near the boundary. See Figure 4, where each edge of the grey squares intersects the boundary at most once.
The only question left to address is exactly how many additional boundary mesh points one must add to guarantee the existence of a consistent stencil. This is addressed in Theorem 2.11, which requires that the boundary resolution go to zero more quickly than the resolution of the "standard" quadtree, h B = o(h), and more quickly than the gap between the boundary and the interior nodes, h B = o(δ). Note that these conditions need only be satisfied locally rather than globally.
We define a simple algorithm that enlarges a given point cloud so that the condition h B ≤ 2δ tan(dθ/2) is satisfied locally (see Algorithm 1). This ensures that the angular resolution of the finite difference approximations is commensurate with the angular resolution used to approximate the nonlinear operator: dφ Add the points in ∂S ∩ ∂Ω to the point cloud G.

5:
Compute the arc length, l, of the curve ∂Ω ∩ S.

8:
Add these points to the point cloud G. 9: end for In Figure 4, the meshes obtained by applying Algorithm 1 to the point cloud obtained from a quadtree of depth 4 are displayed. The fan-shaped domain illustrates the advantages of the local criteria: the boundary is only highly resolved when there are interior mesh points nearby.
These augmented quadtrees enable us to construct convergent (consistent and monotone) finite difference approximations. Proof. We need only verify that h n B /δ n → 0; the remaining conditions of Theorem 2.11 are trivially satisfied.
We recall that both h n B and δ n can be defined locally. Indeed, for each boundary leaf square S we can let  3.3. Refinement, adaptivity and balance. The use of quadtrees also provides a natural means of doing mesh adaptation. A refinement criteria can either be specified a priori or determined automatically from the quality of the solution.
In Figure 5, we provide an example of a priori refinement: the mesh is refined near the corners of the domain.
Simply refining the quadtree can lead to a very unbalanced quadtree when large squares adjoin several smaller squares. This is an undesirable property for our meshes as it makes the construction of high-order schemes significantly more difficult. Therefore, we always maintain a balanced quadtree: any two neighbouring squares differ by at most a factor of two in length scale (see Figure 5). Balancing a quadtree can be done efficiently; we refer to [dBCvKO08, Theorem 14.4] for details. 3.4. Generating the stencil. We explain how quadtrees are used to efficiently find the neighbours for each interior mesh point. The main idea is the following: given the quadtree structure we know the relative position of the mesh points and can significantly restrict the number of nodes we examine. Consider a direction ν = (cos θ, sin θ) and the line x 0 + tν. Without loss of generality, assume the line has positive slope as in Figure 6. We describe the procedure for finding the required neighbours of x 0 lying in the first and fourth quadrants.
From the list of potential neighbours in each quadrant, the precise neighbours used in the stencil are determined via (5). See Figure 6, for a close-up of the neighbours search in a uniform (left) and non-uniform (right) mesh.
Referring to Figure 6 (a), we provide a rough estimate on the improvement this algorithm yields for a uniform N × N grid with grid spacing h = O(1/N ). Recall that the search region is a disc of radius ǫ. The brute force algorithm used in [Fro17b] examines O((ǫ/h) 2 ) neighbours, while the algorithm proposed above using quadtrees examines only O(ǫ/h) neighbours. Given the typical choice ǫ = O( √ h), the cost of constructing the stencil at each point is reduced from O(N ) to O( √ N ). A similar speed-up is seen for the piecewise Cartesian meshes produced by the quadtree.

Higher-Order Methods
We also introduce a technique for building formally higher-order approximations on highly non-uniform/unstructured grids. We focus on second-order schemes, which is typically sufficient for applications, but the same ideas can be easily be extended to higher-order schemes.
Algorithm 2 Finding the neighbours of x 0 ∈ G in the first and fourth quadrant.
1: Identify the leaf square that has x 0 as its southwest vertex. This can be done efficiently since, when constructing the quadtree, a record is maintained of the (four) leaf squares that have each interior x 0 as a vertex. 2: Identify which edge(s) of this square intersect the line x 0 + tν, selecting the edge that yields the smaller value of t, t min (i.e. the first edge to intersect this ray). 3: Identify the neighbouring leaf squares that share this edge, selecting the one that intersects the line x 0 + tν at t = t min . 4: Identify the edge of this square that intersects the line x 0 + tν at t = t min . 5: Consider the two endpoints y 1 , y 2 of this edge as potential neighbours, one lying in the first quadrant and one in the fourth quadrant. 6: Repeat steps 2-5, continually adding nodes to the list of potential neighbours, until the ray x 0 + tν exits the search region (t > ǫ) or we encounter a boundary leaf square. 7: If the procedure terminates at a boundary leaf square, add to the list of potential neighbours all boundary nodes associated with this square. 4.1. Filtered schemes. The meshfree finite difference approximation discussed in section 2 is low accuracy; formally it is at best O( √ h). However it can be used as the foundation for higher-order convergent filtered schemes as in [FO13]. The main idea is to blend a monotone convergent scheme with a non-monotone accurate scheme and retain the advantages of both: stability and convergence of the former, and higher accuracy of the latter.
To accomplish this, we let F A [u] be any higher-order scheme and F M [u] be a monotone approximation scheme, both defined on the same mesh. The filtered scheme is then defined as where the filter S is given by As long as α > 0, this approximation converges to the viscosity solution of the PDE under the same conditions as the monotone scheme converges. The underlying reason is that this scheme is a small perturbation of a monotone scheme and the proof of the Barles-Souganidis theorem is easily modified to accommodate this. Moreover, if h α is larger than the discretisation error of the monotone scheme, the formal accuracy of the filtered scheme is the same as the formal accuracy of the non-monotone scheme.

4.2.
Higher-order schemes in interior. We discuss how to build high-order schemes for the non-uniform meshes proposed in section 3. In this section, we focus on interior mesh points away from the boundary.
Defining higher-order schemes for (1) reduces to defining higher-order approximations to u xx , u yy and u xy . We will focus on building second order approximations, although the ideas are easily generalised. For a uniform Cartesian grid, such as in Figure 7, these are widely known and are given by Figure 7. A regular node and respective stencil for a uniform Cartesian grid.
In a uniform cartesian grid, all the nodes are regular nodes; i.e., each node is the vertex of four different squares like the one depicted in Figure 7. However, the meshes proposed here are non-uniform and in general not all nodes will be regular nodes. We need also consider dangling nodes, which occur midway along the shared edge of two equally-sized squares, one of which is subdivided. Thus additional work is required to define the higher-order schemes.
As explained in section 3, the meshes are generated using quadtrees that are kept balanced (the lengths of neighbouring squares differ by at most a factor of two). Thus each interior mesh point can be associated to one of five different configurations. These are depicted in Figures 7, 8, and 9. The generic element chosen to represent each configuration is one where each square is a leaf square. In general, one or more of the smaller squares may have children in the quadtree; i.e., they may be subdivided into smaller squares. We consider these to be redundant when constructing the high-order schemes. Considering all possible different configurations would only increase the complexity of the schemes with no additional benefits as the schemes would remain asymptotically second order; only the asymptotic error constant could be improved.
For the configurations in Figure 8, we use the following approximations As for the configurations in Figure 9, we have The standard Taylor expansion argument shows that the above expressions are second order accurate. Finally, we explain how one can efficiently determine the configuration of each interior mesh point. As mentioned in subsection 3.4, for each interior mesh point a record is kept of the four leaf squares that the interior mesh point as a vertex. Thus the configuration is easily determined by determining the depth of the neighbouring squares and respective parent squares in the quadtree.

4.3.
Least-squares constructions near boundary. In this section, we discuss how to construct second order schemes at interior points near the boundary. When near the boundary, the construction of the schemes cannot reduce to the cases considered in the previous section: in general, not all the neighbouring mesh points will be the vertices of squares and some will lie on the boundary, which we allow to have a complicated geometry. Thus additional care is needed. Here we describe a general strategy for building high-order schemes. Figure 8. A dangling node in the x variable and respective stencil for the higher-order scheme. Figure 9. A dangling node in the y variable and respective stencil for the higher-order scheme.
Using Taylor expansion we obtain, for each i = 1, . . . , N , where we are using the multi-index notation. Hence To approximate second derivatives to second order, we expect to require N = 9 neighbours.
Designing second order schemes is now reduced to determining the neighbouring mesh points and solving the respective linear system. However, since we are particularly interested in the case where some of the neighbouring mesh points lie on the boundary, which may have a complicated geometry, it is hard to make any a priori claim regarding the invertability and conditioning of the linear system. It is important to point out that we are interested in obtaining any particular solution. As we saw in the previous section, depending on the derivative being approximated and the location of the neighbouring mesh points, the number of neighbouring mesh points required changes.
We are now ready to describe the strategy implemented to construct the higherorder schemes. First, we determine which configuration we are in. If all the vertices of squares neighbouring x 0 are mesh points, we use the approximations described in the previous section. Otherwise, we build the linear system above using all mesh points x i that lie within squares adjoining x 0 (some will lie on the boundary of the domain and will not be vertices of the squares). In general, we will have N ≥ 9, but the linear system may still have no solution or be ill-conditioned. If that is the case, we consider additional neighbouring mesh points by adding the mesh points that belong to neighbouring squares. In general, we end up with an under-determined system and we select the least squares solution. In practice, adding additional neighbouring mesh points was not always required, and it was never required more than once. Thus the high-order scheme has stencil width O(h) and preserves the formal discretisation error of O(h 2 ).
Results are displayed in Table 1. On each domain, the filtered implementation recovers the desired second-order accuracy even though the boundary nodes do not belong to the structured piecewise Cartesian mesh.
Example 5.2. We consider also a C 1 solution of the Monge-Ampère equation, for which the ellipticity is degenerate in an open set.
This solution is singular, and there is thus no realistic hope of attaining the formal second-order discretisation error obtained from Taylor's Theorem. Nevertheless, the method converges and we observe roughly first-order accuracy (Table 2). One of the reasons to use quadtrees to build non-uniform meshes was to efficiently find the neighbours for the finite difference schemes. Here we compare the implementation with quadtrees, discussed in depth in section 3, with the simple but inefficient brute force approach of [Fro17b]. Reduced CPU time is the ultimate goal, but not necessarily a robust measure of efficiency as it depends on both hardware and software implementations. Here both implementations were vectorised whenever possible in order to optimise the code for MATLAB. Although it is still possible to further optimise the code, the CPU time should be a fair indication of the improvement gained by using quadtrees.
In Figure 10, we compare the number of mesh points versus the CPU time required to generate the mesh and find the stencil. We let the domain Ω be the ellipse given by Ω = {(x, y) ∈ R 2 | x 2 + 2y 2 < 1}. The results indicate that our new approach is optimal, with the computation time required to construct the stencils being roughly proportional to the number of mesh points. This represents an improvement of roughly one order over the original brute force approach. In practice, we can generate a mesh and find the stencil based on a uniform 256 × 256 grid in roughly 50 seconds with the use of quadtrees, instead of over 6 minutes with the previous brute force approach.
We note that this solution is only Lipschitz continuous, and the equation must be understood in a weak sense.
We defined the following refinement strategy. Given a solution a solution u h , (1) Compute numerically D 2 u = u 2 xx + 2u 2 xy + u 2 yy . (2) Refine twice every square with a vertex such that h D 2 u > 0.5. This refinement strategy is inspired by the hybrid scheme proposed in [Obe08b].
A convergence plot is displayed in Figure 11. We observe an improvement in accuracy from roughly O(N −0.38 ) to O(N −0.64 ). Moreover, the use of adaptivity leads to a clear qualitative improvement in the computed solutions. This is evident in Figure 12, which shows that the solution obtained with the uniform mesh is visibly non-convex along the singularity, which does not align with the grid. By resolving this singularity, the adaptive method produces a solution that has a dramatically better quality.

Conclusions
In this article, we described generalised finite difference methods for solving a large class of fully nonlinear elliptic partial differential equations. These methods were inspired by the meshfree methods described in [Fro17b], which are flexible and convergent, but very expensive to implement.
Our meshes used a modified quadtree structure that used piecewise Cartesian grids in the interior of the domain, augmented by a set of points lying exactly on the boundary. The inclusion of the additional boundary points was needed to ensure convergence of the numerical methods. This type of mesh also allows us to deal easily with complicated boundary geometries.
By relying on the underlying quadtree structure, we developed an algorithm for efficiently constructing the mesh and finite difference stencils. This led to a dramatic improvement in computational efficiency as compared to the original brute force approach.
We also described a strategy for constructing higher-order approximations, which still fit within the convergence framework. In the interior of the domain, the quadtree structure allows us to explicitly write out the higher-order finite difference schemes. This strategy fails near the boundary, which can have a very complicated geometry. At these points, we employed a least-squares approach to construct higher-order schemes.
We also used these methods to perform automatic mesh adaptation, which refines the mesh near singularities in the computed solutions. This led to a dramatic qualitative and quantitative improvement in computed solutions.