-
Notifications
You must be signed in to change notification settings - Fork 4
/
comparisonReport.html
133 lines (102 loc) · 42.5 KB
/
comparisonReport.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<head>
<BASE href="file:///private/var/folders/9w/f1vm5w9x7dj14z_cd9g892m17jr7fh/T/matlab_comparison_report_4681302720157967308.html" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Comparison Tool - /Users/...sktop/ModuleFA/top88.m vs. /Users/...eFA/top88_3ptBENDING.m</title><style type="text/css">
pre {
display:inline-block;
}
.diffnomatch {
background: #e5d5e8;
display: inline-block;
}
.right {
background: #dbf2fc;
display: inline-block;
}
.left {
background: #f3e9d1;
display: inline-block;
}
.diffsoft {
color: #888;
}
.diffskip {
color: #888;
background: #e0e0e0;
display: inline-block;
}
.bold {
font-weight:bold;
}
.merged {
background-color: #eaeaea;
display: inline-block;
}
</style></head><body><div id="allContent"><table cellpadding="0" cellspacing="0" border="0"><tbody><tr>
<td></td><td><a id="leftFileLink" class="bold">top88.m</a></td>
<td><a id="rightFileLink" class="bold">top88_3ptBENDING.m</a></td>
</tr>
<tr>
<td></td><td>/Users/j.morlier/Desktop/ModuleFA/top88.m</td><td>/Users/j.morlier/Desktop/ModuleFA/top88_3ptBENDING.m</td>
</tr>
<tr>
<td></td><td>Fri May 03 10:38:48 CEST 2019</td><td>Fri May 03 09:59:31 CEST 2019</td>
</tr>
<tr>
<td><pre> </pre></td>
<td><pre> </pre></td>
<td><pre> </pre></td>
</tr></tbody></table>
<div>9 differences found. Use the toolstrip buttons to navigate to them.</div><div id="diffstart">
<br><pre><div id="ignorediv"><a id="ignorelink"></a></div>
<span class="nodiff" data-left-line="1" data-right-line="1"><a> 1</a> %%%% AN 88 LINE TOPOLOGY OPTIMIZATION CODE Nov, 2010 %%%% . %%%% AN 88 LINE TOPOLOGY OPTIMIZATION CODE Nov, 2010 %%%% <span><a> 1</a></span></span>
<div id="diff0" onclick="select('diff0')"><span class="diffLine" data-left-line="2" data-right-line="2"><a> 2</a> <span class="diffnomatch"><span style="background: #be96c6;">function</span> <span style="background: #be96c6;">x=top88</span>(<span style="background: #be96c6;">nelx</span>,<span style="background: #be96c6;">nely</span>,<span style="background: #be96c6;">volfrac</span>,<span style="background: #be96c6;">penal</span>,<span style="background: #be96c6;">rmin</span>,<span style="background: #be96c6;">ft</span>) x <span style="background: #be96c6;">%example</span> <span style="background: #be96c6;">top88_joseph</span>(<span style="background: #be96c6;">140</span>,<span style="background: #be96c6;"> 50</span>,<span style="background: #be96c6;"> 0.3</span>,<span style="background: #be96c6;"> 3</span>,<span style="background: #be96c6;"> 2</span>,<span style="background: #be96c6;"> 2</span>) </span> <span><a> 2</a></span></span>
<span class="diffLine" data-left-line="2" data-right-line="3"><span class="diffsoft"> -</span><span class="diffold"> </span><span class="diffnew right"> > function x=top88_ptBENDING(nelx,nely,volfrac,penal,rmin,ft) </span> <span><a> 3</a></span></span>
<span class="diffLine" data-left-line="2" data-right-line="4"><span class="diffsoft"> -</span><span class="diffold"> </span><span class="diffnew right"> > close all </span> <span><a> 4</a></span></span>
</div><span class="nodiff" data-left-line="3" data-right-line="5"><a> 3</a> %% MATERIAL PROPERTIES . %% MATERIAL PROPERTIES <span><a> 5</a></span></span>
<div id="diff1" onclick="select('diff1')"><span class="diffLine" data-left-line="4" data-right-line="6"><a> 4</a> <span class="diffnomatch">E0 = <span style="background: #be96c6;">1</span>; x E0 = <span style="background: #be96c6;">210e3</span>; </span> <span><a> 6</a></span></span>
</div><span class="nodiff" data-left-line="5" data-right-line="7"><a> 5</a> Emin = 1e-9; . Emin = 1e-9; <span><a> 7</a></span></span>
<span class="nodiff" data-left-line="6" data-right-line="8"><a> 6</a> nu = 0.3; . nu = 0.3; <span><a> 8</a></span></span>
<div id="diff2" onclick="select('diff2')"><span class="diffLine" data-left-line="6" data-right-line="9"><span class="diffsoft"> -</span><span class="diffold"> </span><span class="diffnew right"> > thickness=10; </span> <span><a> 9</a></span></span>
<span class="diffLine" data-left-line="6" data-right-line="10"><span class="diffsoft"> -</span><span class="diffold"> </span><span class="diffnew right"> > Force_amplitude=54e3; </span> <span><a> 10</a></span></span>
</div><span class="nodiff" data-left-line="7" data-right-line="11"><a> 7</a> %% PREPARE FINITE ELEMENT ANALYSIS . %% PREPARE FINITE ELEMENT ANALYSIS <span><a> 11</a></span></span>
<span class="nodiff" data-left-line="8" data-right-line="12"><a> 8</a> A11 = [12 3 -6 -3; 3 12 3 0; -6 3 12 -3; -3 0 -3 12]; . A11 = [12 3 -6 -3; 3 12 3 0; -6 3 12 -3; -3 0 -3 12]; <span><a> 12</a></span></span>
<span class="nodiff" data-left-line="9" data-right-line="13"><a> 9</a> A12 = [-6 -3 0 3; -3 -6 -3 -6; 0 -3 -6 3; 3 -6 3 -6]; . A12 = [-6 -3 0 3; -3 -6 -3 -6; 0 -3 -6 3; 3 -6 3 -6]; <span><a> 13</a></span></span>
<span class="nodiff" data-left-line="10" data-right-line="14"><a> 10</a> B11 = [-4 3 -2 9; 3 -4 -9 4; -2 -9 -4 -3; 9 4 -3 -4]; . B11 = [-4 3 -2 9; 3 -4 -9 4; -2 -9 -4 -3; 9 4 -3 -4]; <span><a> 14</a></span></span>
<span class="nodiff" data-left-line="11" data-right-line="15"><a> 11</a> B12 = [ 2 -3 4 -9; -3 2 9 -2; 4 9 2 3; -9 -2 3 2]; . B12 = [ 2 -3 4 -9; -3 2 9 -2; 4 9 2 3; -9 -2 3 2]; <span><a> 15</a></span></span>
<div id="diff3" onclick="select('diff3')"><span class="diffLine" data-left-line="12" data-right-line="16"><a> 12</a> <span class="diffnomatch">KE = 1/(1-nu^2)/24*([A11 A12;A12' A11]+nu*[B11 B12;B12' B11]); x KE = <span style="background: #be96c6;">thickness*</span>1/(1-nu^2)/24*([A11 A12;A12' A11]+nu*[B11 B12;B12' B11]); </span> <span><a> 16</a></span></span>
</div><span class="nodiff" data-left-line="13" data-right-line="17"><a> 13</a> nodenrs = reshape(1:(1+nelx)*(1+nely),1+nely,1+nelx); . nodenrs = reshape(1:(1+nelx)*(1+nely),1+nely,1+nelx); <span><a> 17</a></span></span>
<span class="nodiff" data-left-line="14" data-right-line="18"><a> 14</a> edofVec = reshape(2*nodenrs(1:end-1,1:end-1)+1,nelx*nely,1); . edofVec = reshape(2*nodenrs(1:end-1,1:end-1)+1,nelx*nely,1); <span><a> 18</a></span></span>
<span class="nodiff" data-left-line="15" data-right-line="19"><a> 15</a> edofMat = repmat(edofVec,1,8)+repmat([0 1 2*nely+[2 3 0 1] -2 -1],nelx*nely,1); . edofMat = repmat(edofVec,1,8)+repmat([0 1 2*nely+[2 3 0 1] -2 -1],nelx*nely,1); <span><a> 19</a></span></span>
<span class="nodiff" data-left-line="16" data-right-line="20"><a> 16</a> iK = reshape(kron(edofMat,ones(8,1))',64*nelx*nely,1); . iK = reshape(kron(edofMat,ones(8,1))',64*nelx*nely,1); <span><a> 20</a></span></span>
<span class="nodiff" data-left-line="17" data-right-line="21"><a> 17</a> jK = reshape(kron(edofMat,ones(1,8))',64*nelx*nely,1); . jK = reshape(kron(edofMat,ones(1,8))',64*nelx*nely,1); <span><a> 21</a></span></span>
<span class="nodiff" data-left-line="18" data-right-line="22"><a> 18</a> % DEFINE LOADS AND SUPPORTS (HALF MBB-BEAM) . % DEFINE LOADS AND SUPPORTS (HALF MBB-BEAM) <span><a> 22</a></span></span>
<div id="diff4" onclick="select('diff4')"><span class="diffLine" data-left-line="19" data-right-line="23"><a> 19</a> <span class="diffnomatch">F = sparse(2,1,-1,2*(nely+1)*(nelx+1),1); x F = <span style="background: #be96c6;">Force_amplitude*</span>sparse(2,1,-1,2*(nely+1)*(nelx+1),1); </span> <span><a> 23</a></span></span>
</div><span class="nodiff" data-left-line="20" data-right-line="24"><a> 20</a> U = zeros(2*(nely+1)*(nelx+1),1); . U = zeros(2*(nely+1)*(nelx+1),1); <span><a> 24</a></span></span>
<div id="diff5" onclick="select('diff5')"><span class="diffLine" data-left-line="21" data-right-line="25"><a> 21</a> <span class="diffnomatch">fixeddofs = union([1:2:2*(nely+1)],[<span style="background: #be96c6;">2*</span>(nelx+<span style="background: #be96c6;">1</span>)*(nely+1)]); x fixeddofs = union([1:2:2*(nely+1)],[(nelx+<span style="background: #be96c6;">2</span>)*(nely+1)]); </span> <span><a> 25</a></span></span>
</div><span class="nodiff" data-left-line="22" data-right-line="26"><a> 22</a> alldofs = [1:2*(nely+1)*(nelx+1)]; . alldofs = [1:2*(nely+1)*(nelx+1)]; <span><a> 26</a></span></span>
<span class="nodiff" data-left-line="23" data-right-line="27"><a> 23</a> freedofs = setdiff(alldofs,fixeddofs); . freedofs = setdiff(alldofs,fixeddofs); <span><a> 27</a></span></span>
<span class="nodiff" data-left-line="24" data-right-line="28"><a> 24</a> %% PREPARE FILTER . %% PREPARE FILTER <span><a> 28</a></span></span>
<span class="diffskip">[58 unmodified lines hidden]</span>
<span class="nodiff" data-left-line="83" data-right-line="87"><a> 83</a> %% PRINT RESULTS . %% PRINT RESULTS <span><a> 87</a></span></span>
<span class="nodiff" data-left-line="84" data-right-line="88"><a> 84</a> fprintf(' It.:%5i Obj.:%11.4f Vol.:%7.3f ch.:%7.3f\n',loop,c, ... . fprintf(' It.:%5i Obj.:%11.4f Vol.:%7.3f ch.:%7.3f\n',loop,c, ... <span><a> 88</a></span></span>
<span class="nodiff" data-left-line="85" data-right-line="89"><a> 85</a> mean(xPhys(:)),change); . mean(xPhys(:)),change); <span><a> 89</a></span></span>
<div id="diff6" onclick="select('diff6')"><span class="diffLine" data-left-line="85" data-right-line="90"><span class="diffsoft"> -</span><span class="diffold"> </span><span class="diffnew right"> > figure(2) </span> <span><a> 90</a></span></span>
<span class="diffLine" data-left-line="85" data-right-line="91"><span class="diffsoft"> -</span><span class="diffold"> </span><span class="diffnew right"> > hold on </span> <span><a> 91</a></span></span>
<span class="diffLine" data-left-line="85" data-right-line="92"><span class="diffsoft"> -</span><span class="diffold"> </span><span class="diffnew right"> > plot(loop,c,'bo','MarkerFaceColor','b') </span> <span><a> 92</a></span></span>
<span class="diffLine" data-left-line="85" data-right-line="93"><span class="diffsoft"> -</span><span class="diffold"> </span><span class="diffnew right"> > plot(loop,mean(xPhys(:))*100,'ro','MarkerFaceColor','r') </span> <span><a> 93</a></span></span>
<span class="diffLine" data-left-line="85" data-right-line="94"><span class="diffsoft"> -</span><span class="diffold"> </span><span class="diffnew right"> > % plot(outeriter,(1+GKSl)*VMl,'ko','MarkerFaceColor','k') </span> <span><a> 94</a></span></span>
<span class="diffLine" data-left-line="85" data-right-line="95"><span class="diffsoft"> -</span><span class="diffold"> </span><span class="diffnew right"> > title(['Convergence volfrac = ',num2str(mean(xPhys(:))*100),', Compliance =',num</span> <span><a> 95</a></span></span>
<span class="diffLine" data-left-line="85" data-right-line="96"><span class="diffsoft"> -</span><span class="diffold"> </span><span class="diffnew right"> > grid on </span> <span><a> 96</a></span></span>
<span class="diffLine" data-left-line="85" data-right-line="97"><span class="diffsoft"> -</span><span class="diffold"> </span><span class="diffnew right"> > legend('Compliance','Volume Fraction %') </span> <span><a> 97</a></span></span>
<span class="diffLine" data-left-line="85" data-right-line="98"><span class="diffsoft"> -</span><span class="diffold"> </span><span class="diffnew right"> > xlabel('iter') </span> <span><a> 98</a></span></span>
</div><span class="nodiff" data-left-line="86" data-right-line="99"><a> 86</a> %% PLOT DENSITIES . %% PLOT DENSITIES <span><a> 99</a></span></span>
<div id="diff7" onclick="select('diff7')"><span class="diffLine" data-left-line="86" data-right-line="100"><span class="diffsoft"> -</span><span class="diffold"> </span><span class="diffnew right"> > figure(1) </span> <span><a>100</a></span></span>
</div><span class="nodiff" data-left-line="87" data-right-line="101"><a> 87</a> colormap(gray); imagesc(1-xPhys); caxis([0 1]); axis equal; axis off; drawnow; . colormap(gray); imagesc(1-xPhys); caxis([0 1]); axis equal; axis off; drawnow; <span><a>101</a></span></span>
<div id="diff8" onclick="select('diff8')"><span class="diffLine" data-left-line="87" data-right-line="102"><span class="diffsoft"> -</span><span class="diffold"> </span><span class="diffnew right"> > print(['DZ_it',num2str(loop,'%3d')],'-dpng') </span> <span><a>102</a></span></span>
</div><span class="nodiff" data-left-line="88" data-right-line="103"><a> 88</a> end . end <span><a>103</a></span></span>
<span class="nodiff" data-left-line="89" data-right-line="104"><a> 89</a> % . % <span><a>104</a></span></span>
<span class="nodiff" data-left-line="90" data-right-line="105"><a> 90</a> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% . %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% <span><a>105</a></span></span>
<span class="diffskip">[26 unmodified lines hidden]</span>
</pre></div></div><div id="bottom"><p>Number of matching lines: 111</p><p>Number of unmatched lines in left file: 5</p>
<p>Number of unmatched lines in right file: 20</p>
</div></body>