On Mon, Mar 2, 2009 at 3:48 PM, yunfei zhu <[email protected]> wrote: > Hi all, > I am feeling a little confused about the following codes in the > file:fe_lagrange_shape_2D.C. > > case TRI3: > case TRI6: > { > const Real zeta1 = p(0); > const Real zeta2 = p(1); > const Real zeta0 = 1. - zeta1 - zeta2; > > libmesh_assert (i<3); > > switch(i) > { > case 0: > return zeta0; > > case 1: > return zeta1; > > case 2: > return zeta2; > > default: > libmesh_error(); > > } > > Considering a tri3, as following, > > 3 > * > * c * > * * * > * * > * a* *b * > 1 * * * * *2 > points a,b,c are quadrature points. > (L[i] are the area coordinates) > p(0) is the area coordinate L[1] at a quadrature point. > p(1) is the area coordinate L[2] at a quadrature point. > so, > zeta1=L[1] > zeta2=L[2] > zeta0=L[3] > > we have shape function : > phi[i][a]=L[i][a] > > If i=0, we should have: phi[0][a]=L[1][a], > but the code return zeta0, which is L[3], not L[1].
zeta0 as given above is the correct basis function for node zero. -- John ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
