source: issm/trunk/src/m/model/shear2d.m@ 9734

Last change on this file since 9734 was 9734, checked in by seroussi, 14 years ago

finished mesh

File size: 678 bytes
Line 
1function [sx,sy,sxy,s]=shear2d(md)
2%SHEAR2D - computes 2d strain rate
3%
4% This routine computes the strain rate of 2d models
5%
6% Usage:
7% [sx,sy,sxy,s]=shear2d(md);
8% s=shear2d(md);
9
10[alpha beta]=GetNodalFunctionsCoeff(md.mesh.elements,md.mesh.x,md.mesh.y);
11
12summation=[1;1;1];
13sx=(md.initialization.vx(md.mesh.elements).*alpha)*summation;
14uy=(md.initialization.vx(md.mesh.elements).*beta)*summation;
15vx=(md.initialization.vy(md.mesh.elements).*alpha)*summation;
16sy=(md.initialization.vy(md.mesh.elements).*beta)*summation;
17sxy=(uy+vx)/2;
18s=sqrt(sx.^2+sy.^2+sxy.^2+sx.*sy);
19
20%if user requested only one output, it must be the norm
21if nargout==1,
22 sx=s;
23end
Note: See TracBrowser for help on using the repository browser.