fem_check21a_tri.c running Given 3 ux + 2 uy + u = 2 x + 3 y + 13 Analytic solution u(x,y) = 1 + 2 x + 3 y triquad ready for integration over triangles about to read triangles from 22_t.tri 1 2 0 index=1, last=2 index=4, last=5 index=7, last=8 tri 0 has vertices 1 2 0 1 0 3 index=1, last=2 index=4, last=5 index=7, last=8 tri 1 has vertices 1 0 3 2 3 0 index=1, last=2 index=4, last=5 index=7, last=8 tri 2 has vertices 2 3 0 3 triangles read from 22_t.tri subtracting minvert=0 from all vertices, using base zero finding unique of nold=9 found unique of n=4 about to read boundary from 22_t.bound 1 2 index=1, last=2 index=4, last=5 boundary segment nbound=0 has vertices 1, 2 2 3 index=1, last=2 index=4, last=5 boundary segment nbound=1 has vertices 2, 3 3 1 index=1, last=2 index=4, last=5 boundary segment nbound=2 has vertices 3, 1 read Dirichlet boundaries from 22_t.bound subtracting minvert=0 from all vertices, using base zero finding unique of nold=6 found unique of n=3 freevert na=4, nb=3 freevert nc free = 1 unique boundary 1 unique boundary 2 unique boundary 3 number of free vertices is 1 free vertex 0 about to read coordinates from 22_t.coord 0.0 0.0 index=2, last=5 index=7, last=10 coordinate 0 at 0.0, 0.0 -0.1 -0.1 index=1, last=5 index=6, last=10 coordinate 1 at -0.1, -0.1 0.0 0.1 index=2, last=5 index=7, last=10 coordinate 2 at 0.0, 0.1 0.1 -0.1 index=2, last=5 index=6, last=10 coordinate 3 at 0.1, -0.1 coordinates read from 22_t.coord xmin=-0.1, xmax=0.1, ymin=-0.1, ymax=0.1 nvert=4, nbound=3, nuniqueb=3, nfree=1, ntri=3 compute global stiffness matrix computing local stiffness matrix for triangle 0 nodes i1=1, i2=2, i3=0 coord (-0.1,-0.1) (0.0,0.1) (0.0,0.0) cm matrix of am cm = ym solve for cm 0.0 -10.0 -0.0 cm matrix of am cm = ym solve for cm 0.0 -10.0 10.0 cm matrix of am cm = ym solve for cm 1.0 20.0 -10.0 tri_int1a running with np=3, nv=9 integral=0.06749999999999987, at i=0, j=0 intg fg =0.021583333333333288, at i=0 integral=-0.04958333333333323, at i=1, j=0 integral=-0.016249999999999966, at i=2, j=0 finished k=0 computing local stiffness matrix for triangle 1 nodes i1=1, i2=0, i3=3 coord (-0.1,-0.1) (0.0,0.0) (0.1,-0.1) cm matrix of am cm = ym solve for cm 0.0 -5.0 -5.0 cm matrix of am cm = ym solve for cm 1.0 0.0 10.0 cm matrix of am cm = ym solve for cm 0.0 5.0 -5.0 tri_int1a running with np=3, nv=9 integral=0.06833333333333322, at i=0, j=0 intg fg =0.042833333333333265, at i=0 integral=-0.08249999999999985, at i=1, j=0 integral=0.01749999999999997, at i=3, j=0 finished k=1 computing local stiffness matrix for triangle 2 nodes i1=2, i2=3, i3=0 coord (0.0,0.1) (0.1,-0.1) (0.0,0.0) cm matrix of am cm = ym solve for cm 0.0 10.0 10.0 cm matrix of am cm = ym solve for cm 0.0 10.0 0.0 cm matrix of am cm = ym solve for cm 1.0 -20.0 -10.0 tri_int1a running with np=3, nv=9 integral=-0.13249999999999973, at i=0, j=0 intg fg =0.021749999999999957, at i=0 integral=0.08374999999999982, at i=2, j=0 integral=0.05041666666666656, at i=3, j=0 finished k=2 tri 0 has vertices 1, 2, 0 tri 1 has vertices 1, 0, 3 tri 2 has vertices 2, 3, 0 vertices, coordinates and analytic values coordinate 0 at 0.0, 0.0, uana=1.0 coordinate 1 at -0.1, -0.1, uana=0.5 coordinate 2 at 0.0, 0.1, uana=1.3 coordinate 3 at 0.1, -0.1, uana=0.8999999999999999 k computed stiffness matrix, if debug K(0,0)=0.003333333333333355 K(0,1)=-0.13208333333333308 K(0,2)=0.06749999999999987 K(0,3)=0.06791666666666653 K(1,0)=0.0 K(1,1)=1.0 K(1,2)=0.0 K(1,3)=0.0 K(2,0)=0.0 K(2,1)=0.0 K(2,2)=1.0 K(2,3)=0.0 K(3,0)=0.0 K(3,1)=0.0 K(3,2)=0.0 K(3,3)=1.0 f computed forcing function and boundary, if debug F(0)=0.0861666666666665, ug[0]=0.0 F(1)=0.5, ug[1]=0.0 F(2)=1.3, ug[2]=0.0 F(3)=0.8999999999999999, ug[3]=0.0 ug computed Galerkin, Ua analytic, error ug[0]=0.9999999999999964, Ua=1.0, err=-3.552713678800501E-15 ug[1]=0.5, Ua=0.5, err=0.0 ug[2]=1.3, Ua=1.3, err=0.0 ug[3]=0.8999999999999999, Ua=0.8999999999999999, err=0.0 maxerr=3.552713678800501E-15, avgerr=8.881784197001252E-16