]> git.leopard-lacewing.eu Git - bacc.git/commitdiff
[src] mex_build_AU : Progress Anzeige... leider funktioniert sie nicht
authortreecity <treecity@26120e32-c555-405d-b3e1-1f783fb42516>
Mon, 24 Oct 2011 07:02:45 +0000 (07:02 +0000)
committertreecity <treecity@26120e32-c555-405d-b3e1-1f783fb42516>
Mon, 24 Oct 2011 07:02:45 +0000 (07:02 +0000)
[src] A_step bug mit type behoben

git-svn-id: https://drops.fb12.tu-berlin.de/svn/bacc/trunk@62 26120e32-c555-405d-b3e1-1f783fb42516

src/A_Iso.m
src/A_stepAnIso.m
src/A_stepIso.m
src/mex_build_AU.cpp

index 4d02c1a6b01d76044ec5e658c66be370d40de042..e021601cf0a4108722ed0a0b939c9352e0db9769 100644 (file)
@@ -16,9 +16,8 @@ for i = 1:times
  if(size(G_Ti,1)>2)
   nextF = G_Ti(end,1)*4;
   calc = size(G_Ti,1)+(-1:0);
-  nextTime = [nextS neville2(G_Ti(calc,1)',G_Ti(calc,2)',nextF) ...
-    neville2(G_Ti(calc,1)',G_Ti(calc,3)',nextF) ...
-    neville2(G_Ti(calc,1)',G_Ti(calc,4)',nextF)]
+  nextTime = [nextF neville2(G_Ti(calc,1)',G_Ti(calc,2)',nextF) ...
+    neville2(G_Ti(calc,1)',G_Ti(calc,3)',nextF)]
   
   %overFlowTime = neville2(G_Ti(size(G_Ti,1)+(-1:0),1)',sum(G_Ti(size(G_Ti,1)+(-1:0),2:4),2)',4500)
  end
index 5001ca46960b392b41f4ad16c9155bcb9dfcbd82..beb3bd11ec1033badd20215197a596a3f1a49ded 100644 (file)
@@ -27,22 +27,20 @@ time = zeros(1,3);
   [coordinates_fine,elements_fine,neigh_fine,f2s]=refineQuad(G_C,G_E,G_N,2);
   time(1) = toc;
 
-  
-  
+  b = sqrt(sum(quadNorm(coordinates_fine,elements_fine,'w').^2,2));
+
   tic
   dataAniso = size(G_E,1);
   for i = 1:length(type)
     A_fine = mex_build_AU(coordinates_fine,elements_fine,mu(i),type(i));
 
-    b = sqrt(sum(quadNorm(coordinates_fine,elements_fine,'w').^2,2));
-
     x_fine = A_fine\b;
 
     xe_fine = x_fine'*A_fine*x_fine;
 
     ind = computeEstSlpMuTilde(x_fine,G_C,G_E,f2s);
 
-    dataAniso = [dataAniso type sqrt(sum(ind)) xe_fine];
+    dataAniso = [dataAniso type(i) sqrt(sum(ind)) xe_fine];
   end
   time(2) = toc;
   
index b0f1233b77593e7aa9487d9aa058b452a2062b84..0a7a22e4d8cd7308c15ddc1739b20992a3d1deeb 100644 (file)
@@ -25,20 +25,20 @@ time = zeros(1,2);
   [coordinates_fine,elements_fine,neigh_fine,f2s,er]=refineQuad(G_C,G_E,G_N,2);
   time(1) = toc;
   
+  b = sqrt(sum(quadNorm(coordinates_fine,elements_fine,'w').^2,2)); 
+  
   tic
   dataIso = size(G_E,1);
-  for i = type
+  for i = 1:length(type)
   A_fine = mex_build_AU(coordinates_fine,elements_fine,mu(i),type(i));
 
-  b = sqrt(sum(quadNorm(coordinates_fine,elements_fine,'w').^2,2));
-  
   x_fine = A_fine\b;
   
   xe_fine = x_fine'*A_fine*x_fine;
 
   ind = computeEstSlpMuTilde(x_fine,G_C,G_E,f2s);
   
-  dataIso = [dataIso type sqrt(sum(ind)) xe_fine];
+  dataIso = [dataIso type(i) sqrt(sum(ind)) xe_fine];
   end
   time(2) = toc;
   
index 9519a0d3eea10e7e1b145d94bf4e08d9d2b24776..a57c1972697d18c2646753a106c980ca9574d441 100644 (file)
@@ -43,6 +43,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
 \r
        int i, j, k; //Schleifenindizes\r
        double tmp; //Zwischenspeicherung der Einzelnen Werte\r
+       int count;\r
 \r
        //Sicherheitsabfragen zu Datengroessen\r
        if ((nrhs != 4))\r
@@ -71,7 +72,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
        double * E = mxGetPr(prhs[1]);\r
 \r
        double mu = *(mxGetPr(prhs[2]));\r
-       int type = *(mxGetPr(prhs[3]));\r
+       int type = (int) *(mxGetPr(prhs[3]));\r
 \r
        //Initialisieren der Hilfsvektoren\r
 \r
@@ -119,6 +120,8 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
        //LageInformationen\r
        int rx, rxa, rxb, ry, rya, ryb;\r
 \r
+       cout << "  Progress: #";\r
+       count = 0;\r
        //Ausrechnen\r
        for (j = 0; j < em; ++j) {\r
                x0[0] = C[(int) E[j] - 1];\r
@@ -169,7 +172,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
                        }\r
                }\r
 \r
-               for (k = 0; k < em; ++k) {\r
+               for (k = j; k < em; ++k) {\r
                        y0[0] = C[(int) E[k] - 1];\r
                        y0[1] = C[cm + (int) E[k] - 1];\r
                        y0[2] = C[2 * cm + (int) E[k] - 1];\r
@@ -258,10 +261,18 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
 \r
                        }\r
                        A[(k * em) + j] = 1. / (4 * M_PI) * tmp;\r
+                       if(k!=j)\r
+                               A[(j * em) + k] = 1. / (4 * M_PI) * tmp;\r
+                       if(count++ > ((em*(em+1))/2)/10){\r
+                               count = 0;\r
+                               cout << "#";\r
+                               cout.flush();\r
+                       }\r
 \r
                }\r
 \r
        }\r
+       cout << endl;\r
        //Rueckgabe (eventuell zurueck schreiben)\r
        //mxFree(x0);\r
        //mxFree(x1);\r