From: Roy Stogner <roystgnr@ic...>  20080303 22:56:42

On Mon, 3 Mar 2008, Maxime Debon wrote: > Taking the equation : x * u''(x) = 1 > between [0.5 ; 1.0] > with u[0.5] = 0.5 and u[1.0] = 1.0, > > we would expect a value of 0.88045 at the point 0.900391 but we obtain > 0.900391. This problem is still giving you trouble? I recall seeing your earlier post but figured it was probably just a bug in user code that you'd have found yourself before I could send an email. Some questions: Is the bad solution you're getting just a straight line from 0.5,0.5 to 1,1? Or is the value 0.900391,0.900391 just a coincidence? What kind of mesh, finite element type, polynomial degree, etc are you using? Have you tried verifying that the element matrices and load vectors are correct? For a 1D problem with p=1 this is very easy. > The corresponding code is : > Ke(i,j) += JxW[qp]*(dphi[i][qp]*dphi[j][qp])*(q_point[qp](0)); > Fe(i) += JxW[qp]*phi[i][qp]*1.0; > > > The correct result could be obtained computing " u''(x) = 1/x ", > making disappear the variable coefficient on the diffusion term. > > The corresponding code is : > Ke(i,j) += JxW[qp]*(dphi[i][qp]*dphi[j][qp])*(1.0); > Fe(i) += JxW[qp]*phi[i][qp]*1.0*q_point[qp](0); Oddly enough; I'd have expected just the opposite behavior. If you're working from example 0, the 5th order quadrature rule along with 2nd order elements should integrate u'*v'*x perfectly, but should give you some quadrature error with 1/x*v.  Roy 