This is a static copy of a profile report

Home

plotDeformedProfile (1 call, 0.301 sec)
Generated 18-Mar-2011 23:31:42 using cpu time.
M-function in file /Users/Robert/Documents/Work/Cardiff/postdoc/myrepo/NURBS/isoBEM/plotDeformedProfile.m
Copy to new window for comparing multiple runs

Parents (calling functions)
No parent
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
47
figure(2); hold on
10.176 s58.6%
19
[extrapPoints(point,2)] = NURB...
4000.062 s20.7%
21
y(point) = NURBSinterpolation(...
4000.031 s10.3%
49
hold off
10.010 s3.4%
18
[extrapPoints(point,1)] = NURB...
4000.010 s3.4%
All other lines  0.010 s3.4%
Totals  0.301 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
legendcolorbarlayout>doParentResizeM-subfunction10.104 s34.5%
legendcolorbarlayout>doPixelBoundsCBM-subfunction20.031 s10.3%
NURBSinterpolationMEX-function16000.021 s6.9%
holdM-function20.010 s3.4%
newplotM-function10 s0%
scribe.legend.init>setWidthHeightM-subfunction10 s0%
linspaceM-function10 s0%
Self time (built-ins, overhead, etc.)  0.135 s44.8%
Totals  0.301 s100% 
M-Lint results
Line numberMessage
1Input argument 'infTraction' might be unused. If this is OK, consider replacing it by ~.
35The value assigned to variable 'r' might be unused.
36The value assigned to variable 'theta' might be unused.
Coverage results
[ Show coverage for parent directory ]
Total lines in function63
Non-code lines (comments, blank lines)42
Code lines (lines that can run)21
Code lines that did run21
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
   time   calls  line
1 function plotDeformedProfile( displacement, nPts, controlPts, infTraction )
2
3 % pass in a vector of control point displacements, and we can plot the
4 % deformed profile using NURBS
5
0.01 1 6 global p knotVec
7
1 8 factor=10; % for exaggerating displacements
9
1 10 newControlPts=controlPts(1:nPts,1:2)+factor*[displacement(1:2:end)' displacement(2:2:end)'];
1 11 newControlCoords=[newControlPts; newControlPts(1,:)]; % add first entry again (for plotting)
12
1 13 numPts=400;
1 14 xi=linspace(0,max(knotVec),numPts);
15
1 16 extrapPoints = zeros(numPts,2); x = zeros(numPts,1); y=zeros(numPts,1);
1 17 for point=1:numPts
0.01 400 18 [extrapPoints(point,1)] = NURBSinterpolation(xi(point), p, knotVec, newControlPts(:,1)', controlPts(:,3)');
0.06 400 19 [extrapPoints(point,2)] = NURBSinterpolation(xi(point), p, knotVec, newControlPts(:,2)', controlPts(:,3)');
400 20 x(point) = NURBSinterpolation(xi(point), p, knotVec, controlPts(:,1)', controlPts(:,3)');
0.03 400 21 y(point) = NURBSinterpolation(xi(point), p, knotVec, controlPts(:,2)', controlPts(:,3)');
400 22 end
23
24 % N=zeros(numPts,numBasisFns);
25 % for i=1:numBasisFns
26 %
27 % for point=1:numPts
28 % N(point,i)=NURBSbasis(i,p,xi(point),knotVec,controlPts(:,3));
29 % end
30 %
31 % end
32 %
33 % x=N*controlPts(:,1);
34 % y=N*controlPts(:,2);
1 35 r=sqrt(x.^2+y.^2)';
1 36 theta=atan2(y,x)';
37
38 % Bit of hardcoding here - dimensions of plate
39 % a=1;
40
41 %disp = getExactDisplacements( r, theta, infTraction );
42
43 % points=zeros(numPts,2);
44 % points(:,1)=x+disp(:,1).*factor;
45 % points(:,2)=y+disp(:,2).*factor;
46
0.18 1 47 figure(2); hold on
1 48 plot(extrapPoints(:,1), extrapPoints(:,2), 'k--')
0.01 1 49 hold off
50
51 %% Plate with hole plotting
52
53 % figure(4); hold on
54 % axis([-4.5 0.5 -0.5 4.5])
55 % axis equal
56 % plot(points(:,1), points(:,2), 'k:', extrapPoints(:,1), extrapPoints(:,2),'k-', newControlCoords(:,1), newControlCoords(:,2), 'ko')
57 % legend('exact','isoBEM', 'isoBEM control points')
58
1 59 save 'dat_files/deformedPoints.dat' newControlCoords -ASCII
1 60 save 'dat_files/deformedProfile.dat' extrapPoints -ASCII
61 %save 'dat_files/exactDeformedProfile.dat' points -ASCII
62
1 63 end

Other subfunctions in this file are not included in this listing.