% ************************************************************** % square : Sefines a square using the straight line elements % ************************************************************** % BEM-LAP-MAT project % Matlab/Freemat codes % Copyright 2008- Stephen Kirkup % John Tyndall Nuclear Research Institute % School of Computing Engineering and Physical Sciences % University of Central Lancashire - www.uclan.ac.uk % Westlakes Campus % Samuel Lindow Building % West Lakes Science and Technology Park % Whitehaven % Cumbria CA24 3JY % United Kingdom % smkirkup@uclan.ac.uk % % This open source code can be found at % boundary-element-method.com/freematlab/square.m % % Issued under the GNU General Public License 2007, see gpl.txt % % Part of the the author's open source BEM packages. % All codes and manuals can be downloaded from % www.boundary-element-method.com % % ************************************************************** % function [vertpts,elemvert]=square % Returns a list of edges of the panels that make up the square % in vertpts and the list of elements that make up the boundary % are defined by the indices of the two vertices in elemvert. % Note that the vertices of each element in elemvert must be % defined in the clockwise direction. function [vertpts,elemvert]=square vertpts=[0.00000000000 0.00000000000; 0.00000000000 0.01250000000; 0.00000000000 0.02500000000; 0.00000000000 0.03750000000; 0.00000000000 0.05000000000; 0.00000000000 0.06250000000; 0.00000000000 0.07500000000; 0.00000000000 0.08750000000; 0.00000000000 0.10000000000; 0.01250000000 0.10000000000; 0.02500000000 0.10000000000; 0.03750000000 0.10000000000; 0.05000000000 0.10000000000; 0.06250000000 0.10000000000; 0.07500000000 0.10000000000; 0.08750000000 0.10000000000; 0.10000000000 0.10000000000; 0.10000000000 0.08750000000; 0.10000000000 0.07500000000; 0.10000000000 0.06250000000; 0.10000000000 0.05000000000; 0.10000000000 0.03750000000; 0.10000000000 0.02500000000; 0.10000000000 0.01250000000; 0.10000000000 0.00000000000; 0.08750000000 0.00000000000; 0.07500000000 0.00000000000; 0.06250000000 0.00000000000; 0.05000000000 0.00000000000; 0.03750000000 0.00000000000; 0.02500000000 0.00000000000; 0.01250000000 0.00000000000]; elemvert=[1:32; 2:33] elemvert(2,32)=1