]> git.leopard-lacewing.eu Git - bacc.git/commitdiff
[src] Autoskripte können nun verschiedene Typen testen und auch dazu die mu
authortreecity <treecity@26120e32-c555-405d-b3e1-1f783fb42516>
Sat, 22 Oct 2011 21:51:50 +0000 (21:51 +0000)
committertreecity <treecity@26120e32-c555-405d-b3e1-1f783fb42516>
Sat, 22 Oct 2011 21:51:50 +0000 (21:51 +0000)
git-svn-id: https://drops.fb12.tu-berlin.de/svn/bacc/trunk@61 26120e32-c555-405d-b3e1-1f783fb42516

src/A_AnIso.m
src/A_Iso.m
src/A_stepAnIso.m
src/A_stepIso.m

index 4fc8049806cfa011c27261684cd8887f9627c50b..56483be941d6856d9ae90f135c6f1007d7ac7155 100644 (file)
@@ -7,6 +7,11 @@ A_loadMeshF(file)
 global G_Ta;
 global G_Da;
 
+if(length(mu)~=length(type)&&length(mu)~=1)
+  disp 'Error: Pleas set right type and mu parameters'
+  return
+end
+
 for i = 1:times
  if(size(G_Ta,1)>2)
   nextF = G_Ta(end,1)*4;
@@ -22,8 +27,9 @@ for i = 1:times
  A_stepAnIso(mu,type,eta,eps);
  usedTime = G_Ta(end,:)
  data = G_Da(end,:)
+ typeN = int2str(type);
   
 A_saveMesh(['anIso' int2str(type) '_' int2str(size(G_Ta,1))]);
A_saveMesh(['anIso' typeN(typeN~=' ') '_' int2str(size(G_Ta,1))]);
  
 end
 
index 2385163a4ded543ff1699986beea9d49e2604424..4d02c1a6b01d76044ec5e658c66be370d40de042 100644 (file)
@@ -7,6 +7,11 @@ A_loadMeshF(file)
 global G_Ti;
 global G_Di;
 
+if(length(mu)~=length(type)&&length(mu)~=1)
+  disp 'Error: Pleas set right type and mu parameters'
+  return
+end
+
 for i = 1:times
  if(size(G_Ti,1)>2)
   nextF = G_Ti(end,1)*4;
@@ -21,8 +26,10 @@ for i = 1:times
  A_stepIso(mu,type);
  usedTime = G_Ti(end,:)
  DiTi = G_Di(end,:)
+ typeN = int2str(type);
   
 A_saveMesh(['Iso' int2str(type) '_' int2str(size(G_Ti,1))]);
A_saveMesh(['Iso' typeN(typeN~=' ') '_' int2str(size(G_Ti,1))]);
  
 end
 
index 8286ec4833a2be6b41de0dcc8e9c3df4ce44f1b0..5001ca46960b392b41f4ad16c9155bcb9dfcbd82 100644 (file)
@@ -13,29 +13,45 @@ if (isempty(G_E) || isempty(G_C) || isempty(G_N))
   return
 end
 
+if(length(mu)~=length(type)&&length(mu)~=1)
+  disp 'Error: Pleas set right type and mu parameters'
+  return
+end
+if(length(mu)==1)
+  mu = repmat(mu,length(type),1);
+end
+
 time = zeros(1,3);
   
   tic
   [coordinates_fine,elements_fine,neigh_fine,f2s]=refineQuad(G_C,G_E,G_N,2);
   time(1) = toc;
-  tic
-  A_fine = mex_build_AU(coordinates_fine,elements_fine,mu,type);
-  time(2) = toc;
-  
-  b = sqrt(sum(quadNorm(coordinates_fine,elements_fine,'w').^2,2));
+
   
-  x_fine = A_fine\b;
   
-  xe_fine = x_fine'*A_fine*x_fine;
+  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);
 
-  ind = computeEstSlpMuTilde(x_fine,G_C,G_E,f2s);
+    dataAniso = [dataAniso type sqrt(sum(ind)) xe_fine];
+  end
+  time(2) = toc;
+  
   
   marked = mark(x_fine(f2s)',ind,eta,eps);
   
 %   clear 'coordinates_fine' 'elements_fine' 'neigh_fine' 'f2s'
   
-  dataAniso = [size(G_E,1) sqrt(sum(ind)) xe_fine];
+
   
   if(size(G_E,1)~=length(marked))
     disp 'Error: MarkierungsVektor ist fehlerhaft'
@@ -52,7 +68,7 @@ time = zeros(1,3);
  
  
   G_Ta(size(G_Ta,1)+1,1:4) = [size(G_E,1) time];
-  G_Da(size(G_Da,1)+1,1:3) = dataAniso;
+  G_Da(size(G_Da,1)+1,1:length(dataAniso)) = dataAniso;
   
   
 %   plotShape(G_C,G_E,'');
index 0eea0b897d389e297a381c5a8443ebe5587c1f94..b0f1233b77593e7aa9487d9aa058b452a2062b84 100644 (file)
@@ -11,6 +11,14 @@ if (isempty(G_E) || isempty(G_C))
   return
 end
 
+if(length(mu)~=length(type)&&length(mu)~=1)
+  disp 'Error: Pleas set right type and mu parameters'
+  return
+end
+if(length(mu)==1)
+  mu = repmat(mu,length(type),1);
+end
+
 time = zeros(1,2);
   
   tic
@@ -18,9 +26,10 @@ time = zeros(1,2);
   time(1) = toc;
   
   tic
-  A_fine = mex_build_AU(coordinates_fine,elements_fine,mu,type);
-  time(2) = toc;
-  
+  dataIso = size(G_E,1);
+  for i = 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;
@@ -29,7 +38,9 @@ time = zeros(1,2);
 
   ind = computeEstSlpMuTilde(x_fine,G_C,G_E,f2s);
   
-  dataIso = [size(G_E,1) sqrt(sum(ind)) xe_fine];
+  dataIso = [dataIso type sqrt(sum(ind)) xe_fine];
+  end
+  time(2) = toc;
   
   G_C = coordinates_fine; G_E = elements_fine; G_N = neigh_fine;
 
@@ -40,7 +51,7 @@ time = zeros(1,2);
  
  
   G_Ti(size(G_Ti,1)+1,1:3) = [size(G_E,1) time];
-  G_Di(size(G_Di,1)+1,1:3) = dataIso;
+  G_Di(size(G_Di,1)+1,1:length(dataIso)) = dataIso;
 
 
 end