This is a static copy of a profile reportHome
getExactStressTensor (240 calls, 0.030 sec)
Generated 28-Feb-2011 19:13:52 using cpu time.
M-function in file /Users/Robert/Documents/Work/Cardiff/postdoc/myrepo/NURBS/isoBEM/getExactStressTensor.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
28 | end | 240 | 0.010 s | 33.3% |  |
16 | polarMat=[sigma_rr sigma_rt; s... | 240 | 0.010 s | 33.3% |  |
19 | stressTensor=transMat'*polarMa... | 240 | 0 s | 0% |  |
17 | transMat=[cos(theta) sin(theta... | 240 | 0 s | 0% |  |
13 | sigma_tt = traction/2 * ( 1 + ... | 240 | 0 s | 0% |  |
All other lines | | | 0.010 s | 33.3% |  |
Totals | | | 0.030 s | 100% | |
Children (called functions)
No childrenM-Lint results
No M-Lint messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 28 |
Non-code lines (comments, blank lines) | 18 |
Code lines (lines that can run) | 10 |
Code lines that did run | 10 |
Code lines that did not run | 0 |
Coverage (did run/can run) | 100.00 % |
Function listing
time calls line
1 function [ stressTensor ] = getExactStressTensor( traction, coords )
2 % Get the stress tensor in cartesian coordinates for the exact solution of
3 % a hole in an infinite plate subject to a traction at infinity
4
5 % We assume that the origin of the problem is that the centre of the hole
240 6 r=norm(coords);
240 7 theta=atan2(coords(2),coords(1));
8
240 9 a=1;
240 10 sigma_rr = traction/2 * ( 1 - (a^2)/(r^2) ) + traction / 2 * ( 1 - 4 * (a^2)/(r^2) ...
11 + 3 * (a^4)/(r^4) ) * cos(2*theta);
240 12 sigma_rt = -traction/2 * ( 1 + 2 * (a^2)/(r^2) - 3 * (a^4)/(r^4) ) * sin(2*theta);
240 13 sigma_tt = traction/2 * ( 1 + (a^2)/(r^2) ) - traction/2 * ( 1 + 3 * (a^4)/(r^4) ) ...
14 * cos(2*theta);
15
< 0.01 240 16 polarMat=[sigma_rr sigma_rt; sigma_rt sigma_tt];
240 17 transMat=[cos(theta) sin(theta); -sin(theta) cos(theta)];
18
240 19 stressTensor=transMat'*polarMat*transMat;
20 % tranMat=[ cos(theta)^2 sin(theta)^2 2*sin(theta)*cos(theta);
21 % sin(theta)^2 cos(theta)^2 -2*sin(theta)*cos(theta);
22 % -sin(theta)*cos(theta) sin(theta)*cos(theta) cos(theta)^2 - sin(theta)^2];
23 % cartVec=tranMat*polarVec;
24
25 % stressTensor=[cartVec(1) cartVec(3);
26 % cartVec(3) cartVec(2)];
27
< 0.01 240 28 end
Other subfunctions in this file are not included in this listing.