Changeset 2479


Ignore:
Timestamp:
10/22/09 10:45:28 (15 years ago)
Author:
Mathieu Morlighem
Message:

Added time stepping in 2d

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/utils/Mesh/timesteps.m

    r2465 r2479  
    1515end
    1616
    17 areas=GetAreas(md.elements,md.x,md.y);
    18 Dx=averaging(md,sqrt(2*areas),0);
    19 Du=sqrt(vx.^2+vy.^2);
    20 maxtime=min(1/2*Dx./Du);
     17edgex=max(md.x(md.elements),[],2)-min(md.x(md.elements),[],2);
     18edgey=max(md.y(md.elements),[],2)-min(md.y(md.elements),[],2);
     19vx=max(vx(md.elements),[],2);
     20vy=max(vy(md.elements),[],2);
    2121
    22 
     22maxtime=1/2*(edgex/vx+edgey/vy);
Note: See TracChangeset for help on using the changeset viewer.