UpdateGridPosition

PURPOSE ^

UPDATEGRIDPOSITION - update the position of the nodes after a time step

SYNOPSIS ^

function grids=UpdateGridPosition(md,grids,bed,thickness);

DESCRIPTION ^

UPDATEGRIDPOSITION - update the position of the nodes after a time step

   Update grid z field, using new bed and new thickness, and using
   md.numlayers of extrusion.

   Usage:
      grids=UpdateGridPosition(md,grids,bed,thickness)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function grids=UpdateGridPosition(md,grids,bed,thickness);
0002 %UPDATEGRIDPOSITION - update the position of the nodes after a time step
0003 %
0004 %   Update grid z field, using new bed and new thickness, and using
0005 %   md.numlayers of extrusion.
0006 %
0007 %   Usage:
0008 %      grids=UpdateGridPosition(md,grids,bed,thickness)
0009 
0010 count2d=[1:md.numberofgrids2d]';
0011 
0012 for i=1:md.numlayers,
0013     count=count2d+(i-1)*md.numberofgrids2d;
0014     for j=1:size(count,1),
0015         grids(count(j)).grid.z=bed(count(j))+(i-1)/(md.numlayers-1)*(thickness(count(j)));
0016     end
0017 end

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