Changeset 17687
- Timestamp:
- 04/08/14 21:13:16 (11 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/boundaryconditions/SetMarineIceSheetBC.m
r17686 r17687 52 52 53 53 %First find segments that are not completely on the front 54 if ~strcmp(md.mesh.domaintype(),'3D'), 54 if strcmp(elementtype(md.mesh),'Penta'), 55 numbernodesfront=4; 56 elseif strcmp(elementtype(md.mesh),'Tria'), 55 57 numbernodesfront=2; 56 else 57 numbernodesfront=4;58 else 59 error('mesh type not supported yet'); 58 60 end 59 61 segmentsfront=md.mask.ice_levelset(md.mesh.segments(:,1:numbernodesfront))==0; -
issm/trunk-jpl/src/m/boundaryconditions/SetMarineIceSheetBC.py
r17686 r17687 53 53 54 54 #First find segments that are not completely on the front 55 if not m.strcmp(md.mesh.domaintype(),'3D'): 55 if m.strcmp(md.mesh.elementtype(),'Penta'): 56 numbernodesfront=4 57 elif m.strcmp(md.mesh.elementtype(),'Tria'): 56 58 numbernodesfront=2 57 59 else: 58 numbernodesfront=460 raise StandardError("Mesh type not supported") 59 61 if any(md.mask.ice_levelset<=0): 60 62 values=md.mask.ice_levelset[md.mesh.segments[:,0:-1]-1] -
issm/trunk-jpl/src/m/classes/model.m
r17686 r17687 156 156 157 157 %Check that the model is really a 3d model 158 if ~strcmp(md.mesh. domaintype(),'3D'),158 if ~strcmp(md.mesh.elementtype(),'Penta'), 159 159 error('collapse error message: only 3d mesh can be collapsed') 160 160 end -
issm/trunk-jpl/src/m/contrib/ecco/PropagateFlagsUntilDistance.m
r17686 r17687 10 10 11 11 %make 3d work in 2d: 12 if strcmp(domaintype(md.mesh),'3D'),12 if dimension(md.mesh)==3, 13 13 md.mesh.x=md.mesh.x2d; 14 14 md.mesh.y=md.mesh.y2d; -
issm/trunk-jpl/src/m/extrusion/DepthAverage.m
r17686 r17687 9 9 10 10 %check that the model given in input is 3d 11 if ~strcmp(md.mesh. domaintype,'3D');11 if ~strcmp(md.mesh.elementtype(),'3D'); 12 12 error('DepthAverage error message: the model given in input must be 3d') 13 13 end -
issm/trunk-jpl/src/m/parameterization/contourenvelope.m
r17686 r17687 42 42 %get nodes inside profile 43 43 mesh.elementconnectivity=md.mesh.elementconnectivity; 44 if strcmp(md.mesh.domaintype(),'2Dhorizontal'),44 if dimension(md.mesh)==2, 45 45 mesh.elements=md.mesh.elements; 46 46 mesh.x=md.mesh.x; -
issm/trunk-jpl/src/m/parameterization/contourenvelope.py
r17686 r17687 47 47 #get nodes inside profile 48 48 elementconnectivity=copy.deepcopy(md.mesh.elementconnectivity) 49 if m .strcmp(md.mesh.domaintype(),'2Dhorizontal'):49 if md.mesh.dimension()==2: 50 50 elements=copy.deepcopy(md.mesh.elements) 51 51 x=copy.deepcopy(md.mesh.x) -
issm/trunk-jpl/src/m/plot/applyoptions.m
r17686 r17687 49 49 50 50 %view 51 if strcmp(domaintype(md.mesh),'3D')& ~exist(options,'layer'),51 if dimension(md.mesh)==3 & ~exist(options,'layer'), 52 52 view(getfieldvalue(options,'view',3)); 53 53 else … … 60 60 eval(['axis ' getfieldvalue(options,'axis')]); 61 61 else 62 if strcmpi(domaintype(md.mesh),'2Dhorizontal')| exist(options,'layer'),62 if dimension(md.mesh)==2 | exist(options,'layer'), 63 63 axis tight equal; 64 64 else -
issm/trunk-jpl/src/m/plot/plot_edges.m
r17686 r17687 17 17 end 18 18 19 if (strcmp(domaintype(md.mesh),'2Dhorizontal')),19 if dimension(md.mesh)==2, 20 20 %plot mesh 21 21 A=elements(:,1); B=elements(:,2); C=elements(:,3); -
issm/trunk-jpl/src/m/plot/plot_icefront.m
r17686 r17687 19 19 elementzeroice=sum(zeroice(md.mesh.elements),2); 20 20 21 if (strcmp(domaintype(md.mesh),'2Dhorizontal')),21 if dimension(md.mesh)==2, 22 22 icefront=(elementice & elementnoice) & ~(elementice==2 & elementzeroice); 23 23 -
issm/trunk-jpl/src/m/plot/plot_penalties.m
r17686 r17687 21 21 end 22 22 23 if ~strcmp(domaintype(md.mesh),'3D'),23 if dimension(md.mesh)~=3, 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
r17686 r17687 13 13 allsegments=md.qmu.mass_flux_segments; 14 14 15 if (strcmp(domaintype(md.mesh),'2Dhorizontal')),15 if dimension(md.mesh)==2, 16 16 17 17 %recover segments -
issm/trunk-jpl/src/m/plot/plot_referential.m
r17686 r17687 28 28 Yhat=cross(Zhat,Xhat); 29 29 30 if (strcmp(domaintype(md.mesh),'2Dhorizontal')),30 if dimension(md.mesh)==2, 31 31 32 32 %plot mesh -
issm/trunk-jpl/src/m/plot/plot_segments.m
r17686 r17687 14 14 segments=md.mesh.segments; 15 15 16 if (strcmp(domaintype(md.mesh),'2Dhorizontal')),16 if dimension(md.mesh)==2, 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
r17686 r17687 10 10 upperplots=fix((i-1)/width); 11 11 if upperplots==0, leftplots=i-1; else leftplots=i-width*upperplots-1; end 12 if (strcmp(domaintype(md.mesh),'2Dhorizontal'))%3 components -> 3 indexes12 if dimension(md.mesh)==2 %3 components -> 3 indexes 13 13 index1=4*width*upperplots+2*leftplots+1; 14 14 index2=index1+1; … … 34 34 end 35 35 36 if ((strcmp(domaintype(md.mesh),'2Dhorizontal'))),36 if dimension(md.mesh)==2, 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_transient_results.m
r17686 r17687 41 41 clear string; 42 42 43 if strcmp(domaintype(md.mesh),'3D'),43 if dimension(md.mesh)==3, 44 44 string='plotmodel(md'; 45 45 for i=1:length(md.results.transient), … … 67 67 clear string; 68 68 69 if strcmp(domaintype(md.mesh),'3D'),69 if dimension(md.mesh)==3, 70 70 string='plotmodel(md'; 71 71 for i=2:length(md.results.transient), -
issm/trunk-jpl/src/m/plot/processdata.m
r17686 r17687 65 65 66 66 %check number of columns, add zeros if necessary, 67 if ( strcmp(md.mesh.domaintype(),'3D'))67 if (dimension(md.mesh)==3) 68 68 if datasize(2)==2, 69 69 data=[data, zeros(datasize(1),1)]; … … 85 85 86 86 %treat the case datasize(1)=nodes2d 87 if ( strcmp(md.mesh.domaintype(),'3D')& datasize(1)==numberofvertices2d),87 if (dimension(md.mesh)==3 & datasize(1)==numberofvertices2d), 88 88 data=project3d(md,'vector',data,'type','node'); 89 89 datasize(1)=md.mesh.numberofvertices; … … 92 92 93 93 %treat the case datasize(1)=nodes2d 94 if ( strcmp(md.mesh.domaintype(),'3D')& datasize(1)==numberofelements2d),94 if (dimension(md.mesh)==3 & datasize(1)==numberofelements2d), 95 95 data=project3d(md,'vector',data,'type','element'); 96 96 datasize(1)=md.mesh.numberofelements; -
issm/trunk-jpl/src/m/plot/processmesh.py
r17686 r17687 42 42 43 43 #is it a 2D plot? 44 if m .strcmp(md.mesh.domaintype(),'2Dhorizontal'):44 if md.mesh.dimension()==2: 45 45 is2d=1 46 el if m.strcmp(md.mesh.domaintype(),'3D'):46 else: 47 47 if options.getfieldvalue('layer',0)>=1: 48 48 is2d=1 49 49 else: 50 50 is2d=0 51 else:52 raise ValueError('processmesh error: dim = %d not supported' % md.mesh.dimension)53 51 54 52 #layer projection? … … 64 62 else: 65 63 #Process mesh for plotting 66 if m .strcmp(md.mesh.domaintype(),'2Dhorizontal'):64 if md.mesh.dimension()==2: 67 65 is2d=1 68 66 else:
Note:
See TracChangeset
for help on using the changeset viewer.