# Solving Elliptical Equations in 3D by Means of an Adaptive Refinement in Generalized Finite Differences

Authors: Luis Gavete; Francisco Ureña; Juan Jose Benito; Miguel Ureña; Maria Lucia Gavete
Journal: Mathematical Problems in Engineering
 (2018)

---

## Abstract

We apply a 3D adaptive refinement procedure using meshless generalized finite difference method for solving elliptic partial differential equations. This adaptive refinement, based on an octree structure, allows adding nodes in a regular way in order to obtain smooth transitions with different nodal densities in the model. For this purpose, we define an error indicator as stop condition of the refinement, a criterion for choosing nodes with the highest errors, and a limit for the number of nodes to be added in each adaptive stage. This kind of equations often appears in engineering problems such as simulation of heat conduction, electrical potential, seepage through porous media, or irrotational flow of fluids. The numerical results show the high accuracy obtained.


---

## Body

## 1. Introduction

The generalized finite difference method, hereafter GFDM, is a meshless method that allows the linearization of the partial derivatives in a partial differential equation. Among the first works of the method, the works of Jensen [1], Perrone and Kao [2], Liszka and Orkisz [3], and Orkisz [4] are highlighted. Later, Benito et al. [5] provided explicit formulae of the GFDM and Ureña et al. [6] provided a compact matrix formulation of the method. Gavete et al. [7] reported improvements of the GFDM and comparison with other meshless methods. Various applications and implementations of the GFDM have been developed for solving different inverse problems by Fan et al. [8, 9]. Hosseini [10, 11] has applied the GFDM for natural frequency analysis of nanocomposite cylinders and for shock-induced two-dimensional coupled non-Fickian diffusion-elasticity analysis.Clark et al. [12] have investigated the problem of optimizing and adapting a surface mesh with high-order accurate nodal positions using the GFDM. The GFDM has been also used for solving 3D partial differential equations by Izadian et al. [13], Gavete et al. [14], and Hua et al. [15]. The GFDM was also applied for different practical tasks as in Chan et al. [16] for solving two-dimensional nonlinear obstacle problems, in Zhang et al. [17, 18] for simulating two-dimensional sloshing phenomena and for propagation of nonlinear water waves, in Mochnacki and Majchrzak [19] for modelling of casting solidification, and in Li and Fan [20] for solving two-dimensional shallow water equations.In 2D, two adaptive methods have been described in Benito et al. [21–23] using a posteriori error indicator. In 3D, an adaptive method has been described in Benito et al. [24]. These adaptive methods add nodes as midpoints between the central node and the furthest nodes in the star or in the barycentre of triangles formed in the star.Both in 2D and in 3D, Ureña et al. [25] have developed an improved adaptive method based on previous ones and with the ability of moving and removing nodes. This improved adaptive method allows greater reductions of the error using even fewer nodes.An advantage of increasing few nodes in a domain is to avoid the increasing in the calculation time. However, if the calculation time is not a problem and it is possible to add much more nodes, then it is better to use an adaptive method that places nodes in a more regular way than the improved adaptive method given in [25]. With this in mind, Gavete et al. [26] developed an adaptive method using a quadtree algorithm in 2D obtaining satisfactory results. The improved adaptive method and the proposed adaptive method using quadtree structure are not incompatible; in fact, they complement each other.It is more difficult to deal with adaptivity in 3D cases because the appearing of degenerated solutions is possible and it is also necessary to keep the number of nodes that are added in the refinement stages limited.In this paper, an octree data structure for avoiding the possibility of obtaining degenerated solutions in the adaptive process is shown. Because of the local behaviour of the refinement procedure and after successive refinement iterations, a cloud of nodes with different nodal densities is obtained. The octree split is controlled by an error indicator and a constraint that limit the possibility of adding too many nodes in each refinement stage, in order to obtain smooth transitions between the different nodal densities in the model.In the developed adaptive algorithm, the following characteristics are included: the use of a background octree structure, a criterion of selection of cells based on the variations of the gradient, an error indicator that works as a stop condition, and a limit for the addition of new nodes in each refinement stage. Moreover, different 3D elliptic partial differentials equations are solved for cases with sharp gradients. A practical application to the electric potential problem with unknown solution is also included.The remainder of the paper is organized as follows. In Section2, the GFDM for solving 3D elliptic equations is reviewed. Section 3 describes the use of the octree structure, the error indicator, and the implemented 3D adaptive procedure. Several examples are given in Section 4 where the application of the method to reduce the error is analyzed for different elliptic PDEs including cases with singularities in the solution. Finally, conclusions are given in Section 5.


## 2. Generalized Finite Differences

LetD⊂R3 and x∈D be a domain and a point of such domain and let us consider the following 3D elliptical partial differential equation:(1)LUx=fx,∀x∈Ω=intDwith Dirichlet boundary condition(2)Ux=gx,∀x∈Γ=frD,where U is the unknown function and f and g are known functions.Since generalized finite differences method is a meshless method, a discretization of the domain,M⊂D, is performed. Given a star Ex0=x0,x1,…,xN, the Taylor series is developed for each node in the star and the N resulting Taylor series are summed. Then the function given by the sum of the weighted quadratics errors in Taylor series for terms up to second order is defined:(3)BDu=∑i=1Nu0-ui+εiTDu2wi2,where wi=wx0,xi is the weighting function, u0=ux0 and ui=uxi are the approximations of U0=Ux0 and Ui=Uxi, respectively, and N is the number of nodes of the star without the central node. In 3D, the vectors Du and εi are(4)Du=∂u0∂x,∂u0∂y,∂u0∂z,∂2u0∂x2,∂2u0∂y2,∂2u0∂z2,∂2u0∂x∂y,∂2u0∂x∂z,∂2u0∂y∂zTεi=hi,ki,li,hi22,ki22,li22,hiki,hili,kiliT.In order to minimize the error, the function defined in (3) is minimized and the following system is obtained:(5)A·Du=b,where (6)A=∑i=1Nwi2εiεiTb=∑i=1Nwi2ui-u0εi.Solving (5) for Du, the approximated values of the partial derivatives are obtained and, substituting these values in the original equation (1), theequation of the star is achieved:(7)-λ0u0+∑i=1Nλiui=fx0.The numerical values in each inner node are obtained by solving the linear system of equations formed by each equation of the star. For more details about this matrix formulation see [6].Theorem 1.
A is a positive definite matrix if and only if the set ε1,ε2,…,εN contains a base of R9.Proof.
AsvTAv=vT∑i=1Nwi2εiεiTv=∑i=1Nwi2vTεiεiTv=∑i=1Nwi2vTεi2, it is followed that A∈M9R is a positive definite matrix if and only if, ∀v∈R9-0,vTAv>0⇔∄v∈R9-0 satisfying vTεi=0,∀i=1,2,…,N⇔ε1,ε2,…,εN, contains a base of R9.Consistency, Order, and Convergence.In order to obtain the truncation error, Taylor series expansion including higher order derivatives is used and therefore a higher order function B∗Du is obtained. The expression of B∗Du is similar to the one given in (3). If B∗Du is minimized with respect to the partial derivatives down to the second order, the following system is obtained:(8)A·Du=b∗=b+b∗∗.The new term b∗∗ corresponds to the new higher order derivatives incorporated in the Taylor series expansion to extend the function BDu to B∗Du. Then(9)Du=A-1·b∗=A-1·b+A-1·b∗∗and the truncation error of derivatives is(10)TEDu=A-1·b∗∗TEDu=Θhi2,ki2,li2⟹limhi,ki,li→0,0,0⁡TEDu⟶0.By considering bounded derivatives, the truncation error shows the consistency of the approximation for the equation given in (1).Lete0=u0-U0 be the error between the approximate and exact solution at the node x0 and let us consider (1) for U0 and u0:(11)LaU=-λ0U0+∑i=1NλiUi=fx0,y0,z0Lau=-λ0u0+∑i=1Nλiui=fx0,y0,z0Taking into account the fact that (12)Lau-LaU≤TEDuit is followed(13)Lae≤TEDuand, appealing to the maximum principle [27], we find that (14)e0≤TEDu=Θhi2,ki2,li2.Therefore both the local truncation error TEDu and the error e are Θhi2,ki2,li2 and the numerical solution converges to the exact solution as hi,ki,li→0,0,0.Further details about consistency, order, and convergence are given in [28].Numerical Convergence.In order to study the rate of convergence numerically, a sequence of uniform discretizations is considered. As in [29], the parameter δk=Ek+1/Ek is defined and it was proven that δk≈hk/hk+1γ, where k represents the different discretizations, γ is the rate of convergence, and (15)Ek=∑i=1NIUi-uik2/NImax⁡Ui×100%.The considered domain is the unit cube and the considered partial differential equation is the following (16)∂2U∂x2+∂2U∂y2+∂2U∂z2=0with exact solution(17)Ux,y,z=exsin⁡y+eysin⁡z+ezsin⁡x.The considered sequence of discretizations with the same step in the three axes is(18)h1=0.25,h2=0.2,h3=0.125,h4=0.1,h5=0.05.Table 1 shows the values of δk, hk/hk+1, and γ. Figure 1 displays the numerical convergence.Table 1
Numerical convergence.
δ k h k / h k + 1 γ k = 1 1.46 1.25 1.70 k = 2 2.32 1.60 1.79 k = 3 1.51 1.25 1.85 k = 4 3.74 2.00 1.90Figure 1
Numerical convergence. Abscissas represent the step of each discretization and ordinates represent the corresponding global error.As it can be appreciated, the rate of convergence is close to quadratic convergence.


## 3. An Adaptive Method Using Octree Algorithm

With the aim of improving the accuracy of the obtained approximation in a particular problem, it is possible to increase the number of nodes in the considered cloud of nodes. Since the GFDM allows using irregular clouds of nodes, the position of the added nodes can be selective and so it is possible to add more nodes in regions with higher errors. An important case of regions with higher errors gives rise when there are sharp variations of the gradient. In those cases, it is important to account for an adaptive algorithm that allows adding nodes as regular as possible.An octree algorithm is a tree data structure based on a cell with eight children. Each cell of an octree represents a cube in the physical space and each child represents an octant of its parent. In the first step, the octree algorithm uses the initial nodes and, hereafter, the process is realized recursively; that is, each cell in turn can be split into eight children that have a higher level than their parent. Figures2(a) and 2(b) display both the initial structure and the first stage of the refinement.Figure 2 (a)
Initial structure (b)
First step of the refinement. The cell in the corner has been divided into eight octantsIn spite of the fact that the GFDM is a meshless method and the application of the octree structure requires the computation of a mesh, it is important to note that there is not a loss of applicability in the method as the structure is just needed for the discretization of the domain, but not for the selection of the nodes of the star. Moreover, the use of the octree structure in the adaptive refinement places nodes in a favourable way in order to avoid ill-conditioned stars.As error indicator, we use an algorithm based on the computing of the variations of the gradient between the nodes of an octree cell.Firstly, the first-order derivatives are calculated by solving (5) and the gradient in each node is calculated as follows:(19)∇ui=∂ui∂x2+∂ui∂y2+∂ui∂z2.Secondly, for each cell, we calculate the mean value of the absolute variations of the gradient in the nodes of the cell divided by the distances and then this mean value is multiplied by the volume of the cell.(20)∇u-k=Volk·∑i=17∑j=i+18∇ui-∇uj/distxi,xj28.Finally, the criterion of selection of cells is given by(21)∇u-k>βs·34maxk⁡∇u-k+14mink⁡∇u-k,where k∈K, K is the set of cells formed in the domain, and(22)β0=0.4βs+1=βs+120swith s=1,2,…,nas and nas is the number of adaptive stages.As stop condition, we calculate the following error between two successive adaptive stages:(23)ej+1=∑i=1NIuij+1-uij2/NImaxi⁡uij+1·100%,where uij is the solution at the node i at the adaptive stage j and NI is the number of inner nodes at the adaptive stage j.In order to achieve better results, the following consideration should be taken into account. The refined cells should be less than 15% of the number of cells in the domain in each stage due to the amount of nodes generated by the octree method, 8 new cells and 19 new nodes by cell. This situation can provoke an unnecessary increase of nodes in the same stage and because of that it is better to increase the number of nodes in several stages.


## 4. Numerical Results

We solve five elliptic problems corresponding to partial differential equations with singularities or sharp variations of the gradients. In addition, we solve a practical case of potential electric where the exact solution is unknown.In the following examples, we use stars with 16 nodes formed by the octant criterion and we use the potential weighting function(24)wi=xi-x02-3,where ·2 is the Euclidean norm.The global error is calculated in each stage as follows:(25)Ej=∑i=1NIUi-uij2/NImax⁡Ui·100%,where uij is the solution at the node i at the adaptive stage j, Ui is the exact solution at the node i, and NI is the number of inner nodes at the adaptive stage j.In order to clarify the visualization of the figures, we only show the background octree structure in the boundaries.


### 4.1. Example 1

Let us consider the following heat transmission problem:(26)∂2U∂x2+∂2U∂y2+∂2U∂z2=0with exact solution(27)Ux,y,z=1x2+y2+z2.Note that in (27) there is a singular point in (0,0,0), outside the domain. Figures 3 and 4 show the initial and final discretization of the domain. The initial discretization has 125 nodes; see Table 2. The final discretization has 1776 nodes (8 stages). The initial global error is 18596% and the final global error is 0.3% after applying the proposed adaptive refinement and Figure 5 shows the successive reductions of the global error in logarithmic scale.Table 2
Example  1.
Node X Y Z 1 .00001 .00001 .00001 2 .2600 .0001 .0001 3 .5100 .0001 .0001 4 .7600 .0001 .0001 5 0.900 .0001 .0001 6 .0100 .2600 .0001 7 .2600 .2600 .0001 8 .5100 .2600 .0001 9 .7600 .2600 .0001 10 1.0100 .2600 .0001 11 .0100 .5100 .0001 12 .2600 .5100 .0001 13 .5100 .5100 .0001 14 .7600 .5100 .0001 15 1.2000 .5100 .0001 16 .0100 .7600 .0001 17 .2600 .7600 .0001 18 .5100 .7600 .0001 19 .7600 .7600 .0001 20 1.0100 .7600 .0001 21 .0100 0.9000 .0001 22 .2600 1.0100 .0001 23 .5100 1.2000 .0001 24 .7600 1.0100 .0001 25 .9000 .9000 .0001 26 .0100 .0001 .2600 27 .2600 .0001 .2600 28 .5100 .0001 .2600 29 .7600 .0001 .2600 30 0.9000 .0001 .2600 31 .0100 .2600 .2600 32 .2600 .2600 .2600 33 .5100 .2600 .2600 34 .7600 .2600 .2600 35 1.0100 .2600 .2600 36 .0100 .5100 .2600 37 .2600 .5100 .2600 38 .5100 .5100 .2600 39 .7600 .5100 .2600 40 1.2000 .5100 .2600 41 .0100 .7600 .2600 42 .2600 .7600 .2600 43 .5100 .7600 .2600 44 .7600 .7600 .2600 45 1.0100 .7600 .2600 46 .0100 0.9000 .2600 47 .2600 1.0100 .2600 48 .5100 1.2000 .2600 49 .7600 1.0100 .2600 50 0.9000 0.9000 2600 51 .0100 .0001 .5100 52 .2600 .0001 .5100 53 .5100 .0001 .5100 54 .7600 .0001 .5100 55 0.9000 .0100 .5100 56 .0100 .2600 .5100 57 .2600 .2600 .5100 58 .5100 .2600 .5100 59 .7600 .2600 .5100 60 1.0100 .2600 .5100 61 .0100 .5100 .5100 62 .2600 .5100 .5100 63 .5100 .5100 .5100 64 .7600 .5100 .5100 65 1.2000 .5100 .5100 66 .0100 .7600 .5100 67 .2600 .7600 .5100 68 .5100 .7600 .5100 69 .7600 .7600 .5100 70 1.0100 .7600 .5100 71 .0100 0.9000 .5100 72 .2600 1.0100 .5100 73 .5100 1.2000 .5100 74 .7600 1.0100 .5100 75 0.9000 0.9000 .5100 76 .0100 .0001 .7600 77 .2600 .0001 .7600 78 .5100 .0001 .7600 79 .7600 .0001 .7600 80 0.9000 .0100 .7600 81 .0100 .2600 .7600 82 .2600 .2600 .7600 83 .5100 .2600 .7600 84 .7600 .2600 .7600 85 1.0100 .2600 .7600 86 .0100 .5100 .7600 87 .2600 .5100 .7600 88 .5100 .5100 .7600 89 .7600 .5100 .7600 90 1.2000 .5100 .7600 91 .0100 .7600 .7600 92 .2600 .7600 .7600 93 .5100 .7600 .7600 94 .7600 .7600 .7600 95 1.0100 .7600 .7600 96 .0100 0.9000 .7600 97 .2600 1.0100 .7600 98 .5100 1.2000 .7600 99 .7600 1.0100 .7600 100 0.9000 0.9000 .7600 101 .0100 .0001 1.0100 102 .2600 .0001 1.0100 103 .5100 .0001 1.0100 104 .7600 .0001 1.0100 105 0.9000 .0001 1.0100 106 .0100 .2600 1.0100 107 .2600 .2600 1.0100 108 .5100 .2600 1.0100 109 .7600 .2600 1.0100 110 1.0100 .2600 1.0100 111 .0100 .5100 1.0100 112 .2600 .5100 1.0100 113 .5100 .5100 1.0100 114 .7600 .5100 1.0100 115 1.2000 .5100 1.0100 116 .0100 .7600 1.0100 117 .2600 .7600 1.0100 118 .5100 .7600 1.0100 119 .7600 .7600 1.0100 120 1.0100 .7600 1.0100 121 .0100 0.9000 1.0100 122 .2600 1.0100 1.0100 123 .5100 1.2000 1.0100 124 .7600 1.0100 1.0100 125 0.9000 0.9000 1.0100Figure 3
Initial cloud of nodes with 125 nodes.Figure 4
Final cloud of nodes with 1776 nodes.Figure 5
Reduction of the global error in logarithmic scale. Abscissa axis represents the number of inner nodes.


### 4.2. Example 2

Let us consider the following Poisson problem:(28)∂2U∂x2+∂2U∂y2+∂2U∂z2=2·y2z2+x2z2+x2y2x3y3z3with exact solution(29)Ux,y,z=1xyz.Note that in (29) there is a singular point in (0,0,0), outside the domain. Figures 6 and 7 show the initial and final discretization of the domain. The initial discretization has 125 nodes and is generated as follows:(30)xi=10.75xci-0.51xci-0.512+yci-0.512+zci-0.512+0.51yi=10.75yci-0.51xci-0.512+yci-0.512+zci-0.512+0.51zi=10.75zci-0.51xci-0.512+yci-0.512+zci-0.512+0.510.01≤xc,yc,zc≤1.01withxc,yc,zc=0.01,0.026,0.051,0.076,1.01.The final discretization has 608 nodes (8 stages). The initial global error is 69% and the final global error is 0.7% after applying the proposed adaptive refinement and Figure 8 shows the successive reductions of the global error in logarithmic scale.Figure 6
Initial cloud of nodes with 125 nodes.Figure 7
Final cloud of nodes with 608 nodes.Figure 8
Reduction of the global error in logarithmic scale. Abscissa axis represents the number of inner nodes.


### 4.3. Example 3

Let us consider the problem governed by the following partial differential equation:(31)∂2U∂x2+∂2U∂y2+∂2U∂z2=6x+y+z3with exact solution(32)Ux,y,z=1x+y+z.Note that in (32) there is a singular point in (0,0,0), outside the domain. Figures 9 and 10 show the initial and final discretization of the domain. The initial discretization has 125 nodes and is generated as follows:(33)xi=10.75xcixci-0.512+yci-0.512+zci-0.512yi=10.75ycixci-0.512+yci-0.512+zci-0.512zi=10.75zcixci-0.512+yci-0.512+zci-0.5120.01≤xc,yc,zc≤1.01withxc,yc,zc=0.01,0.026,0.051,0.076,1.01.The final discretization has 863 nodes (7 stages). The initial global error is 78% and the final global error is 0.7% after applying the proposed adaptive refinement and Figure 11 shows the successive reductions of the global error in logarithmic scale.Figure 9
Initial cloud of nodes with 125 nodes.Figure 10
Final cloud of nodes with 863 nodes.Figure 11
Reduction of the global error in logarithmic scale. Abscissa axis represents the number of inner nodes.


### 4.4. Example 4

Let us consider the problem governed by the following partial differential equation:(34)∂2U∂x2+∂2U∂y2+∂2U∂z2=gx,y,zwith exact solution (35)Ux,y,z=12000x21-x2e10x2-1y21-y2e10y2-1z21-z2e10z2-1and g(x,y,z) is the function obtained by applying left hand side in (34) to the exact function.Figures12 and 13 show the initial and final discretization of the domain. The initial discretization has 125 nodes; see Table 3. The final discretization has 1449 nodes (7 stages). The initial global error is 188418% and the final global error is 0.15% after applying the proposed adaptive refinement and Figure 14 shows the successive reductions of the global error in logarithmic scale.Table 3
Example  4.
Node X Y Z 1 .1100 .0100 .0100 2 .2600 .0100 .0100 3 .5100 .0100 .0100 4 .7600 .0100 .0100 5 0.9000 .0100 .0100 6 .0100 .2600 .0100 7 .2600 .2600 .0100 8 .5100 .2600 .0100 9 .7600 .2600 .0100 10 1.0100 .2600 .0100 11 −.0500 .5100 .0100 12 .2600 .5100 .0100 13 .5100 .5100 .0100 14 .7600 .5100 .0100 15 1.0500 .5100 .0100 16 .0100 .7600 .0100 17 .2600 .7600 .0100 18 .5100 .7600 .0100 19 .7600 .7600 .0100 20 1.0100 .7600 .0100 21 .1100 0.9000 .0100 22 .2600 1.0100 .0100 23 .5100 1.0100 .0100 24 .7600 1.0100 .0100 25 0.9000 0.9000 .0100 26 .1100 .0100 .2600 27 .2600 .0100 .2600 28 .5100 .0100 .2600 29 .7600 .0100 .2600 30 0.9000 .0100 .2600 31 .0100 .2600 .2600 32 .2600 .2600 .2600 33 .5100 .2600 .2600 34 .7600 .2600 .2600 35 1.0100 .2600 .2600 36 −.0500 .5100 .2600 37 .2600 .5100 .2600 38 .5100 .5100 .2600 39 .7600 .5100 .2600 40 1.0500 .5100 .2600 41 .0100 .7600 .2600 42 .2600 .7600 .2600 43 .5100 .7600 .2600 44 .7600 .7600 .2600 45 1.0100 .7600 .2600 46 .1100 0.9000 .2600 47 .2600 1.0100 .2600 48 .5100 1.0100 .2600 49 .7600 1.0100 .2600 50 0.9000 0.9000 .2600 51 .1100 .0100 .5100 52 .2600 .0100 .5100  53 .5100 .0100 .5100 54 .7600 .0100 .5100 55 0.9000 .0100 .5100 56 .0100 .2600 .5100 57 .2600 .2600 .5100 58 .5100 .2600 .5100 59 .7600 .2600 .5100 60 1.0100 .2600 .5100 61 −.0500 .5100 .5100 62 .2600 .5100 .5100 63 .5100 .5100 .5100 64 .7600 .5100 .5100 65 1.0500 .5100 .5100 66 .0100 .7600 .5100 67 .2600 .7600 .5100 68 .5100 .7600 .5100 69 .7600 .7600 .5100 70 1.0100 .7600 .5100 71 .1100 0.9000 .5100 72 .2600 1.0100 .5100 73 .5100 1.0100 .5100 74 .7600 1.0100 .5100 75 0.9000 0.9000 .5100 76 .0100 .0100 .7600 77 .2600 .0100 .7600 78 .5100 .0100 .7600 79 .7600 .0100 .7600 80 0.9000 .0100 .7600 81 .0100 .2600 .7600 82 .2600 .2600 .7600 83 .5100 .2600 .7600 84 .7600 .2600 .7600 85 1.0500 .2600 .7600 86 .0100 .5100 .7600 87 .2600 .5100 .7600 88 .5100 .5100 .7600 89 .7600 .5100 .7600 90 1.1000 .5100 .7600 91 .0100 .7600 .7600 92 .2600 .7600 .7600 93 .5100 .7600 .7600 94 .7600 .7600 .7600 95 1.0100 .7600 .7600 96 .0100 0.9000 .7600 97 .2600 1.0100 .7600 98 .5100 1.0100 .7600 99 .7600 1.0100 .7600 100 1.0100 1.0100 .7600 101 .0100 .0100 1.0100 102 .2600 .0100 1.0100 103 .5100 .0100 1.0100 104 .7600 .0100 1.0100 105 0.9000 .0100 1.0100 106 .0100 .2600 1.0100  107 .2600 .2600 1.0100 108 .5100 .2600 1.0100 109 .7600 .2600 1.0100 110 1.0100 .2600 1.0100 111 .0100 .5100 1.0100 112 .2600 .5100 1.0100 113 .5100 .5100 1.0100 114 .7600 .5100 1.0100 115 1.0100 .5100 1.0100 116 .0100 .7600 1.0100 117 .2600 .7600 1.0100 118 .5100 .7600 1.0100 119 .7600 .7600 1.0100 120 1.0100 .7600 1.0100 121 .0100 0.9000 1.0100 122 .2600 1.0100 1.0100 123 .5100 1.0100 1.0100 124 .7600 1.0100 1.0100 125 1.0100 1.0100 1.0100Figure 12
Initial cloud of nodes with 125 nodes.Figure 13
Final cloud of nodes with 1449 nodes.Figure 14
Reduction of the global error in logarithmic scale. Abscissa axis represents the number of inner nodes.


### 4.5. Example 5

Let us consider the problem governed by the partial differential equation (34) and with exact solution (35) in a different domain. Figures 15 and 16 show the initial and final discretization of the domain. The initial discretization has 125 nodes and is generated as follows:(36)xi=1.3xci-0.51xci-0.512+yci-0.512+zci-0.512max⁡xci-0.51,yci-0.51,zci-0.51+0.51yi=1.3yci-0.51xci-0.512+yci-0.512+zci-0.512max⁡xci-0.51,yci-0.51,zci-0.51+0.51zi=1.3zci-0.51xci-0.512+yci-0.512+zci-0.512max⁡xci-0.51,yci-0.51,zci-0.51+0.510.01≤xc,yc,zc≤1.01withxc,yc,zc=0.01,0.026,0.051,0.076,1.01.The final discretization has 3629 nodes (8 stages). The initial global error is 188935% and the final global error is 3% after applying the proposed adaptive refinement and Figure 17 shows the successive reductions of the global error in logarithmic scale.Figure 15
Initial cloud of nodes with 125 nodes.Figure 16
Final cloud of nodes with 3629 nodes.Figure 17
Reduction of the global error in logarithmic scale. Abscissa axis represents the number of inner nodes.The initial global errors in the examples are too high because we have generated starting clouds of few nodes to show the extreme conditions of the solutions involved. As it can be seen, the refinement gets large reductions of the global error in a few stages.The efficiency of the algorithm adding progressively new nodes shows the reduction in the solution error. The refinement procedure creates new nodes in the neighborhood of areas with higher gradients; furthermore these nodes have a more balanced distribution and it is not necessary further constraints to control ill-conditioned stars. Moreover, as the number of new nodes is limited in each adaptive stage, the transition between areas with different density of nodes is smooth.The method can be also applied to the case of Neumann boundary conditions. In this case the procedure described in [14] for the treatment of Neumann boundary conditions can be used.


### 4.6. Example 6

Electric fields are used for designing high voltage equipment. In these cases, it is necessary to know the distribution of the electrical potential. In electrical power distribution, a busbar is a metallic strip for local high current power distribution. We consider the case of a busbar box at potential 220 volts. The considered domain is0,1×[0,1]×[0,1] and the busbar is located at [0.25,0.5]×[0,0.25]×[0,0.25]. The boundary of the domain has potential 0 volts except on the busbar where potential is 220 volts. The problem is governed by the Laplace equation and the exact solution is unknown. Note that this case is very different regarding the previous ones. The solution is smooth and the variations of the gradient are more widespread in the domain.Figures18 and 19 show the initial and final discretization of the domain. The initial discretization has 125 nodes and the final discretization has 399 nodes (8 refinement stages).Figure 18
Initial discretization of the domain.Figure 19
Final discretization of the domain.In the octree refinement, the new interior nodes of each stage are incorporated in the next adaptive stages as nodes with unknown potential. As the exact error is unknown, the results obtained in the last adaptive step have been considered as the best approximation to the solution; then formula (25) has been used to compute the global error approximation in the initial and successive adaptive stages by comparing the obtained values with that best approximation. The initial global error approximation obtained by using (25) is 29.09% and the final global error approximation is 1.91%. Note that the global error (23) between two successive adaptive stages has been also used as stop condition of the refinement procedure with limit 2% in this case.Figure20 shows the successive reductions of the global error approximation in logarithmic scale.Figure 20
Reduction of the approximated global error in logarithmic scale. Abscissa axis represents the number of inner nodes.


## 4.1. Example 1

Let us consider the following heat transmission problem:(26)∂2U∂x2+∂2U∂y2+∂2U∂z2=0with exact solution(27)Ux,y,z=1x2+y2+z2.Note that in (27) there is a singular point in (0,0,0), outside the domain. Figures 3 and 4 show the initial and final discretization of the domain. The initial discretization has 125 nodes; see Table 2. The final discretization has 1776 nodes (8 stages). The initial global error is 18596% and the final global error is 0.3% after applying the proposed adaptive refinement and Figure 5 shows the successive reductions of the global error in logarithmic scale.Table 2
Example  1.
Node X Y Z 1 .00001 .00001 .00001 2 .2600 .0001 .0001 3 .5100 .0001 .0001 4 .7600 .0001 .0001 5 0.900 .0001 .0001 6 .0100 .2600 .0001 7 .2600 .2600 .0001 8 .5100 .2600 .0001 9 .7600 .2600 .0001 10 1.0100 .2600 .0001 11 .0100 .5100 .0001 12 .2600 .5100 .0001 13 .5100 .5100 .0001 14 .7600 .5100 .0001 15 1.2000 .5100 .0001 16 .0100 .7600 .0001 17 .2600 .7600 .0001 18 .5100 .7600 .0001 19 .7600 .7600 .0001 20 1.0100 .7600 .0001 21 .0100 0.9000 .0001 22 .2600 1.0100 .0001 23 .5100 1.2000 .0001 24 .7600 1.0100 .0001 25 .9000 .9000 .0001 26 .0100 .0001 .2600 27 .2600 .0001 .2600 28 .5100 .0001 .2600 29 .7600 .0001 .2600 30 0.9000 .0001 .2600 31 .0100 .2600 .2600 32 .2600 .2600 .2600 33 .5100 .2600 .2600 34 .7600 .2600 .2600 35 1.0100 .2600 .2600 36 .0100 .5100 .2600 37 .2600 .5100 .2600 38 .5100 .5100 .2600 39 .7600 .5100 .2600 40 1.2000 .5100 .2600 41 .0100 .7600 .2600 42 .2600 .7600 .2600 43 .5100 .7600 .2600 44 .7600 .7600 .2600 45 1.0100 .7600 .2600 46 .0100 0.9000 .2600 47 .2600 1.0100 .2600 48 .5100 1.2000 .2600 49 .7600 1.0100 .2600 50 0.9000 0.9000 2600 51 .0100 .0001 .5100 52 .2600 .0001 .5100 53 .5100 .0001 .5100 54 .7600 .0001 .5100 55 0.9000 .0100 .5100 56 .0100 .2600 .5100 57 .2600 .2600 .5100 58 .5100 .2600 .5100 59 .7600 .2600 .5100 60 1.0100 .2600 .5100 61 .0100 .5100 .5100 62 .2600 .5100 .5100 63 .5100 .5100 .5100 64 .7600 .5100 .5100 65 1.2000 .5100 .5100 66 .0100 .7600 .5100 67 .2600 .7600 .5100 68 .5100 .7600 .5100 69 .7600 .7600 .5100 70 1.0100 .7600 .5100 71 .0100 0.9000 .5100 72 .2600 1.0100 .5100 73 .5100 1.2000 .5100 74 .7600 1.0100 .5100 75 0.9000 0.9000 .5100 76 .0100 .0001 .7600 77 .2600 .0001 .7600 78 .5100 .0001 .7600 79 .7600 .0001 .7600 80 0.9000 .0100 .7600 81 .0100 .2600 .7600 82 .2600 .2600 .7600 83 .5100 .2600 .7600 84 .7600 .2600 .7600 85 1.0100 .2600 .7600 86 .0100 .5100 .7600 87 .2600 .5100 .7600 88 .5100 .5100 .7600 89 .7600 .5100 .7600 90 1.2000 .5100 .7600 91 .0100 .7600 .7600 92 .2600 .7600 .7600 93 .5100 .7600 .7600 94 .7600 .7600 .7600 95 1.0100 .7600 .7600 96 .0100 0.9000 .7600 97 .2600 1.0100 .7600 98 .5100 1.2000 .7600 99 .7600 1.0100 .7600 100 0.9000 0.9000 .7600 101 .0100 .0001 1.0100 102 .2600 .0001 1.0100 103 .5100 .0001 1.0100 104 .7600 .0001 1.0100 105 0.9000 .0001 1.0100 106 .0100 .2600 1.0100 107 .2600 .2600 1.0100 108 .5100 .2600 1.0100 109 .7600 .2600 1.0100 110 1.0100 .2600 1.0100 111 .0100 .5100 1.0100 112 .2600 .5100 1.0100 113 .5100 .5100 1.0100 114 .7600 .5100 1.0100 115 1.2000 .5100 1.0100 116 .0100 .7600 1.0100 117 .2600 .7600 1.0100 118 .5100 .7600 1.0100 119 .7600 .7600 1.0100 120 1.0100 .7600 1.0100 121 .0100 0.9000 1.0100 122 .2600 1.0100 1.0100 123 .5100 1.2000 1.0100 124 .7600 1.0100 1.0100 125 0.9000 0.9000 1.0100Figure 3
Initial cloud of nodes with 125 nodes.Figure 4
Final cloud of nodes with 1776 nodes.Figure 5
Reduction of the global error in logarithmic scale. Abscissa axis represents the number of inner nodes.


## 4.2. Example 2

Let us consider the following Poisson problem:(28)∂2U∂x2+∂2U∂y2+∂2U∂z2=2·y2z2+x2z2+x2y2x3y3z3with exact solution(29)Ux,y,z=1xyz.Note that in (29) there is a singular point in (0,0,0), outside the domain. Figures 6 and 7 show the initial and final discretization of the domain. The initial discretization has 125 nodes and is generated as follows:(30)xi=10.75xci-0.51xci-0.512+yci-0.512+zci-0.512+0.51yi=10.75yci-0.51xci-0.512+yci-0.512+zci-0.512+0.51zi=10.75zci-0.51xci-0.512+yci-0.512+zci-0.512+0.510.01≤xc,yc,zc≤1.01withxc,yc,zc=0.01,0.026,0.051,0.076,1.01.The final discretization has 608 nodes (8 stages). The initial global error is 69% and the final global error is 0.7% after applying the proposed adaptive refinement and Figure 8 shows the successive reductions of the global error in logarithmic scale.Figure 6
Initial cloud of nodes with 125 nodes.Figure 7
Final cloud of nodes with 608 nodes.Figure 8
Reduction of the global error in logarithmic scale. Abscissa axis represents the number of inner nodes.


## 4.3. Example 3

Let us consider the problem governed by the following partial differential equation:(31)∂2U∂x2+∂2U∂y2+∂2U∂z2=6x+y+z3with exact solution(32)Ux,y,z=1x+y+z.Note that in (32) there is a singular point in (0,0,0), outside the domain. Figures 9 and 10 show the initial and final discretization of the domain. The initial discretization has 125 nodes and is generated as follows:(33)xi=10.75xcixci-0.512+yci-0.512+zci-0.512yi=10.75ycixci-0.512+yci-0.512+zci-0.512zi=10.75zcixci-0.512+yci-0.512+zci-0.5120.01≤xc,yc,zc≤1.01withxc,yc,zc=0.01,0.026,0.051,0.076,1.01.The final discretization has 863 nodes (7 stages). The initial global error is 78% and the final global error is 0.7% after applying the proposed adaptive refinement and Figure 11 shows the successive reductions of the global error in logarithmic scale.Figure 9
Initial cloud of nodes with 125 nodes.Figure 10
Final cloud of nodes with 863 nodes.Figure 11
Reduction of the global error in logarithmic scale. Abscissa axis represents the number of inner nodes.


## 4.4. Example 4

Let us consider the problem governed by the following partial differential equation:(34)∂2U∂x2+∂2U∂y2+∂2U∂z2=gx,y,zwith exact solution (35)Ux,y,z=12000x21-x2e10x2-1y21-y2e10y2-1z21-z2e10z2-1and g(x,y,z) is the function obtained by applying left hand side in (34) to the exact function.Figures12 and 13 show the initial and final discretization of the domain. The initial discretization has 125 nodes; see Table 3. The final discretization has 1449 nodes (7 stages). The initial global error is 188418% and the final global error is 0.15% after applying the proposed adaptive refinement and Figure 14 shows the successive reductions of the global error in logarithmic scale.Table 3
Example  4.
Node X Y Z 1 .1100 .0100 .0100 2 .2600 .0100 .0100 3 .5100 .0100 .0100 4 .7600 .0100 .0100 5 0.9000 .0100 .0100 6 .0100 .2600 .0100 7 .2600 .2600 .0100 8 .5100 .2600 .0100 9 .7600 .2600 .0100 10 1.0100 .2600 .0100 11 −.0500 .5100 .0100 12 .2600 .5100 .0100 13 .5100 .5100 .0100 14 .7600 .5100 .0100 15 1.0500 .5100 .0100 16 .0100 .7600 .0100 17 .2600 .7600 .0100 18 .5100 .7600 .0100 19 .7600 .7600 .0100 20 1.0100 .7600 .0100 21 .1100 0.9000 .0100 22 .2600 1.0100 .0100 23 .5100 1.0100 .0100 24 .7600 1.0100 .0100 25 0.9000 0.9000 .0100 26 .1100 .0100 .2600 27 .2600 .0100 .2600 28 .5100 .0100 .2600 29 .7600 .0100 .2600 30 0.9000 .0100 .2600 31 .0100 .2600 .2600 32 .2600 .2600 .2600 33 .5100 .2600 .2600 34 .7600 .2600 .2600 35 1.0100 .2600 .2600 36 −.0500 .5100 .2600 37 .2600 .5100 .2600 38 .5100 .5100 .2600 39 .7600 .5100 .2600 40 1.0500 .5100 .2600 41 .0100 .7600 .2600 42 .2600 .7600 .2600 43 .5100 .7600 .2600 44 .7600 .7600 .2600 45 1.0100 .7600 .2600 46 .1100 0.9000 .2600 47 .2600 1.0100 .2600 48 .5100 1.0100 .2600 49 .7600 1.0100 .2600 50 0.9000 0.9000 .2600 51 .1100 .0100 .5100 52 .2600 .0100 .5100  53 .5100 .0100 .5100 54 .7600 .0100 .5100 55 0.9000 .0100 .5100 56 .0100 .2600 .5100 57 .2600 .2600 .5100 58 .5100 .2600 .5100 59 .7600 .2600 .5100 60 1.0100 .2600 .5100 61 −.0500 .5100 .5100 62 .2600 .5100 .5100 63 .5100 .5100 .5100 64 .7600 .5100 .5100 65 1.0500 .5100 .5100 66 .0100 .7600 .5100 67 .2600 .7600 .5100 68 .5100 .7600 .5100 69 .7600 .7600 .5100 70 1.0100 .7600 .5100 71 .1100 0.9000 .5100 72 .2600 1.0100 .5100 73 .5100 1.0100 .5100 74 .7600 1.0100 .5100 75 0.9000 0.9000 .5100 76 .0100 .0100 .7600 77 .2600 .0100 .7600 78 .5100 .0100 .7600 79 .7600 .0100 .7600 80 0.9000 .0100 .7600 81 .0100 .2600 .7600 82 .2600 .2600 .7600 83 .5100 .2600 .7600 84 .7600 .2600 .7600 85 1.0500 .2600 .7600 86 .0100 .5100 .7600 87 .2600 .5100 .7600 88 .5100 .5100 .7600 89 .7600 .5100 .7600 90 1.1000 .5100 .7600 91 .0100 .7600 .7600 92 .2600 .7600 .7600 93 .5100 .7600 .7600 94 .7600 .7600 .7600 95 1.0100 .7600 .7600 96 .0100 0.9000 .7600 97 .2600 1.0100 .7600 98 .5100 1.0100 .7600 99 .7600 1.0100 .7600 100 1.0100 1.0100 .7600 101 .0100 .0100 1.0100 102 .2600 .0100 1.0100 103 .5100 .0100 1.0100 104 .7600 .0100 1.0100 105 0.9000 .0100 1.0100 106 .0100 .2600 1.0100  107 .2600 .2600 1.0100 108 .5100 .2600 1.0100 109 .7600 .2600 1.0100 110 1.0100 .2600 1.0100 111 .0100 .5100 1.0100 112 .2600 .5100 1.0100 113 .5100 .5100 1.0100 114 .7600 .5100 1.0100 115 1.0100 .5100 1.0100 116 .0100 .7600 1.0100 117 .2600 .7600 1.0100 118 .5100 .7600 1.0100 119 .7600 .7600 1.0100 120 1.0100 .7600 1.0100 121 .0100 0.9000 1.0100 122 .2600 1.0100 1.0100 123 .5100 1.0100 1.0100 124 .7600 1.0100 1.0100 125 1.0100 1.0100 1.0100Figure 12
Initial cloud of nodes with 125 nodes.Figure 13
Final cloud of nodes with 1449 nodes.Figure 14
Reduction of the global error in logarithmic scale. Abscissa axis represents the number of inner nodes.


## 4.5. Example 5

Let us consider the problem governed by the partial differential equation (34) and with exact solution (35) in a different domain. Figures 15 and 16 show the initial and final discretization of the domain. The initial discretization has 125 nodes and is generated as follows:(36)xi=1.3xci-0.51xci-0.512+yci-0.512+zci-0.512max⁡xci-0.51,yci-0.51,zci-0.51+0.51yi=1.3yci-0.51xci-0.512+yci-0.512+zci-0.512max⁡xci-0.51,yci-0.51,zci-0.51+0.51zi=1.3zci-0.51xci-0.512+yci-0.512+zci-0.512max⁡xci-0.51,yci-0.51,zci-0.51+0.510.01≤xc,yc,zc≤1.01withxc,yc,zc=0.01,0.026,0.051,0.076,1.01.The final discretization has 3629 nodes (8 stages). The initial global error is 188935% and the final global error is 3% after applying the proposed adaptive refinement and Figure 17 shows the successive reductions of the global error in logarithmic scale.Figure 15
Initial cloud of nodes with 125 nodes.Figure 16
Final cloud of nodes with 3629 nodes.Figure 17
Reduction of the global error in logarithmic scale. Abscissa axis represents the number of inner nodes.The initial global errors in the examples are too high because we have generated starting clouds of few nodes to show the extreme conditions of the solutions involved. As it can be seen, the refinement gets large reductions of the global error in a few stages.The efficiency of the algorithm adding progressively new nodes shows the reduction in the solution error. The refinement procedure creates new nodes in the neighborhood of areas with higher gradients; furthermore these nodes have a more balanced distribution and it is not necessary further constraints to control ill-conditioned stars. Moreover, as the number of new nodes is limited in each adaptive stage, the transition between areas with different density of nodes is smooth.The method can be also applied to the case of Neumann boundary conditions. In this case the procedure described in [14] for the treatment of Neumann boundary conditions can be used.


## 4.6. Example 6

Electric fields are used for designing high voltage equipment. In these cases, it is necessary to know the distribution of the electrical potential. In electrical power distribution, a busbar is a metallic strip for local high current power distribution. We consider the case of a busbar box at potential 220 volts. The considered domain is0,1×[0,1]×[0,1] and the busbar is located at [0.25,0.5]×[0,0.25]×[0,0.25]. The boundary of the domain has potential 0 volts except on the busbar where potential is 220 volts. The problem is governed by the Laplace equation and the exact solution is unknown. Note that this case is very different regarding the previous ones. The solution is smooth and the variations of the gradient are more widespread in the domain.Figures18 and 19 show the initial and final discretization of the domain. The initial discretization has 125 nodes and the final discretization has 399 nodes (8 refinement stages).Figure 18
Initial discretization of the domain.Figure 19
Final discretization of the domain.In the octree refinement, the new interior nodes of each stage are incorporated in the next adaptive stages as nodes with unknown potential. As the exact error is unknown, the results obtained in the last adaptive step have been considered as the best approximation to the solution; then formula (25) has been used to compute the global error approximation in the initial and successive adaptive stages by comparing the obtained values with that best approximation. The initial global error approximation obtained by using (25) is 29.09% and the final global error approximation is 1.91%. Note that the global error (23) between two successive adaptive stages has been also used as stop condition of the refinement procedure with limit 2% in this case.Figure20 shows the successive reductions of the global error approximation in logarithmic scale.Figure 20
Reduction of the approximated global error in logarithmic scale. Abscissa axis represents the number of inner nodes.


## 5. Conclusions

A fully automatic 3D adaptive refinement procedure using GFDM for solving elliptic equations has been developed and implemented. An octree background structure has been used to guide the refinement of the clouds of nodes.An error indicator has been used as a stop condition. This indicator is based on the differences between the gradients of the nodes in the same cell. In each adaptive stage, the number of new nodes is limited in order to obtain smooth transition areas between regions with different gradients. The efficiency of the algorithm is shown by means of the progressive decrease of the error. It is important to note that this adaptive method allows considering a coarse starting cloud of nodes and making it finer in several stages. This allows having a more suitable cloud of nodes adapted to the considered problem.Simulation of heat conduction, electric potential, seepage through porous media, and irrotational flow of fluids are some problems where it is necessary to solve elliptical partial differential equations. The adaptive procedure refines the regions with high gradients and obtains very accurate results in different types of domain. All has been shown in the considered examples which is why the proposed refinement procedure will help to improve future applications of the GFDM for solving three-dimensional problems in complex domains.



---

*Source: 9678473-2018-03-27.xml*