From: treecity Date: Thu, 17 Nov 2011 23:37:04 +0000 (+0000) Subject: [src] Iso zeichnet jetzt fehlerhafte Elemente (falls sie auftreten) X-Git-Url: https://git.leopard-lacewing.eu/?a=commitdiff_plain;h=fb843b2f966507f27f507cb563d522aaf8d2cbef;p=bacc.git [src] Iso zeichnet jetzt fehlerhafte Elemente (falls sie auftreten) [src] plotMark kann nun auch Element-Paare markieren [src] QuadAchse Fehler gefunden p2 (Bedinungen passen nicht, alternative auskommentiert, also wieder Fehlerhaft zum testen) git-svn-id: https://drops.fb12.tu-berlin.de/svn/bacc/trunk@68 26120e32-c555-405d-b3e1-1f783fb42516 --- diff --git a/src/A_stepIso.m b/src/A_stepIso.m index ad9bbe3..41ddd61 100644 --- a/src/A_stepIso.m +++ b/src/A_stepIso.m @@ -21,7 +21,6 @@ if(length(mu)==1) end time = zeros(1,2); - tic [coordinates_fine,elements_fine,neigh_fine,f2s,er]=refineQuad(G_C,G_E,G_N,2); time(1) = toc; @@ -32,7 +31,12 @@ time = zeros(1,2); dataIso = size(G_E,1); for i = 1:length(type) A_fine = mex_build_AU(coordinates_fine,elements_fine,mu(i),type(i)); - + [r c] = find(isnan(A_fine)~=isinf(A_fine)); + if(~isempty(r)) + figure(9) + plotShape(coordinates_fine,elements_fine(unique([r c]),:),'') + plotMark([r';c'],coordinates_fine,elements_fine) + end x_fine = A_fine\b; xe_fine = x_fine'*A_fine*x_fine; diff --git a/src/mex_build_AU.cpp b/src/mex_build_AU.cpp index 737851c..d3c8185 100644 --- a/src/mex_build_AU.cpp +++ b/src/mex_build_AU.cpp @@ -181,7 +181,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { } } - for (k = j; k < em; ++k) { + for (k = 0; k < em; ++k) { y0[0] = C[(int) E[k] - 1]; y0[1] = C[cm + (int) E[k] - 1]; y0[2] = C[2 * cm + (int) E[k] - 1]; @@ -270,8 +270,8 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { } A[(k * em) + j] = 1. / (4 * M_PI) * tmp; - if(k!=j) - A[(j * em) + k] = 1. / (4 * M_PI) * tmp; + // if(k!=j) +// A[(j * em) + k] = 1. / (4 * M_PI) * tmp; /* if(count++ > ((em*(em+1))/2)/10){ count = 0; cout << "#"; diff --git a/src/slpRectangle.cpp b/src/slpRectangle.cpp index cb06626..caf06c4 100644 --- a/src/slpRectangle.cpp +++ b/src/slpRectangle.cpp @@ -104,9 +104,6 @@ double G_AY2X2(double y1, double y2, double x1, double x2, double d3) { double sol = sqrt(hlp); - if (sol!=sol||fabs(sol)==numeric_limits::infinity()){ - cout << sol << endl; - } if ((x2 - y2) != 0) sol += (x2 - y2) * log(sqrt(hlp) - (x2 - y2)); @@ -115,6 +112,7 @@ double G_AY2X2(double y1, double y2, double x1, double x2, double d3) { cout << "G_AY2X2: " << sol << " isn't a Number. (" << y1 << "," << y2 << ")(" << x1 << "," << x2 << ")(" << d3 << ")" << endl; cout << (x2-y2) << "__" << sqrt(hlp) << endl; + cout << (x1-y1)*(x1-y1) << " " << hlp << endl; } return sol; } @@ -438,7 +436,7 @@ double calcParIntO2(double b, double d, double t, double v, double d1, d3 = -d3; } - if ((b * b + d * d) * eta <= d1 * d1 + d2 * d2 + d3 * d3) { + if ((b * b + d * d) * eta < d1 * d1 + d2 * d2 + d3 * d3) { return calcParIntQX1X2(b, d, t, v, d1, d2, d3); } else { return calcParIntA(b, d, t, v, d1, d2, d3); @@ -491,7 +489,7 @@ double calcParIntO3(double b, double d, double t, double v, double d1, d2 = tmp; } - if (max(b, t) * eta <= d1) { + if ((min(b, t) * eta <= d1) /*&& (min(d, v) * eta <= d2)*/ ) { return calcParIntQY1X1(b, d, t, v, d1, d2, d3); } else { return calcParIntA(b, d, t, v, d1, d2, d3); diff --git a/src/test_calcInt2.m b/src/test_calcInt2.m index e020ae3..5d9c92e 100644 --- a/src/test_calcInt2.m +++ b/src/test_calcInt2.m @@ -42,7 +42,7 @@ for I = 1:50 end figure(2) -loglog(dat(:,1),abs(dat(:,2)),dat(:,1),abs(dat(:,3)),dat(:,1),abs(dat(:,4))); +loglog(dat(:,1),abs(dat(:,2)),dat(:,1),abs(dat(:,3)),'-.',dat(:,1),abs(dat(:,4)),'--'); legend('Analytisch','Quad Element','Quad Achse','location','best'); xlabel('Elementgroesse (kürzeste Seite)'); @@ -56,7 +56,7 @@ coordinates=coo(h,diff); A_loadMesh(coordinates,elements,neigh); datA=[]; -for I = 1:3 +for I = 1:2 datA(I,:) = A_stepIso(1,[0 3 2]); % datA(I,:) = A_stepAniso(1,[0 1 3 2],1,0); I