17
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 T ecnica Superior de Ingenieros de Minas, Universidad Polit ecnica, c/Rios Rosas 21, 28003 Madrid, Spain b Facultad de Farmacia, Universidad Complutense, Avda Complutense s/n, 28040 Madrid, Spain c Escuela T ecnica 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 approximation 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 Applied Mathematical Modelling 27 (2003) 831–847 www.elsevier.com/locate/apm

Improvements of generalized finite difference method and ...Improvements of generalized finite difference method and comparison with other meshless method L. Gavete a,*, M.L. Gavete

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Improvements of generalized finite difference method and ...Improvements of generalized finite difference method and comparison with other meshless method L. Gavete a,*, M.L. Gavete

Applied Mathematical Modelling 27 (2003) 831–847

www.elsevier.com/locate/apm

Improvements of generalized finite difference methodand comparison with other meshless method

L. Gavete a,*, M.L. Gavete b, J.J. Benito c

a Escuela T�eecnica Superior de Ingenieros de Minas, Universidad Polit�eecnica, c/Rios Rosas 21, 28003 Madrid, Spainb Facultad de Farmacia, Universidad Complutense, Avda Complutense s/n, 28040 Madrid, Spain

c Escuela T�eecnica 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 thedevelopment 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 approximation and penalty functions to treat the essential boundary condition is used inthis 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 asin 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

Page 2: Improvements of generalized finite difference method and ...Improvements of generalized finite difference method and comparison with other meshless method L. Gavete a,*, M.L. Gavete

832 L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847

Although meshless methods were originated about twenty years ago, the research effort devotedto 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 asexploding stars and dust clouds. Other path in the evolution of meshless methods has been thedevelopment 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 werepublished in the early seventies. Jensen [3] was the first to introduce fully arbitrary mesh. Heconsidered Taylor series expansions interpolated on six-node stars in order to derive the FDformulae approximating derivatives of up to the second order. While he used that approach to thesolution of boundary value problems given in the local formulation, Nay and Utku [4] extended itto the analysis of problems posed in the variational (energy) form. However, these very earlyGFD formulations were later essentially improved and extended by many other authors, but themost robust of these methods was developed by Liszka and Orkisz [5,6], using moving leastsquares (MLS) interpolation [7], and the most advanced version was given by Orkisz [8]. Theexplicit FD formulae used in the GFD method, as well as the influence of the main parametersinvolved, was studied by Benito et al. [9].

Other different MM have been proposed. The diffuse element method, developed by Nayroleset al. [10], was a new way for solving partial differential equations. Belytschko et al. [11] developedan alternative implementation using MLS approximation. They called their approach the elementfree Galerkin (EFG) method. The use of a constrained variational principle with a penaltyfunction to alleviate the treatment of Dirichlet boundary conditions in (EFG) method has beenproposed [12,13]. Liu et al. [14] have used a different kind of ‘‘griddles’’ multiple scale methodbased on reproducing kernel and wavelet analysis. O~nnate et al. [15] focused on the application tofluid flow problems with a standard point collocation technique. Duarte and Oden [16], on the onehand and Babuska and Melenk [17] on the other, have shown how the denominated methodswithout mesh can be based on the partition of the unity. All these methods can be considered asMM.

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 theweighting functions. Also in Section 3 the possibility of employing the GFDmethod over adaptiveclouds of points is explored. Thirdly, the GFD method is compared to the EFG method in Section4. 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 Taylor series ex-pansion around a point P ðx0; y0Þ may be expressed in the form

f ¼ f0 þ hof0ox

þ kof0oy

þ h2

2

o2f0ox2

þ k2

2

o2f0oy2

þ hko2f0oxoy

þ oðq3Þ ð1Þ

where f ¼ f ðx; yÞ, f0 ¼ f ðx0; y0Þ, h ¼ x� x0, k ¼ y � y0 and q ¼ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffih2 þ k2

p.

Page 3: Improvements of generalized finite difference method and ...Improvements of generalized finite difference method and comparison with other meshless method L. Gavete a,*, M.L. Gavete

L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847 833

Eq. (1) and all following formulae will be limited to second order approximations and two-dimensional problems. In any case, the extension to other problems is obvious.

We consider norm B

B ¼XNi¼1

f0

��� fi þ hi

of0ox

þ kiof0oy

þ h2io2f0ox2

þ k2io2f0oy2

þ hikio2f0oxoy

�wi

�2ð2Þ

where fi ¼ f ðxi; yiÞ, f0 ¼ f ðx0; y0Þ, hi ¼ xi � x0, ki ¼ yi � y0, wi ¼ weighting function with compactsupport.

The solution may be obtained by minimizing norm B, writing

oBofDf g ¼ 0 ð3Þ

fDf gT ¼ of0ox

;of0oy

;o2f0ox2

;o2f0oy2

;o2f0oxoy

� �ð4Þ

we come to a set of five equations with five unknowns for each node.For example, the first equation is as follows

f0XNi¼1

w2i hi �

XNi¼1

fiw2i hi þ

of0ox

XNi¼1

w2i h

2i þ

of0oy

XNi¼1

w2i hiki þ

o2f0ox2

XNi¼1

w2i

h3i2

þ o2f0oy2

XNi¼1

w2i

k2i hi2

þ o2f0oxoy

XNi¼1

w2i h

2i ki ¼ 0 ð5Þ

this Eq. (5) and all following equations give us the following system of equations

Rw2i h

2i Rw2

i hiki Rw2ih3i2

Rw2ik2i hi2

Rw2i h

2i ki

Rw2i hiki Rw2

i k2i Rw2

ih2i ki2

Rw2ik3i2

Rw2i hik

2i

Rw2ih3i2

Rw2ikih2i2

Rw2ih4i4

Rw2ih2i k

2i

4Rw2

ih3i ki2

Rw2ihik2i2

Rw2ik3i2

Rw2ih2i k

2i

4Rw2

ik4i4

Rw2ihik3i2

Rw2i h

2i ki Rw2

i hik2i Rw2

ih3i ki2

Rw2ihik3i2

Rw2i h

2i k

2i

0BBBBBBBBB@

1CCCCCCCCCA

of0oxof0oy

o2f0ox2

o2f0oy2

o2f0oxoy

8>>>>>>>>><>>>>>>>>>:

9>>>>>>>>>=>>>>>>>>>;

¼

�f0Rw2i hi þ Rfiw2

i hi�f0Rw2

i ki þ Rfiw2i ki

�f0Rw2ih2i2þ Rfiw2

ih2i2

�f0Rw2ik2i2þ Rfiw2

ik2i2

�f0Rw2i hiki þ Rfiw2

i hiki

0BBBBBBB@

1CCCCCCCA

ð6Þ

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.

Page 4: Improvements of generalized finite difference method and ...Improvements of generalized finite difference method and comparison with other meshless method L. Gavete a,*, M.L. Gavete

834 L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847

If we are interested in solving Poisson�s equation, we can calculate o2f0=ox2, o2f0=oy2 at eachnode according to (6) and then

o2f0ox2

þ o2f0oy2

� gðx0; y0Þ ¼ 0 ð8Þ

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 previouslyobtained matrix equation (7) and, by virtue of the fact that the matrices of coefficients AP aresymmetrical, it is then possible to use the Cholesky method to solve the same. The aim is to obtainthe decomposition in upper and lower triangular matrices LLT. The coefficients of the matrix Lare denoted by Lði; jÞ.

On solving the systems (7), the following explicit difference formulae are obtained

DfPðkÞ ¼1

Lðk; kÞ

� f0

XNi¼1

Mðk; iÞci þXNj¼1

fjXPi¼1

Mðk; iÞdji

!!ðk ¼ 1; . . . ; PÞ ð9Þ

in which P ¼ 5, if only second order Taylor series expansion terms are included, and P ¼ 9 if alsothird order terms are included and where

Mði; jÞ ¼ ð�1Þ1�dij 1

Lði; iÞXi�1

k¼j

Lði; kÞMðk; jÞ for j < i ði and j ¼ 1; . . . ; PÞ

Mði; jÞ ¼ 1

L i; ið Þ for j ¼ i ði and j ¼ 1; . . . ; PÞ

Mði; jÞ ¼ 0 for j > i ði and j ¼ 1; . . . ; P Þ

ð10Þ

with dij the Kronecker delta function, and

ci ¼XNj¼1

dji

dj1 ¼ hjW 2; dj2 ¼ kjW 2; dj3 ¼h2j2W 2; dj4 ¼

k2j2W 2; dj5 ¼ hjkjW 2

dj6 ¼h3i6W 2; dj7 ¼

k3i6W 2; dj8 ¼

h2i ki2

W 2; dj9 ¼hik2i2

W 2 ð11Þ

where

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

On including the explicit expressions for the values of the partial derivatives o2f0=ox2, o2f0=oy2 inthe initial equation [8], taking for example gðx; yÞ ¼ 0, the star equation is obtained. This Eq. (13)

Page 5: Improvements of generalized finite difference method and ...Improvements of generalized finite difference method and comparison with other meshless method L. Gavete a,*, M.L. Gavete

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

L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847 835

is formed at each point, calculating the second order derivatives o2f0=ox2, o2f0=oy2 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 thepoint (x0; y0) is formed, obtaining the linear equation

k0f0 þXNi¼1

kifi ¼ 0 ð13Þ

Then

f0 ¼XNi¼1

mifi ð14Þ

XNi¼1

mi ¼ 1 ð15Þ

All points in the control scheme are called ‘‘a star’’ of nodes. The number and the position ofnodes 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 degeneratedsolutions [18]. As star selection criterium we follow the denominated cross criterium: the areaaround the central nodal point, 0, is divided into four sectors corresponding to quadrants of thecartesian co-ordinates system originating at the central node (see Fig. 1). Each of its semi axes isassigned to one of these quadrants. In each sector two or more nodes are selected, the closest tothe origin. If this is not possible, e.g., at the boundary, missing nodes can be supplemented toprovide 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 calculatingthe residual at each point of the interior of the domain using (6) and (8). In order to provide therequired and controlled precision of the GFD method, residuals of (8) may be very small and withsmoothed distribution over the entire domain. The existence of ill-conditioned stars of nodes, asshown in the next section, depends on the weighting function wi employed, and on the number ofnodes by quadrant of each star of nodes.

Page 6: Improvements of generalized finite difference method and ...Improvements of generalized finite difference method and comparison with other meshless method L. Gavete a,*, M.L. Gavete

836 L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847

3. Numerical results

A global error measure is defined as

Errorf ¼1

jf jmax

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi1

NN

XNN

i¼1

ðf ðeÞi � f ðnÞ

i Þ2vuut ð16Þ

where f can be f , of =ox, of =oy, the superscripts (e) and (n) refer to the exact and numericalsolutions, 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):

wiðdÞ ¼ 1� 6ddm

� �2

þ 8ddm

� �3

� 3ddm

� �4

ð17Þ

when d 6 dm, and wi ¼ 0 when d > dm; and where

d ¼ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiðx� xiÞ2 þ ðy � yiÞ2

q

(b) Polynomial weight function (cubic spline):

wiðdÞ ¼23� 4 d

dm

� 2 � 4 ddm

� 3for d 6 1

2dm

43� 4 d

dm

� þ 4 d

dm

� 2 � 43

ddm

� 3for 1

2dm < d 6 dm

0 for d > dm

8><>: ð18Þ

d ¼ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiðx� xiÞ2 þ ðy � yiÞ2

q

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

3.1. L-shaped domain

Firstly, we present an example that shows the performance of the GFD method on a problemwith a corner singularity. We consider the Laplace equation in an L-shaped domain that has anon-convex corner at the origin satisfying homogeneous Dirichlet boundary conditions at thesides meeting at the origin and non-homogeneous conditions on the other sides, see Fig. 2. Wechoose 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 inthe case of irregular clouds of points (Figs. 2 and 3), comparing the effect of using fixed or variable

Page 7: Improvements of generalized finite difference method and ...Improvements of generalized finite difference method and comparison with other meshless method L. Gavete a,*, M.L. Gavete

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

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

L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847 837

radius of influence for the weighting functions. As shown in Figs. 2 and 3, the dimensions of bothmodels of the L-shaped domain, A and B, are different. It is possible to use a variable radius ofinfluence using different maximum radius of influence (rinf) for each star of nodes, depending onthe distance from the center of the star to the most far away node included in the star. In thiscase, rinf is adjusted for each point (center of a star of nodes) taking into account onlythe neighboring area covered by the nearest points according to the four quadrants criterium. Wecan also multiply the distance to the most far away node point by a parameter. In Table 1 weuse 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 cubicspline.

Page 8: Improvements of generalized finite difference method and ...Improvements of generalized finite difference method and comparison with other meshless method L. Gavete a,*, M.L. Gavete

Table 1

% Error in the function and the derivatives for L-shaped domain irregular clouds (Figs. 2 and 3)

% Error

in f% Error

in of =ox% Error

in of =oy% Error in

o2f =ox2% Error in

o2f =oy2Residual

medium value

Fig. 2 DFG rinf vari-

able· 2.09-nodes stars

QS 0.59 3.08 1.82 14.25 14.25 0.33· 10�6

CS 0.56 2.95 1.83 14.16 14.16 0.37· 10�6

DFG rinf

fixed¼ 0.5

9-nodes stars

QS 0.66 3.37 1.89 14.19 14.19 0.42· 10�6

CS 0.64 3.25 1.85 14.06 14.06 0.32· 10�6

Fig. 3 DFG rinf vari-

able· 2.013-nodes stars

QS 0.41 1.28 1.97 5.93 5.93 0.10· 10�6

CS 0.41 1.21 1.84 5.76 5.76 0.81· 10�7

DFG rinf

fixed¼ 0.8

13-nodes stars

QS 0.41 1.58 2.51 6.58 6.58 0.78 10�7

CS 0.41 1.57 2.50 6.57 6.57 0.82· 10�7

GFD method using variable or fixed rinf.

Notes: QS: Quartic spline weighting function, CS: Cubic spline weighting function.

838 L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847

As shown in Table 1, where the relationship between errors is given, it is interesting to note thatthe GFD method is very accurate also in the presence of the singular point that is located in theorigin of co-ordinates however, the error increases with the order of the derivatives, so theminimum error is the corresponding to the function f , and the maximum error is the calculatedfor the second derivatives. The GFD method is accurate even for very irregular clouds of points asthe ones given in Figs. 2 and 3, however ill-conditioned stars can be obtained. For example, thecloud of nodes given in Fig. 3 contained ill-conditioned stars if 9-nodes stars were considered (2nodes by quadrant according to Fig. 1). This problem was easily detected because the residualmedium value (the total residual of all the nodes divided by the number of nodes) was very bigcompared to the usual values obtained, and also because the relation between the maximum andminimum 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 thenumber 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 alsoby the weighting function employed. For example, using other weighting function such as

wiðdÞ ¼1

d3ð19Þ

when d 6 dm, and wiðdÞ ¼ 0 when d > dm; and where d ¼ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiðx� xiÞ2 þ ðy � yiÞ2

qand dm ¼ rinf,

the model of Fig. 2 contained ill-conditioned stars taking 9-nodes stars (two nodes in eachquadrant) 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. Alsothe 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-

Page 9: Improvements of generalized finite difference method and ...Improvements of generalized finite difference method and comparison with other meshless method L. Gavete a,*, M.L. Gavete

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 thestars using derivatives calculated by (6). Then, by increasing the number of nodes in each one ofthe quadrants the ill conditioning due to the location of the nodes can be avoided. This procedureassures the quality of numerical results.

As shown in Table 1, it is possible to use a variable (different) radius of influence for each star ofnodes. In this case, rinf is adjusted for each point taking into account only the neighboring areacovering the nearest points according to the four quadrants criterium. We have multiplied thedistance to the most far away node point included in each one of the stars by a parameter (inTable 1 we have used 2.0 as parameter value, for both cases corresponding to Figs. 2 and 3). Theuse 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 theexact solution is f ðx; yÞ ¼ Logðx2 þ y2Þ. We use the knowledge of the exact solution to evaluatethe performance of the method, creating different adaptive clouds increasing the number of pointsin 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 consecutivelymore refined. Fig. 4 shows every different used cloud of points. In all the cases quartic splineweighting functions have been used. The radius of domain of influence, rinf, was computedas fixed (rinf¼ 0.5) or variable, this last case was computed by rinf ¼ adI , with dI chosen tobe 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 andFig. 5.

As it is shown in Table 2 and Fig. 4, we consider two different sets of cases: regular clouds (81and 289 nodes) and irregular clouds (97, 109 and 118 nodes). Best results for all the cases areobtained with the GFD method, using variable radius (see Fig. 5).

In Fig. 5 the results obtained using quartic spline weighting function are given. By comparingmodels T30908 and T30908r1 we can see how the global error decreases by adding nodes in theneighborhood 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 thetwo 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 thedomain and it is homogenized. With model T30908r3 error drops a little although the results arevery similar (see Fig. 5). A uniform refinement, as in model T31708 leads to better results, (seeFigs. 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 gradients decreases using variableradius of influence to compare the adaptive clouds of nodes. Similar results have been obtainedfor other weighting functions as those defined in (18) and (19).

Page 10: Improvements of generalized finite difference method and ...Improvements of generalized finite difference method and comparison with other meshless method L. Gavete a,*, M.L. Gavete

Fig. 4. Clouds of points. GFD method.

840 L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847

As we can see in this example, using variable radius of influence for each star of nodes appearsas an important condition to employ the GFD method with more efficiency.

Page 11: Improvements of generalized finite difference method and ...Improvements of generalized finite difference method and comparison with other meshless method L. Gavete a,*, M.L. Gavete

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

variable radius· 2.0GFD method 9-nodes stars

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.

L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847 841

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 locallyapproximated by

f hðxÞ ¼Xmi¼1

piðxÞaiðxÞ ¼ pTðxÞaðxÞ ð20Þ

where m is the number of terms in the basis, the monomial piðxÞ are basis functions, and aiðxÞ aretheir coefficients, which, as indicated, are functions of the spatial co-ordinates x.

Page 12: Improvements of generalized finite difference method and ...Improvements of generalized finite difference method and comparison with other meshless method L. Gavete a,*, M.L. Gavete

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 andthe function. This yields the quadratic form

J ¼XnI¼1

wðdIÞðpTðxIÞaðxÞ � fIÞ2 ð21Þ

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

fT ¼ ðf1; f2; . . . ; fnÞ ð23Þ

P ¼pTðx1Þ. . .

pTðxnÞ

24

35 ð24Þ

pTð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Þ ¼ A�1ðxÞHðxÞf ð30Þ

The dependent variable f h can, then, be expressed as

f hðxÞ ¼XnðxÞI¼1

UIðxÞfI ð31Þ

where

UIðxÞ ¼ pTðxÞA�1ðxÞHIðxÞ ð32Þ

with HI being the column I of H.
Page 13: Improvements of generalized finite difference method and ...Improvements of generalized finite difference method and comparison with other meshless method L. Gavete a,*, M.L. Gavete

L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847 843

The partial derivatives of the MLS shape functions are obtained as

Table

% Err

Qua

81 N

97 N

109

118

289

UI;jðxÞ ¼ pT;jA�1HI þ pT A�1ðHI ;j

� A;jA

�1HI�

ð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 functionproperty 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. Inthis 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 essentialboundary 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 neighboringarea 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 themodels of Fig. 4. Integration cells used in the EFG method for the models of Fig. 4, are givenin Fig. 6. The results obtained comparing the GFD and EFG methods are given in Table 3 andFig. 7.

3

or in f , of =ox, of =oy for logarithmic solution, GFD method versus EFG method using variable rinf

rtic spline weighting function GFD method 9-nodes stars

variable radius· 2.0EFG method o.i. 4 · 4variable radius · 2.0

odes % Error in f 1.17 1.65

% Error in of =ox 2.72 3.38

% Error in of =oy 2.72 3.38

odes % Error in f 0.44 1.01

% Error in of =ox 1.54 2.49

% Error in of =oy 1.40 2.49

Nodes % Error in f 0.42 0.77

% Error in of =ox 1.26 1.74

% Error in of =oy 1.29 1.74

Nodes % Error in f 0.40 0.74

% Error in of =ox 1.19 1.68

% Error in of =oy 1.22 1.68

Nodes % Error in f 0.24 0.37

% Error in of =ox 0.73 1.01

% Error in of =oy 0.73 1.01

Page 14: Improvements of generalized finite difference method and ...Improvements of generalized finite difference method and comparison with other meshless method L. Gavete a,*, M.L. Gavete

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.

844 L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847

However, the primary interest of the meshless methods is that they should work on arbitrarygeometries and on irregular clouds of points. Thus, we consider as a second example the case ofLaplace equation with the logarithmic solution f ðx; yÞ ¼ Logðx2 þ y2Þ on a more complex domainwith an irregular cloud of points. (See Fig. 8). The GFD method with cross criterium and the

Page 15: Improvements of generalized finite difference method and ...Improvements of generalized finite difference method and comparison with other meshless method L. Gavete a,*, M.L. Gavete

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· distanceto the nearest third node

% Error in f 0.62 0.54

% Error in f =ox 2.33 2.12

% Error in of =oy 2.61 2.25

L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847 845

EFG method with linear shape functions and Penalty functions (1015) to enforce essentialboundary 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 used2.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 theresults obtained for the EFG and GFD methods. In the EFG method we use, as shown inFig. 9, 52 triangles (13 integration points) and 48 cells (4� 4 integration order) for numericalintegration.

Similarly to the previous results obtained in Fig. 7, the results shown in Fig. 10 also indicate ahigher accuracy of the GFD method for solving Laplace equation.

Page 16: Improvements of generalized finite difference method and ...Improvements of generalized finite difference method and comparison with other meshless method L. Gavete a,*, M.L. Gavete

0.00 0.20 0.40 0.60 0.80 1.00 1.200.00

0.20

0.40

0.60

0.80

1.00

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).

846 L. Gavete et al. / Appl. Math. Modelling 27 (2003) 831–847

5. Conclusions

The main drawback of the GFD method is the possibility of obtaining ill-conditioned stars ofnodes. However, we can easily evaluate the quality of numeral results by obtaining the residual ateach point, which must be very small (near zero) and also with a uniform distribution over theentire domain. It is also possible to increase the number of nodes of the stars to obtain correctresidual values over the entire domain. Then, when ill-conditioned stars are detected, the numberof nodes of the stars can be increased in order to obtain very small residual values of the partialdifferential equations to be solved at all the nodal points. So, the global ill-conditioned problemdisappears.

Using variable radius of influence for each star of nodes appears as an important condition, inorder to increase the accuracy of the GFD method. The possibility of employing the GFD methodover 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

Page 17: Improvements of generalized finite difference method and ...Improvements of generalized finite difference method and comparison with other meshless method L. Gavete a,*, M.L. Gavete

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 densityshould be avoided.

The GFD method has been compared with the EFG method. Both methods have been testedfor Laplace equation in the case of different domains with essential boundary conditions andirregular clouds of points. For the tested cases, the GFD method appears to be more accuratecompared 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. O~nnate, E. Dvorkin (Eds.), Proceedings of the IACM-Fourth World Congress in

Computational Mechanics, CIMNE, 1998.

[9] J.J. Benito, F. Ure~nna, 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. O~nnate, 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.