Ignore:
Timestamp:
04/08/14 14:59:42 (11 years ago)
Author:
Mathieu Morlighem
Message:

CHG: renamed meshtype->meshxdim (Extended Dimension) and added meshdim (2 or 3) and meshtype (Tria Penta Tetra)

Location:
issm/trunk-jpl/src/m/plot
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/applyoptions.m

    r17568 r17674  
    4949
    5050%view
    51 if strcmp(meshtype(md.mesh),'3D') & ~exist(options,'layer'),
     51if strcmp(meshxdim(md.mesh),'3D') & ~exist(options,'layer'),
    5252        view(getfieldvalue(options,'view',3));
    5353else
     
    6060        eval(['axis ' getfieldvalue(options,'axis')]);
    6161else
    62         if strcmpi(meshtype(md.mesh),'2Dhorizontal') | exist(options,'layer'),
     62        if strcmpi(meshxdim(md.mesh),'2Dhorizontal') | exist(options,'layer'),
    6363                axis tight equal;
    6464        else
  • issm/trunk-jpl/src/m/plot/plot_basaldrag.m

    r17590 r17674  
    99
    1010%check layer
    11 if strcmp(meshtype(md.mesh),'3D'),
     11if meshdim(md.mesh)==3,
    1212        if getfieldvalue(options,'layer',1)~=1;
    1313                disp('plot_basaldrag warning: basal drag is displayed in the lower layer')
  • issm/trunk-jpl/src/m/plot/plot_edges.m

    r17559 r17674  
    1717end
    1818
    19 if (strcmp(meshtype(md.mesh),'2Dhorizontal')),
     19if (strcmp(meshxdim(md.mesh),'2Dhorizontal')),
    2020        %plot mesh
    2121        A=elements(:,1); B=elements(:,2); C=elements(:,3);
  • issm/trunk-jpl/src/m/plot/plot_icefront.m

    r17559 r17674  
    1919elementzeroice=sum(zeroice(md.mesh.elements),2);
    2020
    21 if (strcmp(meshtype(md.mesh),'2Dhorizontal')),
     21if (strcmp(meshxdim(md.mesh),'2Dhorizontal')),
    2222        icefront=(elementice & elementnoice) & ~(elementice==2 & elementzeroice);
    2323
  • issm/trunk-jpl/src/m/plot/plot_penalties.m

    r17559 r17674  
    2121end
    2222
    23 if ~strcmp(meshtype(md.mesh),'3D'),
     23if ~strcmp(meshxdim(md.mesh),'3D'),
    2424        error('no penalties to plot for ''2d'' model');
    2525elseif isempty(md.penalties),
  • issm/trunk-jpl/src/m/plot/plot_qmu_mass_flux_segments.m

    r17559 r17674  
    1313allsegments=md.qmu.mass_flux_segments;
    1414
    15 if (strcmp(meshtype(md.mesh),'2Dhorizontal')),
     15if (strcmp(meshxdim(md.mesh),'2Dhorizontal')),
    1616
    1717        %recover segments
  • issm/trunk-jpl/src/m/plot/plot_referential.m

    r17559 r17674  
    2828Yhat=cross(Zhat,Xhat);
    2929
    30 if (strcmp(meshtype(md.mesh),'2Dhorizontal')),
     30if (strcmp(meshxdim(md.mesh),'2Dhorizontal')),
    3131
    3232        %plot mesh
  • issm/trunk-jpl/src/m/plot/plot_section.m

    r17559 r17674  
    203203%apply options
    204204options=addfielddefault(options,'title','Section value');
    205 if (strcmp(meshtype(md.mesh),'2Dhorizontal'))
     205if meshdim(md.mesh)==2
    206206        options=addfielddefault(options,'colorbar',0);
    207207end
    208 if ((strcmp(meshtype(md.mesh),'2Dhorizontal')) | getfieldvalue(options,'view')==2 )
     208if ((meshdim(md.mesh)==2) | getfieldvalue(options,'view')==2 )
    209209        options=addfielddefault(options,'xlabel','Curvilinear coordinate');
    210210        options=addfielddefault(options,'axis','auto');
    211211end
    212 if (strcmp(meshtype(md.mesh),'3D') & getfieldvalue(options,'view')==2 )
     212if (meshdim(md.mesh)==3 & getfieldvalue(options,'view')==2 )
    213213        options=addfielddefault(options,'ylabel','z');
    214214end
  • issm/trunk-jpl/src/m/plot/plot_segments.m

    r17559 r17674  
    1414segments=md.mesh.segments;
    1515
    16 if (strcmp(meshtype(md.mesh),'2Dhorizontal')),
     16if (strcmp(meshxdim(md.mesh),'2Dhorizontal')),
    1717        %plot mesh
    1818        A=elements(:,1); B=elements(:,2); C=elements(:,3);
  • issm/trunk-jpl/src/m/plot/plot_tensor_components.m

    r17559 r17674  
    1010upperplots=fix((i-1)/width);
    1111if upperplots==0, leftplots=i-1; else leftplots=i-width*upperplots-1; end
    12 if (strcmp(meshtype(md.mesh),'2Dhorizontal'))%3 components -> 3 indexes
     12if (strcmp(meshxdim(md.mesh),'2Dhorizontal'))%3 components -> 3 indexes
    1313        index1=4*width*upperplots+2*leftplots+1;
    1414        index2=index1+1;
    1515        index3=index1+width*2;
    16 elseif strcmp(meshtype(md.mesh),'3D')%6 components -> 6 indexes
     16elseif meshdim(md.mesh)==3%6 components -> 6 indexes
    1717        index1=3*3*width*upperplots+3*leftplots+1;
    1818        index2=index1+1;
     
    2828[tensor.yy datatype]=processdata(md,tensor.yy,options);
    2929[tensor.xy datatype]=processdata(md,tensor.xy,options);
    30 if  strcmp(meshtype(md.mesh),'3D')
     30if  meshdim(md.mesh)==3
    3131        [tensor.xz datatype]=processdata(md,tensor.xz,options);
    3232        [tensor.yz datatype]=processdata(md,tensor.yz,options);
     
    3434end
    3535
    36 if ((strcmp(meshtype(md.mesh),'2Dhorizontal'))),
     36if ((strcmp(meshxdim(md.mesh),'2Dhorizontal'))),
    3737        subplot(2*width,2*width,index1),
    3838        plot_unit(x,y,z,elements,tensor.xx,is2d,isplanet,datatype,options)
  • issm/trunk-jpl/src/m/plot/plot_tensor_principal.m

    r17559 r17674  
    1010upperplots=fix((i-1)/width);
    1111if upperplots==0, leftplots=i-1; else leftplots=i-width*upperplots-1; end
    12 if (strcmp(meshtype(md.mesh),'2Dhorizontal'))%3 components -> 3 indexes
     12if (meshdim(md.mesh)==2)%3 components -> 3 indexes
    1313        index1=4*width*upperplots+2*leftplots+1;
    1414        index2=index1+1;
     
    1616        index4=index3+1;
    1717        newwidth=2*width;
    18 elseif strcmp(meshtype(md.mesh),'3D')%6 components -> 6 indexes
     18elseif meshdim(md.mesh)==3%6 components -> 6 indexes
    1919        index1=3*3*width*upperplots+3*leftplots+1;
    2020        index2=index1+1;
     
    3131type2=[type 'axis2'];
    3232plot_tensor_principalaxis(md,options,newwidth,index2,tensor,type2,plot_options);
    33 if  strcmp(meshtype(md.mesh),'3D')
     33if  meshdim(md.mesh)==3
    3434        type3=[type 'axis3'];
    3535        plot_tensor_principalaxis(md,options,newwidth,index3,tensor,type3,plot_options);
     
    4040[tensor.principalvalue1 datatype]=processdata(md,tensor.principalvalue1,options);
    4141[tensor.principalvalue2 datatype]=processdata(md,tensor.principalvalue2,options);
    42 if  strcmp(meshtype(md.mesh),'3D')
     42if  meshdim(md.mesh)==3
    4343        [tensor.principalvalue3 datatype]=processdata(md,tensor.principalvalue3,options);
    4444end
    4545
    46 if ((strcmp(meshtype(md.mesh),'2Dhorizontal'))),
     46if meshdim(md.mesh)==2,
    4747        subplot(2*width,2*width,index3)
    4848        plot_unit(x,y,z,elements,tensor.principalvalue1,is2d,isplanet,datatype,options)
  • issm/trunk-jpl/src/m/plot/plot_tensor_principalaxis.m

    r17559 r17674  
    1313[x y z elements is2d isplanet]=processmesh(md,[],options);
    1414
    15 if ((strcmp(meshtype(md.mesh),'2Dhorizontal'))),
     15if meshdim(md.mesh)==2,
    1616        eval(['Vx=tensor.principalaxis' type(end) '(:,1); Vy=tensor.principalaxis' type(end) '(:,2);'])
    1717        eval(['value=tensor.principalvalue' type(end) ';']);
     
    3333
    3434%plot quivers
    35 if (strcmp(meshtype(md.mesh),'2Dhorizontal')),
     35if meshdim(md.mesh)==2,
    3636
    3737        %density
  • issm/trunk-jpl/src/m/plot/plot_transient_results.m

    r17559 r17674  
    4141clear string;
    4242
    43 if strcmp(meshtype(md.mesh),'3D'),
     43if strcmp(meshxdim(md.mesh),'3D'),
    4444        string='plotmodel(md';
    4545        for i=1:length(md.results.transient),
     
    6767clear string;
    6868
    69 if strcmp(meshtype(md.mesh),'3D'),
     69if strcmp(meshxdim(md.mesh),'3D'),
    7070        string='plotmodel(md';
    7171        for i=2:length(md.results.transient),
  • issm/trunk-jpl/src/m/plot/processdata.m

    r17597 r17674  
    2323
    2424%special case for mesh 2dvertical
    25 if strcmp(meshtype(md.mesh),'2Dvertical'),
     25if strcmp(meshxdim(md.mesh),'2Dvertical'),
    2626        [data datatype] = processdata(md.mesh,md,data,options);
    2727        return;
     
    5656
    5757%check length
    58 if datasize(1)~=md.mesh.numberofvertices & datasize(1)~=md.mesh.numberofelements & datasize(1)~=md.mesh.numberofvertices*6 & (strcmp(md.mesh.meshtype(),'3D') & ~(datasize(1)==numberofelements2d | datasize(1)==numberofvertices2d))
     58if datasize(1)~=md.mesh.numberofvertices & datasize(1)~=md.mesh.numberofelements & datasize(1)~=md.mesh.numberofvertices*6 & (strcmp(md.mesh.meshxdim(),'3D') & ~(datasize(1)==numberofelements2d | datasize(1)==numberofvertices2d))
    5959        error('plotmodel error message: data not supported yet');
    6060end
     
    6565
    6666        %check number of columns, add zeros if necessary,
    67         if (strcmp(md.mesh.meshtype(),'3D'))
     67        if (strcmp(md.mesh.meshxdim(),'3D'))
    6868                if datasize(2)==2,
    6969                        data=[data, zeros(datasize(1),1)];
     
    8585
    8686%treat the case datasize(1)=nodes2d
    87 if (strcmp(md.mesh.meshtype(),'3D') & datasize(1)==numberofvertices2d),
     87if (strcmp(md.mesh.meshxdim(),'3D') & datasize(1)==numberofvertices2d),
    8888        data=project3d(md,'vector',data,'type','node');
    8989        datasize(1)=md.mesh.numberofvertices;
     
    9292
    9393%treat the case datasize(1)=nodes2d
    94 if (strcmp(md.mesh.meshtype(),'3D') & datasize(1)==numberofelements2d),
     94if (strcmp(md.mesh.meshxdim(),'3D') & datasize(1)==numberofelements2d),
    9595        data=project3d(md,'vector',data,'type','element');
    9696        datasize(1)=md.mesh.numberofelements;
  • issm/trunk-jpl/src/m/plot/processmesh.m

    r17578 r17674  
    1616
    1717%special case for mesg 2dvertical
    18 if strcmp(meshtype(md.mesh),'2Dvertical'),
     18if strcmp(meshxdim(md.mesh),'2Dvertical'),
    1919        [x y z elements is2d isplanet] = processmesh(md.mesh,options);
    2020        return;
     
    4646
    4747%is it a 2d plot?
    48 if ~strcmp(md.mesh.meshtype(),'3D');
     48if md.mesh.meshdim()==2,
    4949        is2d=1;
    5050else
  • issm/trunk-jpl/src/m/plot/processmesh.py

    r17597 r17674  
    4242
    4343                #is it a 2D plot?
    44                 if m.strcmp(md.mesh.meshtype(),'2Dhorizontal'):
     44                if m.strcmp(md.mesh.meshxdim(),'2Dhorizontal'):
    4545                        is2d=1
    46                 elif m.strcmp(md.mesh.meshtype(),'3D'):
     46                elif m.strcmp(md.mesh.meshxdim(),'3D'):
    4747                        if options.getfieldvalue('layer',0)>=1:
    4848                                is2d=1
     
    6464        else:
    6565                #Process mesh for plotting
    66                 if m.strcmp(md.mesh.meshtype(),'2Dhorizontal'):
     66                if m.strcmp(md.mesh.meshxdim(),'2Dhorizontal'):
    6767                        is2d=1
    6868                else:
Note: See TracChangeset for help on using the changeset viewer.