abc_eq.c running Given 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 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; xmin<=x<=xmax ymin<=y<=ymax zmin<=z<=zmax Boundaries Analytic solution u(x,y) = x^3 + 2y^3 + 3x^2 y + 4xy^2 + 5xy + 6x + 7y + 8 xmin=-1, xmax=1, ymin=-1, ymax=1 nx=7, ny=7 time start = 0.000000 seconds x grid and analytic solution at ymin i=0, Ua(-1.000,-1.000)=-10.0000 i=1, Ua(-0.667,-1.000)=-5.9630 i=2, Ua(-0.333,-1.000)=-3.0370 i=3, Ua(-0.000,-1.000)=-1.0000 i=4, Ua( 0.333,-1.000)= 0.3704 i=5, Ua( 0.667,-1.000)= 1.2963 i=6, Ua( 1.000,-1.000)= 2.0000 y grid and analytic solution at xmin ii=0, Ua(-1.000,-1.000)=-10.0000 ii=1, Ua(-1.000,-0.667)=-4.7037 ii=2, Ua(-1.000,-0.333)=-1.1852 ii=3, Ua(-1.000,-0.000)= 1.0000 ii=4, Ua(-1.000, 0.333)= 2.2963 ii=5, Ua(-1.000, 0.667)= 3.1481 ii=6, Ua(-1.000, 1.000)= 4.0000 check rderiv(2,nx,0,hx,cxx cxx[0]=40.600000 cxx[1]=-156.600000 cxx[2]=263.250000 cxx[3]=-254.000000 cxx[4]=148.500000 cxx[5]=-48.600000 cxx[6]=6.850000 check rderiv(2,nx,nx-1,hx,cxx cxx[0]=6.850000 cxx[1]=-48.600000 cxx[2]=148.500000 cxx[3]=-254.000000 cxx[4]=263.250000 cxx[5]=-156.600000 cxx[6]=40.600000 put solution in Ua vector time now = 0.000000 seconds, time for previous section = 0.000000 seconds initialize A time now = 0.000000 seconds, time for previous section = 0.000000 seconds compute A matrix A computed stiffness matrix time now = 0.000000 seconds, time for previous section = 0.000000 seconds solve 25 equations in 25 unknowns equations solved time now = 0.000000 seconds, time for previous section = 0.000000 seconds check PDE against known solution check_soln maxerr=1.15383e-13 check PDE against computer solution check_soln maxerr=4.62609e-13 U computed, Ua analytic, error ug[1,1]= -1.4074, Ua= -1.4074, err=6.21725e-15 ug[1,2]= 1.6667, Ua= 1.6667, err=4.44089e-16 ug[1,3]= 3.7037, Ua= 3.7037, err=4.44089e-16 ug[1,4]= 5.1481, Ua= 5.1481, err=1.77636e-15 ug[1,5]= 6.4444, Ua= 6.4444, err=1.77636e-15 ug[2,1]= 1.0000, Ua= 1.0000, err=5.32907e-15 ug[2,2]= 3.8519, Ua= 3.8519, err=7.99361e-15 ug[2,3]= 5.9630, Ua= 5.9630, err=8.88178e-15 ug[2,4]= 7.7778, Ua= 7.7778, err=7.99361e-15 ug[2,5]= 9.7407, Ua= 9.7407, err=8.88178e-15 ug[3,1]= 2.7407, Ua= 2.7407, err=2.66454e-15 ug[3,2]= 5.5926, Ua= 5.5926, err=9.76996e-15 ug[3,3]= 8.0000, Ua= 8.0000, err=1.68754e-14 ug[3,4]= 10.4074, Ua= 10.4074, err=1.59872e-14 ug[3,5]= 13.2593, Ua= 13.2593, err=1.24345e-14 ug[4,1]= 4.0370, Ua= 4.0370, err=1.15463e-14 ug[4,2]= 7.1111, Ua= 7.1111, err=1.5099e-14 ug[4,3]= 10.0370, Ua= 10.0370, err=2.30926e-14 ug[4,4]= 13.2593, Ua= 13.2593, err=2.4869e-14 ug[4,5]= 17.2222, Ua= 17.2222, err=2.13163e-14 ug[5,1]= 5.1111, Ua= 5.1111, err=8.88178e-16 ug[5,2]= 8.6296, Ua= 8.6296, err=3.55271e-15 ug[5,3]= 12.2963, Ua= 12.2963, err=1.77636e-15 ug[5,4]= 16.5556, Ua= 16.5556, err=0 ug[5,5]= 21.8519, Ua= 21.8519, err=7.10543e-15 total CPU time = 0.000000 seconds maxerr=2.4869e-14, avgerr=4.42277e-15 end abc_eq.c