Changeset 17559
- Timestamp:
- 03/27/14 08:53:53 (11 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 41 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/model.m
r17558 r17559 113 113 %2014 March 26th 114 114 if isa(md.mesh,'mesh'), 115 if( md.mesh.dimension==2),115 if(strcmp(meshtype(md.mesh),'2Dhorizontal')), 116 116 md.mesh=mesh2d(md.mesh); 117 117 else -
issm/trunk-jpl/src/m/classes/modellist.m
r15987 r17559 32 32 33 33 %2D or 3D? 34 if md.mesh.dimension==3,34 if strcmp(meshtype(md.mesh),'3D'), 35 35 numberofelements=md.mesh.numberofelements2d; %this will be forgotten when we get out. 36 36 flags=project2d(md,flags,1); … … 84 84 for i=1:size(flag_list,1), 85 85 disp([' ' num2str(i) '/' num2str(size(flag_list,1))]); 86 if md.mesh.dimension==3,86 if strcmp(meshtype(md.mesh),'3D'), 87 87 flags2d=flag_list{i}; 88 88 realflags=project3d(md,flags2d,'element'); -
issm/trunk-jpl/src/m/classes/rifts.m
r16765 r17559 28 28 end 29 29 if numrifts, 30 if ~( md.mesh.dimension==2),30 if ~(strcmp(meshtype(md.mesh),'2Dhorizontal')), 31 31 md = checkmessage(md,['models with rifts are only supported in 2d for now!']); 32 32 end -
issm/trunk-jpl/src/m/classes/rifts.py
r17497 r17559 39 39 40 40 if numrifts: 41 if not m d.mesh.dimension==2:41 if not m.strcmp(md.mesh.meshtype(),'2Dhorizontal'): 42 42 md.checkmessage("models with rifts are only supported in 2d for now!") 43 43 if not isinstance(self.riftstruct,list): -
issm/trunk-jpl/src/m/classes/spheremesh.m
r16764 r17559 13 13 phi = NaN 14 14 elements = NaN 15 dimension = 0;16 15 numberoflayers = 0; 17 16 numberofelements = 0; … … 49 48 md = checkfield(md,'fieldname','spheremesh.phi','NaN',1,'size',[md.spheremesh.numberofvertices 1]); 50 49 md = checkfield(md,'fieldname','spheremesh.elements','NaN',1,'>',0,'values',1:md.spheremesh.numberofvertices); 51 if(md.spheremesh.dimension==2), 52 md = checkfield(md,'fieldname','spheremesh.elements','size',[md.spheremesh.numberofelements 3]); 53 else 54 md = checkfield(md,'fieldname','spheremesh.elements','size',[md.spheremesh.numberofelements 6]); 55 end 50 md = checkfield(md,'fieldname','spheremesh.elements','size',[md.spheremesh.numberofelements 3]); 56 51 if any(~ismember(1:md.spheremesh.numberofvertices,sort(unique(md.spheremesh.elements(:))))); 57 52 md = checkmessage(md,'orphan nodes have been found. Check the spheremesh outline'); 58 53 end 59 md = checkfield(md,'fieldname','spheremesh.dimension','values',[2 3]);60 54 md = checkfield(md,'fieldname','spheremesh.numberoflayers','>=',0); 61 55 md = checkfield(md,'fieldname','spheremesh.numberofelements','>',0); 62 56 md = checkfield(md,'fieldname','spheremesh.numberofvertices','>',0); 63 if (md.spheremesh.dimension==2),64 md = checkfield(md,'fieldname','spheremesh.average_vertex_connectivity','>=',9,'message','''spheremesh.average_vertex_connectivity'' should be at least 9 in 2d');65 else66 md = checkfield(md,'fieldname','spheremesh.average_vertex_connectivity','>=',24,'message','''spheremesh.average_vertex_connectivity'' should be at least 24 in 3d');67 end68 57 md = checkfield(md,'fieldname','spheremesh.elementconnectivity','size',[md.spheremesh.numberofelements 3],'NaN',1); 69 70 %Solution specific checks71 switch(solution),72 case MasstransportSolutionEnum(),73 if md.masstransport.stabilization==3,74 md = checkfield(md,'fieldname','spheremesh.dimension','values',2,'message','Discontinuous Galerkin only supported for 2d spheremeshes');75 end76 case TransientSolutionEnum(),77 if md.transient.ismasstransport & md.masstransport.stabilization==3,78 md = checkfield(md,'fieldname','spheremesh.dimension','values',2,'message','Discontinuous Galerkin only supported for 2d spheremeshes');79 end80 case ThermalSolutionEnum(),81 md = checkfield(md,'fieldname','spheremesh.dimension','values',3,'message','thermal solution only supported on 3d spheremeshes');82 end83 58 end % }}} 84 59 function disp(obj) % {{{ … … 97 72 98 73 disp(sprintf('\n Properties:')); 99 fielddisplay(obj,'dimension','spheremesh dimension (2d or 3d)');100 74 fielddisplay(obj,'numberoflayers','number of extrusion layers'); 101 75 … … 113 87 WriteData(fid,'object',obj,'fieldname','phi','format','DoubleMat','mattype',1); 114 88 WriteData(fid,'object',obj,'fieldname','elements','format','DoubleMat','mattype',2); 115 WriteData(fid,'object',obj,'fieldname','dimension','format','Integer');116 89 WriteData(fid,'object',obj,'fieldname','numberoflayers','format','Integer'); 117 90 WriteData(fid,'object',obj,'fieldname','numberofelements','format','Integer'); -
issm/trunk-jpl/src/m/classes/thermal.m
r16764 r17559 64 64 md = checkfield(md,'fieldname','thermal.stabilization','numel',[1],'values',[0 1 2]); 65 65 md = checkfield(md,'fieldname','thermal.spctemperature','forcing',1); 66 if (ismember(EnthalpyAnalysisEnum(),analyses) & md.thermal.isenthalpy & md.mesh.dimension==3),66 if (ismember(EnthalpyAnalysisEnum(),analyses) & md.thermal.isenthalpy & strcmp(meshtype(md.mesh),'3D')), 67 67 pos=find(md.thermal.spctemperature(1:md.mesh.numberofvertices,:)~=NaN); 68 68 replicate=repmat(md.geometry.surface-md.mesh.z,1,size(md.thermal.spctemperature,2)); -
issm/trunk-jpl/src/m/classes/thermal.py
r17497 r17559 81 81 md = checkfield(md,'fieldname','thermal.stabilization','numel',[1],'values',[0,1,2]) 82 82 md = checkfield(md,'fieldname','thermal.spctemperature','forcing',1) 83 if EnthalpyAnalysisEnum() in analyses and md.thermal.isenthalpy and m d.mesh.dimension==3:83 if EnthalpyAnalysisEnum() in analyses and md.thermal.isenthalpy and m.strcmp(md.mesh.meshtype(),'3D'): 84 84 pos=numpy.nonzero(numpy.logical_not(numpy.isnan(md.thermal.spctemperature[0:md.mesh.numberofvertices]))) 85 85 replicate=numpy.tile(md.geometry.surface-md.mesh.z,(1,numpy.size(md.thermal.spctemperature,axis=1))) -
issm/trunk-jpl/src/m/contrib/ecco/PropagateFlagsUntilDistance.m
r13008 r17559 10 10 11 11 %make 3d work in 2d: 12 if md.mesh.dimension==3,12 if strcmp(meshtype(md.mesh),'3D'), 13 13 md.mesh.x=md.mesh.x2d; 14 14 md.mesh.y=md.mesh.y2d; -
issm/trunk-jpl/src/m/contrib/hack/tres.m
r15771 r17559 9 9 10 10 if strcmpi(string,'stressbalance'), 11 if md.mesh.dimension==2,11 if strcmp(meshtype(md.mesh),'2Dhorizontal'), 12 12 md.initialization.vx=md.results.StressbalanceSolution.Vx; 13 13 md.initialization.vy=md.results.StressbalanceSolution.Vy; -
issm/trunk-jpl/src/m/contrib/massbalance/divergence.m
r13007 r17559 5 5 % div=divergence(md,a,b) 6 6 7 if ( md.mesh.dimension==2),7 if (strcmp(meshtype(md.mesh),'2Dhorizontal')), 8 8 numberofelements=md.mesh.numberofelements; 9 9 numberofnodes=md.mesh.numberofvertices; -
issm/trunk-jpl/src/m/contrib/massbalance/outflux.m
r15039 r17559 16 16 17 17 if nargin==1, 18 if md.mesh.dimension==3,18 if strcmp(meshtype(md.mesh),'3D'), 19 19 vxa=DepthAverage(md,md.initialization.vx); 20 20 vya=DepthAverage(md,md.initialization.vy); … … 28 28 else 29 29 step=varargin{1}; 30 if md.mesh.dimension==3,30 if strcmp(meshtype(md.mesh),'3D'), 31 31 vxa=DepthAverage(md,md.results.TransientSolution(step).Vx); 32 32 vya=DepthAverage(md,md.results.TransientSolution(step).Vy); -
issm/trunk-jpl/src/m/exp/contourlevelzero.m
r16517 r17559 10 10 11 11 %process data 12 if md.mesh.dimension==3,12 if strcmp(meshtype(md.mesh),'3D'), 13 13 error('contourlevelzero error message: routine not supported for 3d meshes, project on a layer'); 14 14 end -
issm/trunk-jpl/src/m/geometry/slope.m
r14800 r17559 7 7 8 8 %load some variables (it is much faster if the variab;es are loaded from md once for all) 9 if ( md.mesh.dimension==2),9 if (strcmp(meshtype(md.mesh),'2Dhorizontal')), 10 10 numberofelements=md.mesh.numberofelements; 11 11 numberofnodes=md.mesh.numberofvertices; … … 30 30 s=sqrt(sx.^2+sy.^2); 31 31 32 if md.mesh.dimension==3,32 if strcmp(meshtype(md.mesh),'3D'), 33 33 sx=project3d(md,'vector',sx,'type','element'); 34 34 sy=project3d(md,'vector',sy,'type','element'); -
issm/trunk-jpl/src/m/geometry/slope.py
r16105 r17559 12 12 13 13 #load some variables (it is much faster if the variables are loaded from md once for all) 14 if m d.mesh.dimension==2:14 if m.strcmp(md.mesh.meshtype(),'2Dhorizontal'): 15 15 numberofelements=md.mesh.numberofelements 16 16 numberofnodes=md.mesh.numberofvertices … … 39 39 s=npy.sqrt(sx**2+sy**2) 40 40 41 if m d.mesh.dimension==3:41 if m.strcmp(md.mesh.meshtype(),'3D'): 42 42 sx=project3d(md,'vector',sx,'type','element') 43 43 sy=project3d(md,'vector',sy,'type','element') -
issm/trunk-jpl/src/m/interp/SectionValues.m
r13646 r17559 29 29 error('SectionValues error message: wrong resolution type. Resolution must be an array [horizontal_resolution vertical_resolution]') 30 30 end 31 if md.mesh.dimension==331 if strcmp(meshtype(md.mesh),'3D') 32 32 if (length(resolution)==2 & isnumeric(resolution(2))) 33 33 res_v=resolution(2); … … 78 78 79 79 %New mesh and Data interpolation 80 if ( md.mesh.dimension==2)80 if (strcmp(meshtype(md.mesh),'2Dhorizontal')) 81 81 82 82 %Interpolation of data on specified points -
issm/trunk-jpl/src/m/interp/averaging.m
r16055 r17559 25 25 error('averaging error message: data not supported yet'); 26 26 end 27 if md.mesh.dimension==3& nargin==4,27 if strcmp(meshtype(md.mesh),'3D') & nargin==4, 28 28 if varargin{1}<=0 | varargin{1}>md.mesh.numberoflayers, 29 29 error('layer should be between 1 and md.mesh.numberoflayers'); … … 56 56 %build some variables 57 57 line=index(:); 58 if md.mesh.dimension==3& layer==0,58 if strcmp(meshtype(md.mesh),'3D') & layer==0, 59 59 rep=6; 60 60 areas=GetAreas(index,md.mesh.x,md.mesh.y,md.mesh.z); 61 elseif md.mesh.dimension==2,61 elseif strcmp(meshtype(md.mesh),'2Dhorizontal'), 62 62 rep=3; 63 63 areas=GetAreas(index,md.mesh.x,md.mesh.y); -
issm/trunk-jpl/src/m/interp/averaging.py
r17551 r17559 27 27 if len(data)!=md.mesh.numberofelements and len(data)!=md.mesh.numberofvertices: 28 28 raise StandardError('averaging error message: data not supported yet') 29 if m d.mesh.dimension==3and layer!=0:29 if m.strcmp(md.mesh.meshtype(),'3D') and layer!=0: 30 30 if layer<=0 or layer>md.mesh.numberoflayers: 31 31 raise ValueError('layer should be between 1 and md.mesh.numberoflayers') … … 53 53 54 54 #build some variables 55 if m d.mesh.dimension==3and layer==0:55 if m.strcmp(md.mesh.meshtype(),'3D') and layer==0: 56 56 rep=6 57 57 areas=GetAreas(index,md.mesh.x,md.mesh.y,md.mesh.z) 58 elif m d.mesh.dimension==2:58 elif m.strcmp(md.mesh.meshtype(),'2Dhorizontal'): 59 59 rep=3 60 60 areas=GetAreas(index,md.mesh.x,md.mesh.y) -
issm/trunk-jpl/src/m/inversions/velocitymisfit.m
r17147 r17559 9 9 % 10 10 11 if md.mesh.dimension==2,11 if strcmp(meshtype(md.mesh),'2Dhorizontal'), 12 12 elements=md.mesh.elements; 13 13 x=md.mesh.x; -
issm/trunk-jpl/src/m/mech/analyticaldamage.m
r17389 r17559 48 48 error(['md.results.strainrate is not present. Calculate using md=mechanicalproperties(md,vx,vy)']); 49 49 end 50 if ~( md.mesh.dimension==2),50 if ~(strcmp(meshtype(md.mesh),'2Dhorizontal')), 51 51 error('only 2d model supported currently'); 52 52 end -
issm/trunk-jpl/src/m/mech/backstressfrominversion.m
r16416 r17559 41 41 error(['md.results.strainrate is not present. Calculate using md=mechanicalproperties(md,vx,vy)']); 42 42 end 43 if ~( md.mesh.dimension==2),43 if ~(strcmp(meshtype(md.mesh),'2Dhorizontal')), 44 44 error('only 2d model supported currently'); 45 45 end -
issm/trunk-jpl/src/m/mech/damagefrominversion.m
r16416 r17559 21 21 error(['md.results.strainrate is not present. Calculate using md=mechanicalproperties(md,vx,vy)']); 22 22 end 23 if ~( md.mesh.dimension==2),23 if ~(strcmp(meshtype(md.mesh),'2Dhorizontal')), 24 24 error('only 2d model supported currently'); 25 25 end -
issm/trunk-jpl/src/m/mech/mechanicalproperties.m
r17390 r17559 17 17 %error(['the input velocity should be of size ' num2str(md.mesh.numberofvertices) '!']) 18 18 end 19 if ~( md.mesh.dimension==2)19 if ~(strcmp(meshtype(md.mesh),'2Dhorizontal')) 20 20 error('only 2d model supported yet'); 21 21 end -
issm/trunk-jpl/src/m/mech/strainrateuncert.m
r15830 r17559 32 32 error(['the velocity error dvy should be of size ' num2str(md.mesh.numberofelements) ' or 1!']) 33 33 end 34 if ~( md.mesh.dimension==2)34 if ~(strcmp(meshtype(md.mesh),'2Dhorizontal')) 35 35 error('only 2d model supported yet'); 36 36 end -
issm/trunk-jpl/src/m/mech/thomasparams.m
r17367 r17559 51 51 error(['md.results.strainrate is not present. Calculate using md=mechanicalproperties(md,vx,vy)']) 52 52 end 53 if ~( md.mesh.dimension==2)53 if ~(strcmp(meshtype(md.mesh),'2Dhorizontal')) 54 54 error('only 2d model supported currently'); 55 55 end -
issm/trunk-jpl/src/m/mesh/bamg.m
r17558 r17559 284 284 %}}} 285 285 % Bamg Mesh parameters {{{ 286 if (~exist(options,'domain') & md.mesh.numberofvertices~=0 & md.mesh.dimension==2),286 if (~exist(options,'domain') & md.mesh.numberofvertices~=0 & strcmp(meshtype(md.mesh),'2Dhorizontal')), 287 287 288 288 if isstruct(md.private.bamg) & isfield(md.private.bamg,'mesh'), -
issm/trunk-jpl/src/m/mesh/bamg.py
r17558 r17559 272 272 #}}} 273 273 # Bamg Mesh parameters {{{ 274 if not options.exist('domain') and md.mesh.numberofvertices and m d.mesh.dimension==2:274 if not options.exist('domain') and md.mesh.numberofvertices and m.strcmp(md.mesh.meshtype(),'2Dhorizontal'): 275 275 276 276 if isinstance(md.private.bamg,dict) and 'mesh' in md.private.bamg: -
issm/trunk-jpl/src/m/partition/AreaAverageOntoPartition.m
r13646 r17559 9 9 10 10 %some checks 11 if md.mesh.dimension==3,11 if strcmp(meshtype(md.mesh),'3D'), 12 12 if nargin~=3, 13 13 error('layer should be provided onto which Area Averaging occurs'); … … 51 51 52 52 %in 3D, restore 3D model: 53 if md.mesh.dimension==3,53 if strcmp(meshtype(md.mesh),'3D'), 54 54 md=md3d; 55 55 end -
issm/trunk-jpl/src/m/partition/partitioner.m
r13646 r17559 30 30 recomputeadjacency=getfieldvalue(options,'recomputeadjacency'); 31 31 32 if( md.mesh.dimension==3),32 if(strcmp(meshtype(md.mesh),'3D')), 33 33 %partitioning essentially happens in 2D. So partition in 2D, then 34 34 %extrude the partition vector vertically. … … 69 69 70 70 % partition into nparts 71 part=Chaco(md.qmu.adjacency,weights,[],md.mesh.x, md.mesh.y ,md.mesh.z,method,npart,[])'+1; %index partitions from 1 up. like metis. 71 if isa(md.mesh,'mesh2d'), 72 part=Chaco(md.qmu.adjacency,weights,[],md.mesh.x, md.mesh.y,zeros(md.mesh.numberofvertices,1),method,npart,[])'+1; %index partitions from 1 up. like metis. 73 else 74 part=Chaco(md.qmu.adjacency,weights,[],md.mesh.x, md.mesh.y,md.mesh.z,method,npart,[])'+1; %index partitions from 1 up. like metis. 75 end 72 76 73 77 elseif strcmpi(package,'scotch'), … … 96 100 97 101 %extrude if we are in 3D: 98 if md.mesh.dimension==3,102 if strcmp(meshtype(md.mesh),'3D'), 99 103 md3d.qmu.vertex_weight=md.qmu.vertex_weight; 100 104 md3d.qmu.adjacency=md.qmu.adjacency; -
issm/trunk-jpl/src/m/plot/plot_basaldrag.m
r13730 r17559 9 9 10 10 %check layer 11 if md.mesh.dimension==3,11 if strcmp(meshtype(md.mesh),'3D'), 12 12 if getfieldvalue(options,'layer',1)~=1; 13 13 disp('plot_basaldrag warning: basal drag is displayed in the lower layer') -
issm/trunk-jpl/src/m/plot/plot_edges.m
r13730 r17559 17 17 end 18 18 19 if ( md.mesh.dimension==2),19 if (strcmp(meshtype(md.mesh),'2Dhorizontal')), 20 20 %plot mesh 21 21 A=elements(:,1); B=elements(:,2); C=elements(:,3); -
issm/trunk-jpl/src/m/plot/plot_icefront.m
r17262 r17559 19 19 elementzeroice=sum(zeroice(md.mesh.elements),2); 20 20 21 if ( md.mesh.dimension==2),21 if (strcmp(meshtype(md.mesh),'2Dhorizontal')), 22 22 icefront=(elementice & elementnoice) & ~(elementice==2 & elementzeroice); 23 23 -
issm/trunk-jpl/src/m/plot/plot_penalties.m
r15567 r17559 21 21 end 22 22 23 if ~ md.mesh.dimension==3,23 if ~strcmp(meshtype(md.mesh),'3D'), 24 24 error('no penalties to plot for ''2d'' model'); 25 25 elseif isempty(md.penalties), -
issm/trunk-jpl/src/m/plot/plot_qmu_mass_flux_segments.m
r13730 r17559 13 13 allsegments=md.qmu.mass_flux_segments; 14 14 15 if ( md.mesh.dimension==2),15 if (strcmp(meshtype(md.mesh),'2Dhorizontal')), 16 16 17 17 %recover segments -
issm/trunk-jpl/src/m/plot/plot_referential.m
r15771 r17559 28 28 Yhat=cross(Zhat,Xhat); 29 29 30 if ( md.mesh.dimension==2),30 if (strcmp(meshtype(md.mesh),'2Dhorizontal')), 31 31 32 32 %plot mesh -
issm/trunk-jpl/src/m/plot/plot_section.m
r16953 r17559 203 203 %apply options 204 204 options=addfielddefault(options,'title','Section value'); 205 if ( md.mesh.dimension==2)205 if (strcmp(meshtype(md.mesh),'2Dhorizontal')) 206 206 options=addfielddefault(options,'colorbar',0); 207 207 end 208 if (( md.mesh.dimension==2) | getfieldvalue(options,'view')==2 )208 if ((strcmp(meshtype(md.mesh),'2Dhorizontal')) | getfieldvalue(options,'view')==2 ) 209 209 options=addfielddefault(options,'xlabel','Curvilinear coordinate'); 210 210 options=addfielddefault(options,'axis','auto'); 211 211 end 212 if ( md.mesh.dimension==3& getfieldvalue(options,'view')==2 )212 if (strcmp(meshtype(md.mesh),'3D') & getfieldvalue(options,'view')==2 ) 213 213 options=addfielddefault(options,'ylabel','z'); 214 214 end -
issm/trunk-jpl/src/m/plot/plot_segments.m
r13730 r17559 14 14 segments=md.mesh.segments; 15 15 16 if ( md.mesh.dimension==2),16 if (strcmp(meshtype(md.mesh),'2Dhorizontal')), 17 17 %plot mesh 18 18 A=elements(:,1); B=elements(:,2); C=elements(:,3); -
issm/trunk-jpl/src/m/plot/plot_tensor_components.m
r13730 r17559 10 10 upperplots=fix((i-1)/width); 11 11 if upperplots==0, leftplots=i-1; else leftplots=i-width*upperplots-1; end 12 if ( md.mesh.dimension==2)%3 components -> 3 indexes12 if (strcmp(meshtype(md.mesh),'2Dhorizontal'))%3 components -> 3 indexes 13 13 index1=4*width*upperplots+2*leftplots+1; 14 14 index2=index1+1; 15 15 index3=index1+width*2; 16 elseif md.mesh.dimension==3%6 components -> 6 indexes16 elseif strcmp(meshtype(md.mesh),'3D')%6 components -> 6 indexes 17 17 index1=3*3*width*upperplots+3*leftplots+1; 18 18 index2=index1+1; … … 28 28 [tensor.yy datatype]=processdata(md,tensor.yy,options); 29 29 [tensor.xy datatype]=processdata(md,tensor.xy,options); 30 if md.mesh.dimension==330 if strcmp(meshtype(md.mesh),'3D') 31 31 [tensor.xz datatype]=processdata(md,tensor.xz,options); 32 32 [tensor.yz datatype]=processdata(md,tensor.yz,options); … … 34 34 end 35 35 36 if (( md.mesh.dimension==2)),36 if ((strcmp(meshtype(md.mesh),'2Dhorizontal'))), 37 37 subplot(2*width,2*width,index1), 38 38 plot_unit(x,y,z,elements,tensor.xx,is2d,isplanet,datatype,options) -
issm/trunk-jpl/src/m/plot/plot_tensor_principal.m
r13730 r17559 10 10 upperplots=fix((i-1)/width); 11 11 if upperplots==0, leftplots=i-1; else leftplots=i-width*upperplots-1; end 12 if ( md.mesh.dimension==2)%3 components -> 3 indexes12 if (strcmp(meshtype(md.mesh),'2Dhorizontal'))%3 components -> 3 indexes 13 13 index1=4*width*upperplots+2*leftplots+1; 14 14 index2=index1+1; … … 16 16 index4=index3+1; 17 17 newwidth=2*width; 18 elseif md.mesh.dimension==3%6 components -> 6 indexes18 elseif strcmp(meshtype(md.mesh),'3D')%6 components -> 6 indexes 19 19 index1=3*3*width*upperplots+3*leftplots+1; 20 20 index2=index1+1; … … 31 31 type2=[type 'axis2']; 32 32 plot_tensor_principalaxis(md,options,newwidth,index2,tensor,type2,plot_options); 33 if md.mesh.dimension==333 if strcmp(meshtype(md.mesh),'3D') 34 34 type3=[type 'axis3']; 35 35 plot_tensor_principalaxis(md,options,newwidth,index3,tensor,type3,plot_options); … … 40 40 [tensor.principalvalue1 datatype]=processdata(md,tensor.principalvalue1,options); 41 41 [tensor.principalvalue2 datatype]=processdata(md,tensor.principalvalue2,options); 42 if md.mesh.dimension==342 if strcmp(meshtype(md.mesh),'3D') 43 43 [tensor.principalvalue3 datatype]=processdata(md,tensor.principalvalue3,options); 44 44 end 45 45 46 if (( md.mesh.dimension==2)),46 if ((strcmp(meshtype(md.mesh),'2Dhorizontal'))), 47 47 subplot(2*width,2*width,index3) 48 48 plot_unit(x,y,z,elements,tensor.principalvalue1,is2d,isplanet,datatype,options) -
issm/trunk-jpl/src/m/plot/plot_tensor_principalaxis.m
r13730 r17559 13 13 [x y z elements is2d isplanet]=processmesh(md,[],options); 14 14 15 if (( md.mesh.dimension==2)),15 if ((strcmp(meshtype(md.mesh),'2Dhorizontal'))), 16 16 eval(['Vx=tensor.principalaxis' type(end) '(:,1); Vy=tensor.principalaxis' type(end) '(:,2);']) 17 17 eval(['value=tensor.principalvalue' type(end) ';']); … … 33 33 34 34 %plot quivers 35 if ( md.mesh.dimension==2),35 if (strcmp(meshtype(md.mesh),'2Dhorizontal')), 36 36 37 37 %density -
issm/trunk-jpl/src/m/plot/plot_transient_results.m
r13009 r17559 41 41 clear string; 42 42 43 if md.mesh.dimension==3,43 if strcmp(meshtype(md.mesh),'3D'), 44 44 string='plotmodel(md'; 45 45 for i=1:length(md.results.transient), … … 67 67 clear string; 68 68 69 if md.mesh.dimension==3,69 if strcmp(meshtype(md.mesh),'3D'), 70 70 string='plotmodel(md'; 71 71 for i=2:length(md.results.transient), -
issm/trunk-jpl/src/m/plot/processmesh.py
r17230 r17559 44 44 45 45 #is it a 2D plot? 46 if m d.mesh.dimension==2:46 if m.strcmp(md.mesh.meshtype(),'2Dhorizontal'): 47 47 is2d=1 48 elif m d.mesh.dimension==3:48 elif m.strcmp(md.mesh.meshtype(),'3D'): 49 49 if options.getfieldvalue('layer',0)>=1: 50 50 is2d=1 … … 66 66 else: 67 67 #Process mesh for plotting 68 if m d.mesh.dimension==2:68 if m.strcmp(md.mesh.meshtype(),'2Dhorizontal'): 69 69 is2d=1 70 70 else:
Note:
See TracChangeset
for help on using the changeset viewer.