rbmatlab 0.10.01
grid/@triagrid/llocal2local.m
00001 function lcoord = llocal2local(grid,faceinds,llcoord)
00002 %function lcoord = llocal2local(grid,faceinds,llcoord)
00003 % function performing a 1D edge-local coordinate (lcoord) to
00004 % 2D local coordinate transformation of given faces
00005 %
00006 % Parameters:
00007 %  faceinds: The face indices on which the transformation shall take
00008 %            place. '(1:3)'
00009 %  llcoord:  single real number between 0 and 1 defining the edge-local vertex
00010 %            coordinate.
00011 %
00012 % Return values:
00013 %  lcoord: matrix of size '2 x |faceinds|' holding the local coordinates.
00014 
00015 % Bernard Haasdonk 31.8.2009
00016 
00017 % for triagrid:
00018 %locs3 = 1-locs(1,:)-locs(2,:);
00019 
00020 % extend cyclically for simple index arithmetic
00021 corner_lcoord = [0,0;1,0;0,1;0,0]';
00022 lcoord = corner_lcoord(:,faceinds)*llcoord + ...
00023          corner_lcoord(:,faceinds+1)*(1-llcoord);
00024 
All Classes Namespaces Files Functions Variables