[cig-commits] r14536 - in long/3D/Gale/trunk: . tools
walter at geodynamics.org
walter at geodynamics.org
Mon Mar 30 01:12:05 PDT 2009
Author: walter
Date: 2009-03-30 01:12:05 -0700 (Mon, 30 Mar 2009)
New Revision: 14536
Modified:
long/3D/Gale/trunk/
long/3D/Gale/trunk/tools/PlotGaleOutput.m
long/3D/Gale/trunk/tools/ReadGaleOutput.m
Log:
r2628 at dante: boo | 2009-03-30 00:59:46 -0700
Update octave/matlab scripts
Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
- 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2623
+ 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2628
Modified: long/3D/Gale/trunk/tools/PlotGaleOutput.m
===================================================================
--- long/3D/Gale/trunk/tools/PlotGaleOutput.m 2009-03-30 06:09:16 UTC (rev 14535)
+++ long/3D/Gale/trunk/tools/PlotGaleOutput.m 2009-03-30 08:12:05 UTC (rev 14536)
@@ -10,7 +10,7 @@
clear, close all
-fname = '../output.template'; % directory-name
+fname = '../output'; % directory-name
step = 10 ; % timestep
% Read data
@@ -125,19 +125,6 @@
colorbar
end
title('VelocityMagnitudeField');
-
- if(Octave)
- figure
- else
- subplot(339)
- end
- plot(Yielding.x,Yielding.y,'.');
- hold on
- plot(mesh_x,mesh_y,MeshColor,mesh_x.',mesh_y.',MeshColor); % FEM mesh
- title('Particles');
- if(Octave==0)
- axis('tight')
- end
elseif (dim==3)
Modified: long/3D/Gale/trunk/tools/ReadGaleOutput.m
===================================================================
--- long/3D/Gale/trunk/tools/ReadGaleOutput.m 2009-03-30 06:09:16 UTC (rev 14535)
+++ long/3D/Gale/trunk/tools/ReadGaleOutput.m 2009-03-30 08:12:05 UTC (rev 14536)
@@ -55,11 +55,9 @@
fclose(fid);
if dim==2
- NumberElements = [nelI nelJ ];
NumberNodes = [nelI+1 nelJ+1 ];
elseif dim==3
- NumberElements = [nelI nelJ nelK ];
NumberNodes = [nelI+1 nelJ+1 nelK+1 ];
end
@@ -79,11 +77,11 @@
% Pressure (constant per element)
data = load(['PressureField','.',number,'.dat']);
- Pressure.x = ReshapeGaleData(dim,NumberElements,data(:,2) );
- Pressure.y = ReshapeGaleData(dim,NumberElements,data(:,3) );
- Pressure.data = ReshapeGaleData(dim,NumberElements,data(:,5) );
+ Pressure.x = ReshapeGaleData(dim,NumberNodes,data(:,2) );
+ Pressure.y = ReshapeGaleData(dim,NumberNodes,data(:,3) );
+ Pressure.data = ReshapeGaleData(dim,NumberNodes,data(:,5) );
if dim==3
- Pressure.z = ReshapeGaleData(dim,NumberElements,data(:,4) );
+ Pressure.z = ReshapeGaleData(dim,NumberNodes,data(:,4) );
end
% Velocity
@@ -149,13 +147,6 @@
VelocityMagnitudeField.z = ReshapeGaleData(dim,NumberNodes,data(:,4) );
VelocityMagnitudeField.data = ReshapeGaleData(dim,NumberNodes,data(:,5) );
-
- % Yielding
- data = load(['particles.0','.',number,'.txt']);
- Yielding.x = data(:,2);
- Yielding.y = data(:,3);
- Yielding.z = data(:,4);
- Yielding.data = data(:,5);
% Time_info
data = load(['timeInfo','.',number,'.dat']);
More information about the CIG-COMMITS
mailing list