<<

View metadata, citation and similar papers at core.ac.uk brought to you by CORE

provided by Elsevier - Publisher Connector

Applied Mathematical Modelling 27 (2003) 831–847 www.elsevier.com/locate/apm

Improvements of generalized finite difference method and comparison with other meshless method

L. Gavete a,*, M.L. Gavete b, J.J. Benito c a Escuela Tecnica Superior de Ingenieros de Minas, Universidad Politecnica, c/Rios Rosas 21, 28003 Madrid, Spain b Facultad de Farmacia, Universidad Complutense, Avda Complutense s/n, 28040 Madrid, Spain c Escuela Tecnica Superior de Ingenieros Industriales, U.N.E.D., Apdo. Correos 60149, 28080 Madrid, Spain Received 3 December 2001; received in revised form 29 January 2003; accepted 19 February 2003

Abstract

One of the most universal and effective methods, in wide use today, for approximately solving equations of mathematical physics is the finite difference (FD) method. An evolution of the FD method has been the development of the generalized finite difference (GFD) method, which can be applied over general or ir- regular clouds of points. The main drawback of the GFD method is the possibility of obtaining ill- conditioned stars of nodes. In this paper a procedure is given that can easily assure the quality of numerical results by obtaining the residual at each point. The possibility of employing the GFD method over adaptive clouds of points increasing progressively the number of nodes is explored, giving in this paper a condition to be accomplished to employ the GFD method with more efficiency. Also, in this paper, the GFD method is compared with another meshless method the, so-called, element free Galerkin method (EFG). The EFG method with linear and penalty functions to treat the essential boundary condition is used in this paper. Both methods are compared for solving Laplace equation. 2003 Elsevier Inc. All rights reserved.

Keywords: Meshless; Generalized finite difference method; Element free Galerkin method; Singularities

1. Introduction

The objective of meshless methods is to eliminate, at least, a part of the structure of elements as in the finite element method (FEM) by constructing the approximation entirely in terms of nodes.

* Corresponding author. Tel.: +34-913-366-466; fax: +34-913-363-230. E-mail addresses: [email protected] (L. Gavete), [email protected] (J.J. Benito).

0307-904X/$ - see front matter 2003 Elsevier Inc. All rights reserved. doi:10.1016/S0307-904X(03)00091-X 832 L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847

Although meshless methods were originated about twenty years ago, the research effort devoted to them until recently has been very small. One of the starting points is the smooth particle hy- drodynamics method [1] used for modelling astrophysical phenomena without boundaries such as exploding stars and dust clouds. Other path in the evolution of meshless methods has been the development of the generalized finite difference (GFD) method, also called meshless finite dif- ference (FD) method. The GFD method is included in the so named meshless methods (MM). One of the early contributors to the former were Perrone and Kao [2]. The bases of the GFD were published in the early seventies. Jensen [3] was the first to introduce fully arbitrary mesh. He considered Taylor expansions interpolated on six-node stars in order to derive the FD formulae approximating of up to the second order. While he used that approach to the solution of boundary value problems given in the local formulation, Nay and Utku [4] extended it to the analysis of problems posed in the variational (energy) form. However, these very early GFD formulations were later essentially improved and extended by many other authors, but the most robust of these methods was developed by Liszka and Orkisz [5,6], using moving least squares (MLS) interpolation [7], and the most advanced version was given by Orkisz [8]. The explicit FD formulae used in the GFD method, as well as the influence of the main parameters involved, was studied by Benito et al. [9]. Other different MM have been proposed. The diffuse element method, developed by Nayroles et al. [10], was a new way for solving partial differential equations. Belytschko et al. [11] developed an alternative implementation using MLS approximation. They called their approach the element free Galerkin (EFG) method. The use of a constrained variational principle with a penalty to alleviate the treatment of Dirichlet boundary conditions in (EFG) method has been proposed [12,13]. Liu et al. [14] have used a different kind of ‘‘griddles’’ multiple scale method based on reproducing kernel and wavelet analysis. Onnate~ et al. [15] focused on the application to fluid flow problems with a standard point collocation technique. Duarte and Oden [16], on the one hand and Babuska and Melenk [17] on the other, have shown how the denominated methods without mesh can be based on the partition of the unity. All these methods can be considered as MM. This paper is organized as follows. Firstly, in Section 2 the GFD method is briefly described. Secondly, in Section 3 several examples in the presence of singularities are given and the per- formance of the GFD method is analyzed using fixed or variable radius of influence for the weighting functions. Also in Section 3 the possibility of employing the GFD method over adaptive clouds of points is explored. Thirdly, the GFD method is compared to the EFG method in Section 4. And finally, in Section 5, some conclusions are obtained.

2. Generalized finite difference method

For any sufficiently differentiable function f ðx; yÞ, in a given domain, the ex- pansion around a point Pðx0; y0Þ may be expressed in the form of of h2 o2f k2 o2f o2f f ¼ f þ h 0 þ k 0 þ 0 þ 0 þ hk 0 þ oðq3Þð1Þ 0 ox oy 2 ox2 2 oy2 oxoy pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 2 2 where f ¼ f ðx; yÞ, f0 ¼ f ðx0; y0Þ, h ¼ x x0, k ¼ y y0 and q ¼ h þ k . L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847 833

Eq. (1) and all following formulae will be limited to second order and two- dimensional problems. In any case, the extension to other problems is obvious. We consider norm B   2 XN of of o2f o2f o2f B ¼ f f þ h 0 þ k 0 þ h2 0 þ k2 0 þ h k 0 w ð2Þ 0 i i ox i oy i ox2 i oy2 i i oxoy i i¼1 where fi ¼ f ðxi; yiÞ, f0 ¼ f ðx0; y0Þ, hi ¼ xi x0, ki ¼ yi y0, wi ¼ weighting function with compact support. The solution may be obtained by minimizing norm B, writing oB ¼ 0 ð3Þ ofDf g  of of o2f o2f o2f fDf gT ¼ 0 ; 0 ; 0 ; 0 ; 0 ð4Þ ox oy ox2 oy2 oxoy we come to a set of five equations with five unknowns for each node. For example, the first equation is as follows XN XN of XN of XN o2f XN h3 f w2h f w2h þ 0 w2h2 þ 0 w2h k þ 0 w2 i 0 i i i i i ox i i oy i i i ox2 i 2 i¼1 i¼1 i¼1 i¼1 i¼1 o2f XN k2h o2f XN þ 0 w2 i i þ 0 w2h2k ¼ 0 ð5Þ oy2 i 2 oxoy i i i i¼1 i¼1 this Eq. (5) and all following equations give us the following system of equations 0 18 9 h3 2 o 2 2 2 2 i 2 ki hi 2 2 > f0 > Rwi hi Rwi hiki Rwi Rwi Rwi hi ki > ox > B 2 2 C> > B 2 3 C> of0 > 2 2 2 2 hi ki 2 ki 2 2 > > B Rw h k Rw k Rw Rw Rw h k C> oy > B i i i i i i 2 i 2 i i i C<> => B 3 2 4 2 2 3 C o2f 2 h 2 kih 2 h 2 h k 2 h ki 0 B i i i i i i C o 2 B Rwi 2 Rwi 2 Rwi 4 Rwi 4 Rwi 2 C> x > > o2 > B 2 3 2 2 4 3 C> f0 > B 2 hiki 2 ki 2 hi ki 2 ki 2 hiki C> > @ Rw Rw Rw Rw Rw A> oy2 > i 2 i 2 i 4 i 4 i 2 > > 3 3 : o2f ; 2 2 2 2 2 h ki 2 hik 2 2 2 0 Rw h k Rw h k Rw i Rw i Rw h k oxoy 0i i i i i i i 2 1 i 2 i i i 2 2 f0Rw hi þ Rfiw hi B i i C B f Rw2k Rf w2k C B 0 i i þ i i i C B h2 h2 C B f Rw2 i Rf w2 i C 6 ¼ B 0 i 2 þ i i 2 C ð Þ B k2 k2 C @ 2 i 2 i A f0Rwi 2 þ Rfiwi 2 2 2 f0Rwi hiki þ Rfiwi hiki This system of linear equations (6) in resumed notation is given by

APDfP ¼ bP ð7Þ where the AP are matrices of 5 · 5, and the vector DfP is 5 · 1. 834 L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847

2 2 2 2 If we are interested in solving PoissonÕs equation, we can calculate o f0=ox , o f0=oy at each node according to (6) and then o2f o2f 0 þ 0 gðx ; y Þ¼0 ð8Þ ox2 oy2 0 0 giving us a linear system of equations for the considered domain. The first step of the solution method is to scatter N nodal points in the computation domain and along the boundary. So, let us consider FD operator (8) at a node. From the previously obtained matrix equation (7) and, by virtue of the fact that the matrices of coefficients AP are symmetrical, it is then possible to use the Cholesky method to solve the same. The aim is to obtain the decomposition in upper and lower triangular matrices LLT. The coefficients of the matrix L are denoted by Lði; jÞ. On solving the systems (7), the following explicit difference formulae are obtained !! 1 XN XN XP D ðkÞ¼ f Mðk; iÞc þ f Mðk; iÞd ðk ¼ 1; ...; PÞð9Þ fP L k; k 0 i j ji ð Þ i¼1 j¼1 i¼1 in which P ¼ 5, if only second order Taylor series expansion terms are included, and P ¼ 9 if also third order terms are included and where

1 Xi1 Mði; jÞ¼ð1Þ1dij Lði; kÞMðk; jÞ for j < i ði and j ¼ 1; ...; PÞ L i; i ð Þ k¼j 1 ð10Þ Mði; jÞ¼ for j ¼ i ði and j ¼ 1; ...; PÞ LiðÞ; i Mði; jÞ¼0 for j > i ði and j ¼ 1; ...; PÞ with dij the Kronecker delta function, and

XN ci ¼ dji j¼1 h2 k2 d ¼ h W 2; d ¼ k W 2; d ¼ j W 2; d ¼ j W 2; d ¼ h k W 2 j1 j j2 j j3 2 j4 2 j5 j j h3 k3 h2k h k2 d ¼ i W 2; d ¼ i W 2; d ¼ i i W 2; d ¼ i i W 2 ð11Þ j6 6 j7 6 j8 2 j9 2 where

2 2 W ¼ðwðhi; kiÞÞ ð12Þ

2 2 2 2 On including the explicit expressions for the values of the partial derivatives o f0=ox , o f0=oy in the initial equation [8], taking for example gðx; yÞ¼0, the star equation is obtained. This Eq. (13) L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847 835

Fig. 1. The four quadrants criterium, using 2 nodes in each quadrant.

2 2 2 2 is formed at each point, calculating the second order derivatives o f0=ox , o f0=oy by solving Eq. (6), and including the explicit expressions of these derivatives (given in (9) for k ¼ 3, 4, respec- tively) in the Laplace partial differential equation. Then the star equation corresponding to the point (x0; y0) is formed, obtaining the linear equation

XN k0f0 þ kifi ¼ 0 ð13Þ i¼1 Then

XN f0 ¼ mifi ð14Þ i¼1

XN mi ¼ 1 ð15Þ i¼1 All points in the control scheme are called ‘‘a star’’ of nodes. The number and the position of nodes in each star i (i ¼ 1; ...; N) are the decisive factors affecting FD formula approximation. The choice of these supporting nodes is constrained as particular patterns lead to degenerated solutions [18]. As star selection criterium we follow the denominated cross criterium: the area around the central nodal point, 0, is divided into four sectors corresponding to quadrants of the cartesian co-ordinates system originating at the central node (see Fig. 1). Each of its semi axes is assigned to one of these quadrants. In each sector two or more nodes are selected, the closest to the origin. If this is not possible, e.g., at the boundary, missing nodes can be supplemented to provide the total number of nodes necessary in each star. Having calculated the values of fi (i ¼ 1; ...; n) in the nodes of the domain, we calculate de- rivatives using formula (6). It is possible to control the precision of GFD solutions by calculating the residual at each point of the interior of the domain using (6) and (8). In order to provide the required and controlled precision of the GFD method, residuals of (8) may be very small and with smoothed distribution over the entire domain. The existence of ill-conditioned stars of nodes, as shown in the next section, depends on the weighting function wi employed, and on the number of nodes by quadrant of each star of nodes. 836 L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847

3. Numerical results

A global error measure is defined as vffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi u u XNN 1 t 1 e n Error ¼ ðf ð Þ f ð ÞÞ2 ð16Þ f f N i i j jmax N i¼1 where f can be f , of =ox, of =oy, the superscripts (e) and (n) refer to the exact and numerical solutions, respectively, and NN is the total number of interior nodes of the domain considered. The following two weight functions were tested:

(a) Polynomial weight function (quartic spline):    d 2 d 3 d 4 w ðdÞ¼1 6 þ 8 3 ð17Þ i dm dm dm when d 6 dm, and wi ¼ 0 when d > dm; and where qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 2 2 d ¼ ðx xiÞ þðy yiÞ

(b) Polynomial weight function (cubic spline): 8 ÀÁ ÀÁ 2 3 <> 2 4 d 4 d for d 6 1 dm 3 ÀÁdm ÀÁdm ÀÁ2 2 3 wiðdÞ¼ 4 4 d 4 d 4 d for 1 dm < d 6 dm ð18Þ :> 3 dm þ dm 3 dm 2 0 for d > dm qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 2 2 d ¼ ðx xiÞ þðy yiÞ

In both formulae (17) and (18) we use weighting functions with compact support, being rinf the maximum radius of influence used (rinf ¼ dm). We shall select rinf, considering fixed radius (same radius for all the stars of the domain) or variable radius (radius for each of the stars depending on their nodal distribution).

3.1. L-shaped domain

Firstly, we present an example that shows the performance of the GFD method on a problem with a corner singularity. We consider the Laplace equation in an L-shaped domain that has a non-convex corner at the origin satisfying homogeneous Dirichlet boundary conditions at the sides meeting at the origin and non-homogeneous conditions on the other sides, see Fig. 2. We choose the boundary conditions so that the exact solution is f ðr; hÞ¼r2=3 sinð2h=3Þ in polar co- ordinates (r; h) centered at the origin, which has the typical singularity of a corner problem. We use the knowledge of the exact solution to evaluate the performance of the GFD method in the case of irregular clouds of points (Figs. 2 and 3), comparing the effect of using fixed or variable L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847 837

Fig. 2. L-shaped domain. Irregular grid A.

Fig. 3. L-shaped domain. Irregular grid B.

radius of influence for the weighting functions. As shown in Figs. 2 and 3, the dimensions of both models of the L-shaped domain, A and B, are different. It is possible to use a variable radius of influence using different maximum radius of influence (rinf) for each star of nodes, depending on the distance from the center of the star to the most far away node included in the star. In this case, rinf is adjusted for each point (center of a star of nodes) taking into account only the neighboring area covered by the nearest points according to the four quadrants criterium. We can also multiply the distance to the most far away node point by a parameter. In Table 1 we use 2.0 as parameter. Results obtained, using formula (16) to calculate the error for the func- tion and the derivatives, are given in Table 1 for both weighting functions quartic and cubic spline. 838 L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847

Table 1 % Error in the function and the derivatives for L-shaped domain irregular clouds (Figs. 2 and 3) % Error % Error % Error % Error in % Error in Residual in f in of =ox in of =oy o2f =ox2 o2f =oy2 medium value Fig. 2 DFG rinf vari- QS 0.59 3.08 1.82 14.25 14.25 0.33 · 106 able · 2.0 CS 0.56 2.95 1.83 14.16 14.16 0.37 · 106 9-nodes stars DFG rinf QS 0.66 3.37 1.89 14.19 14.19 0.42 · 106 fixed ¼ 0.5 CS 0.64 3.25 1.85 14.06 14.06 0.32 · 106 9-nodes stars Fig. 3 DFG rinf vari- QS 0.41 1.28 1.97 5.93 5.93 0.10 · 106 able · 2.0 CS 0.41 1.21 1.84 5.76 5.76 0.81 · 107 13-nodes stars DFG rinf QS 0.41 1.58 2.51 6.58 6.58 0.78 107 fixed ¼ 0.8 CS 0.41 1.57 2.50 6.57 6.57 0.82 · 107 13-nodes stars GFD method using variable or fixed rinf. Notes: QS: Quartic spline weighting function, CS: Cubic spline weighting function.

As shown in Table 1, where the relationship between errors is given, it is interesting to note that the GFD method is very accurate also in the presence of the singular point that is located in the origin of co-ordinates however, the error increases with the order of the derivatives, so the minimum error is the corresponding to the function f , and the maximum error is the calculated for the second derivatives. The GFD method is accurate even for very irregular clouds of points as the ones given in Figs. 2 and 3, however ill-conditioned stars can be obtained. For example, the cloud of nodes given in Fig. 3 contained ill-conditioned stars if 9-nodes stars were considered (2 nodes by quadrant according to Fig. 1). This problem was easily detected because the residual medium value (the total residual of all the nodes divided by the number of nodes) was very big compared to the usual values obtained, and also because the relation between the maximum and minimum residual values of the nodes was much bigger that the usual values obtained for well- conditioned problems. Then, by using 13-nodes stars (3 nodes by quadrant according with Fig. 1), the problem became well conditioned. So in Table 1 (Fig. 3), it was necessary to increase the number of nodes of the stars to obtain well-conditioned stars. It is interesting to note that the existence of ill-conditioned stars of nodes can be influenced also by the weighting function employed. For example, using other weighting function such as 1 wiðdÞ¼ ð19Þ d3 qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 2 2 when d 6 dm, and wiðdÞ¼0 when d > dm; and where d ¼ ðx xiÞ þðy yiÞ and dm ¼ rinf, the model of Fig. 2 contained ill-conditioned stars taking 9-nodes stars (two nodes in each quadrant) and this problem persisted also for 13-nodes stars (three nodes in each quadrant) however, by taking 17-nodes stars (four nodes in each quadrant) the problem disappeared. Also the maximum distance (dm ¼ rinf), which gives the radius of influence of the weighting function, can affect the clouds of nodes originating ill-conditioned stars. The problem of having ill-con- L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847 839 ditioned stars is easily detected by calculating the residual values at each one of the centers of the stars using derivatives calculated by (6). Then, by increasing the number of nodes in each one of the quadrants the ill conditioning due to the location of the nodes can be avoided. This procedure assures the quality of numerical results. As shown in Table 1, it is possible to use a variable (different) radius of influence for each star of nodes. In this case, rinf is adjusted for each point taking into account only the neighboring area covering the nearest points according to the four quadrants criterium. We have multiplied the distance to the most far away node point included in each one of the stars by a parameter (in Table 1 we have used 2.0 as parameter value, for both cases corresponding to Figs. 2 and 3). The use of variable radius of influence is important to employ the GFD method with more efficiency, as it is shown in the next section.

3.2. Clouds of points consecutively more refined

We shall also consider the case of logarithmic solution with a singular point in the origin of co- ordinates. We consider the Laplace equation in a domain X ¼0:01; 1:01½0:01; 1:01½ with Di- richlet boundary conditions in the boundary. We choose the boundary conditions so that the exact solution is f ðx; yÞ¼Logðx2 þ y2Þ. We use the knowledge of the exact solution to evaluate the performance of the method, creating different adaptive clouds increasing the number of points in the neighborhood of the singular point. The adaptive clouds used are shown in Fig. 4. As shown in Fig. 4, a group of studies has been carried out with models consecutively more refined. Fig. 4 shows every different used cloud of points. In all the cases quartic spline weighting functions have been used. The radius of domain of influence, rinf, was computed as fixed (rinf ¼ 0.5) or variable, this last case was computed by rinf ¼ adI , with dI chosen to be the distance to the most distant point of each of the stars using the four quadrants criterium; a was chosen to be 2. Each model has been designated with a code pointing the degree of re- finement (see Fig. 4). Results for the errors calculated according to (16) are given in Table 2 and Fig. 5. As it is shown in Table 2 and Fig. 4, we consider two different sets of cases: regular clouds (81 and 289 nodes) and irregular clouds (97, 109 and 118 nodes). Best results for all the cases are obtained with the GFD method, using variable radius (see Fig. 5). In Fig. 5 the results obtained using quartic spline weighting function are given. By comparing models T30908 and T30908r1 we can see how the global error decreases by adding nodes in the neighborhood of the singular point that is located in the origin of co-ordinates. However, it is interesting to check the effect of creating smooth transition of nodes between the two zones of different nodal density. Then, models T30908r2 and T30908r3 come up (see Fig. 4), in which some nodes have been added giving us a better global result. The error decreases in the domain and it is homogenized. With model T30908r3 error drops a little although the results are very similar (see Fig. 5). A uniform refinement, as in model T31708 leads to better results, (see Figs. 4 and 5), however, the computational requirements are higher (289 nodes versus 118). As it is shown in Fig. 5, the error for the function and for the decreases using variable radius of influence to compare the adaptive clouds of nodes. Similar results have been obtained for other weighting functions as those defined in (18) and (19). 840 L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847

Fig. 4. Clouds of points. GFD method.

As we can see in this example, using variable radius of influence for each star of nodes appears as an important condition to employ the GFD method with more efficiency. L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847 841

Table 2 % Error in f , of =ox, of =oy for case of logarithmic solution, GFD method using fixed or variable rinf Quartic spline weighting function GFD method 9-nodes stars GFD method 9-nodes stars variable radius · 2.0 fixed radius ¼ 0.5 81 Nodes % Error in f 1.17 1.73 % Error in of =ox 2.72 4.52 % Error in of =oy 2.72 4.52 97 Nodes % Error in f 0.44 0.82 % Error in of =ox 1.54 3.41 % Error in of =oy 1.40 3.32 109 Nodes % Error in f 0.42 0.78 % Error in of =ox 1.26 3.02 % Error in of =oy 1.29 3.04 118 Nodes % Error in f 0.40 0.74 % Error in of =ox 1.19 2.84 % Error in of =oy 1.22 2.87 289 Nodes % Error in f 0.24 0.45 % Error in of =ox 0.73 1.73 % Error in of =oy 0.73 1.73

Fig. 5. % Error in GFD method, for the gradients (quartic spline) versus the number of nodes.

4. Comparison with other meshless method

In this section we compare the GFD method with another meshless method the EFG method, to solve the Laplace equation. In the EFG Method, around a point x the function f hðxÞ is locally approximated by Xm h T f ðxÞ¼ piðxÞaiðxÞ¼p ðxÞaðxÞð20Þ i¼1 where m is the number of terms in the basis, the monomial piðxÞ are basis functions, and aiðxÞ are their coefficients, which, as indicated, are functions of the spatial co-ordinates x. 842 L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847

The coefficients aiðxÞ are obtained by performing a weighted least square fit for the local ap- proximation, which is obtained by minimizing the difference between the local approximation and the function. This yields the quadratic form

Xn T 2 J ¼ wðdI Þðp ðxIÞaðxÞfI Þ ð21Þ I¼1 where wðdI Þ¼wðx xIÞ is a weighting function with compact support. Eq. (21) can be rewritten in the form

J ¼ðPa fÞTWðxÞðPa fÞð22Þ where

T f ¼ðf1; f2; ...; fnÞð23Þ 2 3 T p ðx1Þ P ¼ 4 ... 5 ð24Þ T p ðxnÞ

T p ðxiÞ¼fp1ðxiÞ; ...; pmðxiÞg ð25Þ

W ¼ diag½w1ðx x1Þ; ...; wnðx xnÞ ð26Þ

To find the coefficients a, we obtain the extremum of J by

oJ=oa ¼ AðxÞaðxÞHðxÞf ¼ 0 ð27Þ where

A ¼ PTWðxÞP ð28Þ

H ¼ PTWðxÞð29Þ and therefore

aðxÞ¼A1ðxÞHðxÞf ð30Þ

The dependent variable f h can, then, be expressed as XnðxÞ h f ðxÞ¼ UI ðxÞfI ð31Þ I¼1 where T 1 UI ðxÞ¼p ðxÞA ðxÞHI ðxÞð32Þ with HI being the column I of H. L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847 843

The partial derivatives of the MLS shape functions are obtained as  à T 1 T 1 1 UI;jðxÞ¼p;jA HI þ p A ðHI;j A;jA HI Þ ð33Þ thus, Galerkin formulation can be followed to solve partial differential equation problems. One of the biggest problems in the implementation of meshless methods resides in that the used approach is not an interpolation. MLS approximation, in general, lacks the delta function property of the usual FEM shape function, in that

UI ðxJ Þ¼dIJ ð34Þ where UI is the Ith shape function evaluated at a nodal point xJ and dIJ is the Kronecker delta. In this paper we use a constrained variational principle with a penalty function (see Gavete et al. [12,13]). The EFG method with linear shape functions and Penalty functions (1015) to enforce essential boundary conditions, was used. The EFG method was considered using variable radius of in- fluence (rinf). In this case, rinf is adjusted for each point taking into account only the neighboring area covering the nearest points. We can multiply the distance to the nearest nth point by a pa- rameter (in Table 3 we multiply the distance to the nearest third node by 2). The case of loga- rithmic solution f ðx; yÞ¼Logðx2 þ y2Þ studied before was analyzed with the EFG method for the models of Fig. 4. Integration cells used in the EFG method for the models of Fig. 4, are given in Fig. 6. The results obtained comparing the GFD and EFG methods are given in Table 3 and Fig. 7.

Table 3 % Error in f , of =ox, of =oy for logarithmic solution, GFD method versus EFG method using variable rinf Quartic spline weighting function GFD method 9-nodes stars EFG method o.i. 4 · 4 variable radius · 2.0 variable radius · 2.0 81 Nodes % Error in f 1.17 1.65 % Error in of =ox 2.72 3.38 % Error in of =oy 2.72 3.38 97 Nodes % Error in f 0.44 1.01 % Error in of =ox 1.54 2.49 % Error in of =oy 1.40 2.49 109 Nodes % Error in f 0.42 0.77 % Error in of =ox 1.26 1.74 % Error in of =oy 1.29 1.74 118 Nodes % Error in f 0.40 0.74 % Error in of =ox 1.19 1.68 % Error in of =oy 1.22 1.68 289 Nodes % Error in f 0.24 0.37 % Error in of =ox 0.73 1.01 % Error in of =oy 0.73 1.01 844 L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847

Fig. 6. Clouds of points and integration cells.

0 50 100 150 200 250 300 350

Fig. 7. (Error in GFD/error in EFG), for the function and the gradients (quartic spline), versus the number of nodes.

However, the primary interest of the meshless methods is that they should work on arbitrary geometries and on irregular clouds of points. Thus, we consider as a second example the case of Laplace equation with the logarithmic solution f ðx; yÞ¼Logðx2 þ y2Þ on a more complex domain with an irregular cloud of points. (See Fig. 8). The GFD method with cross criterium and the L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847 845

Fig. 8. A more complex domain with an irregular cloud of points.

Table 4 % Error in f , of =ox, of =oy for logarithmic solution Weighting function data GFD/EFG method Quartic spline Cubic spline GFD rinf variable · 2.0 (9-nodes stars) % Error in f 0.18 0.15 % Error in f =ox 0.94 0.81 % Error in of =oy 0.47 0.40 EFG rinf ¼ 2.0 · distance % Error in f 0.62 0.54 to the nearest third node % Error in f =ox 2.33 2.12 % Error in of =oy 2.61 2.25

EFG method with linear shape functions and Penalty functions (1015) to enforce essential boundary conditions, were used. In both methods the radius of influence is variable, rinf is ad- justed for each point taking into account only the neighboring area covering the nearest points. We have multiplied the distance to the nearest nth point by a parameter (in Table 4 we have used 2.0 as parameter value). The numerical integration over this more complex domain is made, for the EFG method, using triangular and square integration cells, as shown in Fig. 9. In Table 4 we can see the results obtained for the EFG and GFD methods. In the EFG method we use, as shown in Fig. 9, 52 triangles (13 integration points) and 48 cells (4 4 integration order) for numerical integration. Similarly to the previous results obtained in Fig. 7, the results shown in Fig. 10 also indicate a higher accuracy of the GFD method for solving Laplace equation. 846 L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847

1.00

0.80

0.60

0.40

0.20

0.00 0.00 0.20 0.40 0.60 0.80 1.00 1.20

Fig. 9. Triangular and square cells used for numerical integration in EFG.

Fig. 10. (% Error in GFD/EFG methods), for f and the gradients (cubic spline).

5. Conclusions

The main drawback of the GFD method is the possibility of obtaining ill-conditioned stars of nodes. However, we can easily evaluate the quality of numeral results by obtaining the residual at each point, which must be very small (near zero) and also with a uniform distribution over the entire domain. It is also possible to increase the number of nodes of the stars to obtain correct residual values over the entire domain. Then, when ill-conditioned stars are detected, the number of nodes of the stars can be increased in order to obtain very small residual values of the partial differential equations to be solved at all the nodal points. So, the global ill-conditioned problem disappears. Using variable radius of influence for each star of nodes appears as an important condition, in order to increase the accuracy of the GFD method. The possibility of employing the GFD method over adaptive clouds of points increasing progressively the number of nodes can be accomplished, more accurately, by using variable radius of influence. It is also important to note that the quality L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847 847 of the GFD operator is sensitive to grid smoothness; thus, very sharp changes of mesh density should be avoided. The GFD method has been compared with the EFG method. Both methods have been tested for Laplace equation in the case of different domains with essential boundary conditions and irregular clouds of points. For the tested cases, the GFD method appears to be more accurate compared to the EFG method with linear approximation.

References

[1] L.B. Lucy, A numerical approach to the testing of the fission hypothesis, Astron. J. 82 (12) (1977) 1013–1024. [2] N. Perrone, R. Kao, A general finite difference method for arbitrary meshes, Comput. Struct. 5 (1975) 45–58. [3] P.S. Jensen, Finite difference techniques for variable grids, Comput. Struct. 2 (1972) 17–29. [4] R.A. Nay, S. Utku, An alternative for the finite element method, Variational Meth. Eng. 3 (1973) 62–74. [5] T. Liszka, J. Orkisz, The finite difference method at arbitrary irregular grids and its application in applied mechanics, Comput. Struct. 11 (1980) 83–95. [6] T. Liszka, An interpolation method for an irregular net of nodes, Int. J. Numer. Meth. Eng. 20 (1984) 1599–1612. [7] P. Lancaster, K. Salkauskas, Surfaces generated by moving least squares methods, Math. Comput. 37 (1981) 141– 158. [8] J. Orkisz, Mesless finite difference method. I. Basic approach, in computational mechanics. New trends and applications, in: S. Idelsohn, E. Onnate,~ E. Dvorkin (Eds.), Proceedings of the IACM-Fourth World Congress in Computational Mechanics, CIMNE, 1998. [9] J.J. Benito, F. Urenna,~ L. Gavete, Influence of several factors in the generalized finite difference method, Appl. Math. Modell. 25 (12) (2001) 1039–1053. [10] B. Nayroles, G. Touzot, P. Villon, Generalizing the finite element method : diffuse approximation and diffuse elements, Computat. Mech. 10 (1992) 307–318. [11] T. Belytschko, Y.Y. Lu, L. Gu, Element-free Galerkin methods, Int. J. Numer. Meth. Eng. 37 (1994) 229–256. [12] L. Gavete, J.J. Benito, S. Falcon, A. Ruiz, Implementation of essential boundary conditions in a meshless method, Commun. Numer. Meth. Eng. 16 (2000) 409–421. [13] L. Gavete, J.J. Benito, S. Falcon, A. Ruiz, Penalty functions in constrained variational principles for element free Galerkin method, Eur. J. Mech. (a) Solids 19 (2000) 699–720. [14] W.K. Liu, S. Jun, S. Li, J. Adee, T. Belytschko, Reproducing kernel particle methods for structural dynamics, Int. J. Numer. Meth. Eng. 38 (1995) 1655–1679. [15] E. Onnate,~ S. Idelsohn, O.C. Zienkiewicz, R.L. Taylor, A finite point method in computational mechanics. Aplications to convective transport and fluid flow, Int. J. Numer. Meth. Eng. 39 (1996) 3839–3866. [16] A. Duarte, J.T. Oden, H-P cloud––an h-p meshless method, Numer. Meth. Partial Differen. Equat. 12 (1996) 673– 705. [17] I. Babuska, J.M. Melenk, The partition of unity method, Int. J. Numer. Meth. Eng. 40 (1997) 727–758. [18] M. Syczewski, R. Tribillo, Singularities of sets used in the mesh method, Comput. Struct. 14 (5–6) (1981) 509–511.