From: treecity Date: Thu, 26 Jan 2012 13:53:09 +0000 (+0000) Subject: [src] mark - AnIso Fehlerhafte markierung behoben X-Git-Url: https://git.leopard-lacewing.eu/?a=commitdiff_plain;h=1e036ab584b7909f74f293a2383962a92fad0e7c;p=bacc.git [src] mark - AnIso Fehlerhafte markierung behoben [src] unnötige Ausgaben entfernt git-svn-id: https://drops.fb12.tu-berlin.de/svn/bacc/trunk@80 26120e32-c555-405d-b3e1-1f783fb42516 --- diff --git a/src/A_plots.m b/src/A_plots.m index deecfe7..8d15a19 100644 --- a/src/A_plots.m +++ b/src/A_plots.m @@ -56,14 +56,15 @@ end if step<1 disp ('Error: No Data to show.') else - - sol = neville2(1./X(round(1):12,12)',G_D(round(1):12,12)',0) + G_D + sol = neville2(1./X(round(1):end,3)',G_D(round(1):end,3)',0); + sol = 8.28466; figure(4) loglog(X(:,[2+(0:step-1)*3]),G_D(:,[2+(0:step-1)*3]),'--o') hold on loglog(X(:,1),[20*X(:,1).^(-1/2),6*X(:,1).^(-1/4),5*X(:,1).^(-3/4)],'-.') -loglog(X(:,[3+(0:step-1)*3]), sqrt(sol -G_D(:,3+(0:step-1)*3))*G_D(1,2)/sqrt(sol-G_D(1,3)),'-*') +loglog(X(:,[3+(0:step-1)*3]), sqrt(abs(sol -G_D(:,3+(0:step-1)*3)))*G_D(1,2)/sqrt(abs(sol-G_D(1,3))),'-*') hold off title('Fehler') @@ -71,7 +72,7 @@ xlabel('Elemente'); ylabel('Schaetzer'); legend({leg2{:}... 'N^{-1/2}' 'N^{-1/4}' 'N^{-3/4}'... - leg3{:}} ,'location','eastoutside','box', 'off'); + leg3{:}} ,'location','southwest','box', 'off'); print('-r600','-depsc',[printt '_error.eps']) diff --git a/src/A_step.m b/src/A_step.m index 78cee0e..24d972d 100644 --- a/src/A_step.m +++ b/src/A_step.m @@ -41,9 +41,7 @@ time = zeros(1,3); xe_fine = x_fine'*A_fine*x_fine; - ind = computeEstSlpMuTilde(x_fine,G_C,G_E,f2s) - length(ind) - size(elements_fine,1) + ind = computeEstSlpMuTilde(x_fine,G_C,G_E,f2s); data = [data type(i) sqrt(sum(ind)) xe_fine]; end @@ -61,7 +59,7 @@ time = zeros(1,3); title('Elemente mit Fehlerschaetzer') colorbar view(2) -% plotMark(find(marked>1),G_C,G_E); + plotMark(find(marked>1),G_C,G_E); % clear 'coordinates_fine' 'elements_fine' 'neigh_fine' 'f2s' diff --git a/src/computeEstSlpMuTilde.m b/src/computeEstSlpMuTilde.m index de2e61f..78e40ce 100644 --- a/src/computeEstSlpMuTilde.m +++ b/src/computeEstSlpMuTilde.m @@ -14,7 +14,7 @@ end tmp = abs([sum(coo(ele(:,2),:)-coo(ele(:,1),:),2)... sum(coo(ele(:,4),:)-coo(ele(:,1),:),2)]); hmin = min(tmp,[],2); -hmax = max(tmp,[],2); +% hmax = max(tmp,[],2); % len = min(abs([sum(coo(ele(:,2),:)-coo(ele(:,1),:),2)... % sum(coo(ele(:,4),:)-coo(ele(:,1),:),2)]),[],2); diff --git a/src/mark.m b/src/mark.m index 61d9823..f2c704b 100644 --- a/src/mark.m +++ b/src/mark.m @@ -27,7 +27,7 @@ if(theta <1) ell = find(sum_ind >= sum_ind(end) * theta,1); %Symertrisieren - ell = ell + find(abs(( sum_ind(ell)-sum_ind(ell:end)))/sum_ind(ell)>10^-2,1); +% ell = ell + find(abs(( sum_ind(ell)-sum_ind(ell:end)))/sum_ind(ell)>10^-2,1); t1(idx(ell+1:end)) = 1; % Nicht verfeinert end @@ -36,9 +36,9 @@ end %% Wie muss verfeinert werden if(eps > 0) % Horizontal oder Vertikal t3 = (eta*abs(Ct(3,:)) >= sqrt(Ct(2,:).^2+Ct(4,:).^2)); - REF(t3) = 3; + REF(t3-t1==1) = 3; t4 = (eta*abs(Ct(4,:)) >= sqrt(Ct(2,:).^2+Ct(3,:).^2)); - REF(t4) = 4; + REF(t4-t1==1) = 4; end REF(~(t4+t3+t1)) = 2; % Rest wird Horizontal UND Vertikal geteilt diff --git a/src/plotShape.m b/src/plotShape.m index a312b65..d9fc2e5 100644 --- a/src/plotShape.m +++ b/src/plotShape.m @@ -27,9 +27,9 @@ elseif(optargin>=1) if(optargin==2 && length(varargin{2})==size(elements,1)) e = 2; color = reshape(varargin{2},length(varargin{2}),1); - maxc = max(color); - minc = min(color); - color = (color - minc)/maxc; +% maxc = max(color); +% minc = min(color); +% color = (color - minc)/maxc; % col = [color ones(length(color),2) ] else