CieloVelocityExtrude

PURPOSE ^

Extrude collapsed horizontal velocities present in MacAyeal elements

SYNOPSIS ^

function u_g=CieloVelocityExtrude(md,u_g);

DESCRIPTION ^

Extrude collapsed horizontal velocities present in MacAyeal elements

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function u_g=CieloVelocityExtrude(md,u_g);
0002 %Extrude collapsed horizontal velocities present in MacAyeal elements
0003 
0004 if strcmpi(md.type,'2d'),
0005     %do nothing, we don't have a 3d mesh anyway.
0006 else
0007 
0008     %Find list of 2d grids that belong to the collapsed macayeal elements.
0009     %Numbering for these 2d grids corresponds to the initial 2d mesh.
0010     grids2d=md.proj2d_coll_grids(1:md.number_grids2d_coll);
0011     vx2d=u_g(1:6:6*md.number_grids2d_coll);
0012     vy2d=u_g(2:6:6*md.number_grids2d_coll);
0013 
0014     %Plug values for these 2d grids into the 2d mesh:
0015     vx=zeros(md.numberofgrids2d,1);
0016     vx(grids2d)=vx2d;
0017 
0018     vy=zeros(md.numberofgrids2d,1);
0019     vy(grids2d)=vy2d;
0020 
0021     %Extrude across the 3d mesh
0022     vx3d=project3d(md,vx,'node');
0023     vx3d(1:md.number_grids2d_coll)=0;
0024     vy3d=project3d(md,vy,'node');
0025     vy3d(1:md.number_grids2d_coll)=0;
0026 
0027     %For border grids between MacAyeal and Pattyn, values will double, fix that.
0028     for i=1:length(md.penalties), 
0029         vx3d(md.penalties(i).grids3d_noncollapsed)=0;
0030         vy3d(md.penalties(i).grids3d_noncollapsed)=0;
0031     end
0032 
0033     %Plug back into u_g
0034     u_g(1:6:end)=u_g(1:6:end)+vx3d;
0035     u_g(2:6:end)=u_g(2:6:end)+vy3d;
0036 
0037 end
0038 
0039 end %end function

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003