function [ u, dudx, dudy ] = solution_evaluate ( xy, t, node_u ) %% SOLUTION_EVALUATE evaluates the solution at a point in a triangle. % % Modified: % % 24 June 2004 % % Author: % % John Burkardt % % Parameters: % % Input, real XY(2), the point at which the solution is to be evaluated. % % Input, real T(2,3), the coordinates of the vertices of the triangle containing XY. % % Input, real NODE_U(3), the value of the finite element coefficients at the vertices. % u = 0.0; dudx = 0.0; dudy = 0.0; for i = 1 : 3 [ b, dbdy, dbdy ] = basis_all_t3 ( t, i, xy ); u = u + node_u(i) * b; dudx = dudx + node_u(i) * dbdx; dudy = dudy + node_u(i) * dbdy; end