abc.txt see WEB page for development CMSC 455 supplemental The problem must be well posed and the solution must be continuous and continuously differentiable. The PDE to be solved is: a1(x,y)*uxx(x,y) + b1(x,y)*uxy(x,y) + c1(x,y)*uyy(x,y) + d1(x,y)*ux(x,y) + e1(x,y)*uy(x,y) + f1(x,y) = c(x,y) where, for this test case a1(x,y) = exp(x/2)*exp(y)/2 b1(x,y) = 0.7/(x*x*y*y + 0.5) c1(x,y) = (4 - exp(x) - exp(y/2))*2 d1(x,y) = x*x+y e1(x,y) = x*y*y f1(x,y) = 3.0*x + 2.0*y The solution (normally only the boundary values are computed) u(x,y) = x^3 + 2y^3 + 3x^2 y + 4xy^2 + 5xy + 6x + 7y + 8 where uxx(x,y) = 6.0*x + 6.0*y uxy(x,y) = 6.0*x + 8.0*y + 5.0 uyy(x,y) = 12.0*y + 8.0*x ux(x,y) = 3.0*x*x + 6.0*x*y + 4.0*y*y + 5.0*y + 6.0 uy(x,y) = 6.0*y*y + 3.0*x*x + 8.0*x*y + 5.0*x + 7.0 Thus compute (I used Maple) c(x,y) = 0.5*exp(x/2.0)*exp(y)*(6.0*x+6.0*y) + 0.7*(6.0*x + 8.0*y + 5.0)/(x*x*y*y+0.5) + (8.0 - 2.0*exp(x) - 2.0*exp(y/2.0))*(12.0*y + 8.0*x) + (x*x+y)*(3.0*x*x + 6.0*x*y + 4.0*y*y + 5.0*y + 6.0) + x*y*y*(6.0*y*y + 3.0*x*x + 8.0*x*y + 5.0*x +7.0) + 3.0*x + 2.0*y; Discretization of the PDE for nd=5, gives the terms a1(x,y)*uxx(x,y) = a1(x,y) * (1/(12*hx*hx)) * (-1*u(x-2hx,y) +16*u(x-hx,y) -30*u(x,y) +16*u(x+hx,y) -1*u(x+2hx,y)) b1(x,y)*uxy(x,y) = b1(xmin+i*hx,y+j*hy) * (1/(144*hy*hy)) * ( 1*u(x-2hx,y-2hy) -8*u(x-hx,y-2hy) +0*u(x,y-2hy) +8*u(x+hx,y-2hy) -1*u(x+2hx,y-2hy) -8*u(x-2hx,y-hy ) +64*u(x-hx,y-hy ) +0*u(x,y-hy ) -64*u(x+hx,y-hy ) +8*u(x+2hx,y-hy ) +0*u(x-2hx,y ) +0*u(x-hx,y ) +0*u(x,y ) +0*u(x+hx,y ) +0*u(x+2hx,y ) +8*u(x-2hx,y+hy ) -64*u(x-hx,y+hy ) +0*u(x,y+hy ) +64*u(x+hx,y+hy ) -8*u(x+2hx,y+hy ) -1*u(x-2hx,y+2hy) +8*u(x-hx,y+2hy) +0*u(x,y+2hy) -8*u(x+hx,y+2hy) +1*u(x+2hx,y+2hy)) c1(x,y)*uyy(x,y) = c1(x,y) * (1/(12*hy*hy)) * (-1*u(x,y-2hy) +16*u(x,y-hy) -30*u(x,y) +16*u(x,y+hy) -1*u(x,y+2hy)) d1(x,y)*ux(x,y) = d1(xmin+i*hx,ymin+j*hy) * (1/(12*hx) * (1*u(x-2hx,y) -8*u(x-hx,y) +0*u(x,y) +8*u(x+hx,y) -1*u(x+2hx,y)) e1(x,y)*uy(x,y) = e1(xmin+i*hx,ymin+j*hy) * (1/(12*hy) * (1*u(x,y-2hy) -8*u(x,y-hy) +0*u(x,y) +8*u(x,y+hy) -1*u(x,y+2hy)) discretization for the general central points with indices is a1(xmin+i*hx,ymin+j*hy) * (1/(12*hx*hy)) * (-1*u(i-2,j) +16*u(i-1,j) -30*u(i,j) +16*u(i+1,j) -1*u(i+2,j)) + b1(xmin+i*hx,y+j*hy) * (1/(144*hy*hy)) * ( 1*u(i-2,j-2) -8*u(i-1,j-2) +0*u(i,j-2) +8*u(i+1,j-2) -1*u(i+2,j-2) -8*u(i-2,j-1) +64*u(i-1,j-1) +0*u(i,j-1) -64*u(i+1,j-1) +8*u(i+2,j-1) +0*u(i-2,j ) +0*u(i-1,j ) +0*u(i,j ) +0*u(i+1,j ) +0*u(i+2,j ) +8*u(i-2,j+1) -64*u(i-1,j+1) +0*u(i,j+1) +64*u(i+1,j+1) -8*u(i+2,j+1) -1*u(i-2,j+2) +8*u(i-1,j+2) +0*u(i,j+2) -8*u(i+1,j+2) +1*u(i+2,j+2)) + c1(xmin+i*hx,ymin+j*hy) * (1/(12*hy*hy)) * (-1*u(i,j-2) +16*u(i,j-1) -30*u(i,j) +16*u(i,j+1) -1*u(i,j+2)) + d1(xmin+i*hx,ymin+j*hy) * (1/(12*hx) * (1*u(i-2,j) -8*u(i-1,j) +0*u(i,j) +8*u(i+1,j) -1*u(i+2,j)) + e1(xmin+i*hx,ymin+j*hy) * (1/(12*hy) * (1*u(i,j-2) -8*u(i,j-1) +0*u(i,j) +8*u(i,j+1) -1*u(i,j+2)) + f1(xmin+i*hx,ymin+j*hy) = c(xmin+i*hx,ymin+j*hy) The solver uses #include "abc.h" to gain access to the users problem See the file "abc.h" for the required user provided information.