% BEMLAP-MAT project % Matlab/Freemat codes % Copyright 2008 Stephen Kirkup % Issued under the GNU General Public License 2007, see gpl.txt % www.kirkup.info/opensource % www.boundary-element-method.com % function [phi_D,phi_S,v_S] = interiorsquaretest_indirect % Returns the solution phi_D, the solution at the domain points, phi_S and v_S, % the solution on the boundary. The boundary is defined internally by % calling 'square' and the points are defined by calling 'points'. function [phi_D,phi_S,v_S]= interiorsquaretest_indirect [vertpts,elemvert]=square % boundary condition a(1:8)=1; a(9:16)=0; a(17:24)=1; a(25:32)=0; b(1:8)=0; b(9:16)=1; b(17:24)=0; b(25:32)=1; F(1:8)=10; F(9:16)=0; F(17:24)=20; F(25:32)=0; % interior points points=[ 0.025, 0.025; 0.025, 0.075; 0.05, 0.05; 0.075, 0.025; 0.075, 0.075]; % computer phi_D, phi at the interior points and phi_S,v_S, phi and v on the boundary [phi_D, phi_S,v_S] =libem2_indirect(5,points,32,vertpts,elemvert,a,b,F);