[cig-commits] r5616 - in long/3D/Gale/trunk: . tools

walter at geodynamics.org walter at geodynamics.org
Thu Dec 21 16:50:03 PST 2006


Author: walter
Date: 2006-12-21 16:50:03 -0800 (Thu, 21 Dec 2006)
New Revision: 5616

Modified:
   long/3D/Gale/trunk/
   long/3D/Gale/trunk/tools/PlotGaleOutput.m
   long/3D/Gale/trunk/tools/ReadGaleOutput.m
Log:
 r1266 at earth:  boo | 2006-12-21 16:42:27 -0800
 Fix from Boris to read in StrainRate



Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
   - 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:1264
   + 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:1266

Modified: long/3D/Gale/trunk/tools/PlotGaleOutput.m
===================================================================
--- long/3D/Gale/trunk/tools/PlotGaleOutput.m	2006-12-22 00:14:21 UTC (rev 5615)
+++ long/3D/Gale/trunk/tools/PlotGaleOutput.m	2006-12-22 00:50:03 UTC (rev 5616)
@@ -65,7 +65,7 @@
     title('StrainRateInvariant');
     
     subplot(332)
-    pcolor(StrainRate.x,StrainRate.y,StrainRate.data);  
+    pcolor(StrainRate.x,StrainRate.y,StrainRate.xy);  
     hold on
     plot(mesh_x,mesh_y,MeshColor,mesh_x.',mesh_y.',MeshColor); %   FEM mesh
     if(Octave==0)
@@ -144,17 +144,15 @@
     
     figure(1), clf
     slice(StrainRateInvariant.x,StrainRateInvariant.z,StrainRateInvariant.y,StrainRateInvariant.data,[0 1],[1],[.1 ]), hold on
-    quiver3(Velocity.x(:),Velocity.z(:),Velocity.y(:),Velocity.Vx(:),Velocity.Vz(:),Velocity.Vy(:),VelocityArrowColor);       %   Velocity arrows
-    axis('equal')
-    if(Octave==0)
+    if(Octave)
+      quiver3(Velocity.x(:),Velocity.z(:),Velocity.y(:),Velocity.Vx(:),Velocity.Vz(:),Velocity.Vy(:));       %   Velocity arrows
+    else
+      quiver3(Velocity.x(:),Velocity.z(:),Velocity.y(:),Velocity.Vx(:),Velocity.Vz(:),Velocity.Vy(:),VelocityArrowColor);       %   Velocity arrows
+      axis('equal')
       box('on')
     end
     title('\epsilon_{II} and velocity (arrows)');
     if(Octave==0)
       colorbar
     end
-    
-    
-    
-
 end

Modified: long/3D/Gale/trunk/tools/ReadGaleOutput.m
===================================================================
--- long/3D/Gale/trunk/tools/ReadGaleOutput.m	2006-12-22 00:14:21 UTC (rev 5615)
+++ long/3D/Gale/trunk/tools/ReadGaleOutput.m	2006-12-22 00:50:03 UTC (rev 5616)
@@ -15,7 +15,8 @@
 
 
 % Change to output directory
-dirname = ['../output.',fname];
+dirname = ['./output.',fname];
+
 cd(dirname);
 
 % Read the input xml-file, to get the number of nodes in each direction----
@@ -125,7 +126,19 @@
     StrainRate.x                 =   ReshapeGaleData(dim,NumberNodes,data(:,2) );
     StrainRate.y                 =   ReshapeGaleData(dim,NumberNodes,data(:,3) );
     StrainRate.z                 =   ReshapeGaleData(dim,NumberNodes,data(:,4) );
-    StrainRate.data              =   ReshapeGaleData(dim,NumberNodes,data(:,5) );
+    if dim==2
+        StrainRate.xx                =   ReshapeGaleData(dim,NumberNodes,data(:,5) );
+        StrainRate.yy                =   ReshapeGaleData(dim,NumberNodes,data(:,6) );
+        StrainRate.xy                =   ReshapeGaleData(dim,NumberNodes,data(:,7) );
+    elseif dim==3
+        
+        StrainRate.xx                =   ReshapeGaleData(dim,NumberNodes,data(:,5) );
+        StrainRate.yy                =   ReshapeGaleData(dim,NumberNodes,data(:,6) );
+        StrainRate.zz                =   ReshapeGaleData(dim,NumberNodes,data(:,7) );
+        StrainRate.xy                =   ReshapeGaleData(dim,NumberNodes,data(:,8) );
+        StrainRate.xz                =   ReshapeGaleData(dim,NumberNodes,data(:,9) );
+        StrainRate.yz                =   ReshapeGaleData(dim,NumberNodes,data(:,10));
+    end
 
     % StrainRateXXField
     data                        =   load(['StrainRateXXField','.',number,'.dat']);



More information about the cig-commits mailing list