1 function [XX,YY,ZZ] = coord_faces_alu3d_hexa(M)
2 %
function [XX,YY,ZZ] = coord_faces_alu3d_hexa(M)
4 %
function collecting the coordinates of the face patches
5 % the columns of XX,YY,ZZ represent the x,y,z coordinates of all 4 face points
6 % result is therefore 3 matrices of size 4 x M.num_faces
7 % the resulting matrices can directly be used in
'patch' for example.
9 % Bernard Haasdonk 16.3.2006
11 faces_el_ind = M.faces(3:6,:);
12 linvind = faces_el_ind(:)+1; % matlab/C-offset
13 XX = reshape(M.vertices(1,linvind),4,M.num_faces);
14 YY = reshape(M.vertices(2,linvind),4,M.num_faces);
15 ZZ = reshape(M.vertices(3,linvind),4,M.num_faces);
19 % TO BE ADJUSTED TO NEW SYNTAX