From e4c9b92e95bb4994711fb864fd63d8b84039b06b Mon Sep 17 00:00:00 2001 From: Ivar Stefansson <ist050@uib.no> Date: Wed, 21 Dec 2016 18:28:51 +0100 Subject: [PATCH] Delete divideTriangulation.m --- scripts/divideTriangulation.m | 59 ----------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 scripts/divideTriangulation.m diff --git a/scripts/divideTriangulation.m b/scripts/divideTriangulation.m deleted file mode 100644 index 94384fe..0000000 --- a/scripts/divideTriangulation.m +++ /dev/null @@ -1,59 +0,0 @@ -load SNPI_Bernd_raw.mat; -% saved in importerref.m. Contains points, pressure and triangulation, -% named x, p and t respectively. - -f = t(:,4)~=0; -th = ~f; - -% last letter "t" for three, "f" for four -pt = p(th); -pf = p(f); - - -toldt = t(th, 1:3); -toldf = t(f, :); -[uniquet, intoldt, inuniquet] = unique(toldt); -[uniquef, ~, inuniquef] = unique(toldf); - -xt = x(uniquet,:); -xf = x(uniquef,:); - -% tnewt = zeros(size(toldt)); -% tnewf = zeros(size(toldf)); -%these sets of loops might perhaps be avoided by some "unique-trick". Might -%reduce run time significantly -% for i = 1:length(toldt) -% for j = 1:3 -% tnewt(i,j)=find(uniquet==toldt(i,j)); -% end -% end -tnewt = reshape(inuniquet, size(toldt)); -tnewf = reshape(inuniquef, size(toldf)); -% for i = 1:length(toldf) -% for j = 1:4 -% tnewf(i,j)=find(uniquef==toldf(i,j)); -% end -% end -%tt = triangulation(tnewt,xt); -%can't use triangulation on the quads, so connectivity list and points are -% saved seperately. -clF = tnewf; -%save('E:\Comparison paper\Mortar\SNPI_Bref', ... - % 'clF', 'xf', 'tt', 'pf', 'pt'); - - - -Xt = xt(tnewt); -yt = xt(:,2); -Yt = yt(tnewt); -Xf = xf(tnewf); -yf = xf(:,2); -Yf = yf(tnewf); -midt = [sum(Xt,2)/3, sum(Yt,2)/3]; -areat = polyarea(Xt, Yt, 2); -midf = [sum(Xf,2)/4, sum(Yf,2)/4]; -areaf = polyarea(Xf, Yf, 2); -cc = [midt;midf]; -a = [areat;areaf]; -p = [pt; pf]; -save('C:\Users\Ivar\Desktop\L2norm\SNPI_reference_values', 'cc','a','p') \ No newline at end of file -- GitLab