fem_check21_tri.c running Given 3 ux + 2 uy + u = 2 x + 3 y + 13 Analytic solution u(x,y) = 1 + 2 x + 3 y 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, area=0.005000000000000001 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_int1 running with np=30, nv=496 integral=0.06749375871459702, at i=0, j=0 intg fg =0.021582709204793042, at i=0 integral=-0.049580212690631814, at i=1, j=0 integral=-0.016246879357298457, at i=2, j=0 finished k=0 computing local stiffness matrix for triangle 1 nodes i1=1, i2=0, i3=3, area=0.010000000000000002 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_int1 running with np=30, nv=496 integral=0.06832085076252735, at i=0, j=0 intg fg =0.04282958856209152, at i=0 integral=-0.08249375871459694, at i=1, j=0 integral=0.01750624128540305, at i=3, j=0 finished k=1 computing local stiffness matrix for triangle 2 nodes i1=2, i2=3, i3=0, area=0.005000000000000001 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_int1 running with np=30, nv=496 integral=-0.13250624128540286, at i=0, j=0 intg fg =0.021750624128540313, at i=0 integral=0.08375312064270142, at i=2, j=0 integral=0.050419787309368226, 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.0033083681917215058 K(0,1)=-0.13207397140522875 K(0,2)=0.06750624128540296 K(0,3)=0.06792602859477127 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.08616292189542488, 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.999999999999929, Ua=1.0, err=-7.105427357601002E-14 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=7.105427357601002E-14, avgerr=1.7763568394002505E-14