Changeset 12959


Ignore:
Timestamp:
08/09/12 16:13:42 (13 years ago)
Author:
jschierm
Message:

CHG: Change variable name list in matlab scripts to keep consistent with python, where it is very bad.

Location:
issm/trunk-jpl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/model/setflowequation.m

    r12950 r12959  
    135135                %rule out elements that don't touch the 2 boundaries
    136136                pos=find(macayealpattynflag);
    137                 list=zeros(length(pos),1);
    138                 list = list + any(sum(nodeonmacayeal(md.mesh.elements(pos,:)),2),2);
    139                 list = list - any(sum(nodeonpattyn(md.mesh.elements(pos,:))  ,2),2);
    140                 pos1=find(list==1);
     137                elist=zeros(length(pos),1);
     138                elist = elist + any(sum(nodeonmacayeal(md.mesh.elements(pos,:)),2),2);
     139                elist = elist - any(sum(nodeonpattyn(md.mesh.elements(pos,:))  ,2),2);
     140                pos1=find(elist==1);
    141141                macayealflag(pos(pos1))=1;
    142142                macayealpattynflag(pos(pos1))=0;
    143                 pos2=find(list==-1);
     143                pos2=find(elist==-1);
    144144                pattynflag(pos(pos2))=1;
    145145                macayealpattynflag(pos(pos2))=0;
     
    167167                %rule out elements that don't touch the 2 boundaries
    168168                pos=find(pattynstokesflag);
    169                 list=zeros(length(pos),1);
    170                 list = list + any(sum(nodeonstokes(md.mesh.elements(pos,:)),2),2);
    171                 list = list - any(sum(nodeonpattyn(md.mesh.elements(pos,:)),2),2);
    172                 pos1=find(list==1);
     169                elist=zeros(length(pos),1);
     170                elist = elist + any(sum(nodeonstokes(md.mesh.elements(pos,:)),2),2);
     171                elist = elist - any(sum(nodeonpattyn(md.mesh.elements(pos,:)),2),2);
     172                pos1=find(elist==1);
    173173                stokesflag(pos(pos1))=1;
    174174                pattynstokesflag(pos(pos1))=0;
    175                 pos2=find(list==-1);
     175                pos2=find(elist==-1);
    176176                pattynflag(pos(pos2))=1;
    177177                pattynstokesflag(pos(pos2))=0;
     
    199199                %rule out elements that don't touch the 2 boundaries
    200200                pos=find(macayealstokesflag);
    201                 list=zeros(length(pos),1);
    202                 list = list + any(sum(nodeonmacayeal(md.mesh.elements(pos,:)),2),2);
    203                 list = list - any(sum(nodeonstokes(md.mesh.elements(pos,:))  ,2),2);
    204                 pos1=find(list==1);
     201                elist=zeros(length(pos),1);
     202                elist = elist + any(sum(nodeonmacayeal(md.mesh.elements(pos,:)),2),2);
     203                elist = elist - any(sum(nodeonstokes(md.mesh.elements(pos,:))  ,2),2);
     204                pos1=find(elist==1);
    205205                macayealflag(pos(pos1))=1;
    206206                macayealstokesflag(pos(pos1))=0;
    207                 pos2=find(list==-1);
     207                pos2=find(elist==-1);
    208208                stokesflag(pos(pos2))=1;
    209209                macayealstokesflag(pos(pos2))=0;
  • issm/trunk-jpl/test/NightlyRun/runme.m

    r12631 r12959  
    7272% }}}
    7373%GET ids  {{{1
    74 list=dir;%use dir, as it seems to act OS independent
     74flist=dir;%use dir, as it seems to act OS independent
    7575list_ids=[];
    76 for i=1:numel(list),
    77         if ( strncmp(list(i).name,'test',4) &...                         %File name must start with 'test'
    78                         strncmp(fliplr(list(i).name),fliplr('.m'),2)&...           %File name must end by '.m'
    79                         ~strcmp(list(i).name,'test.m'))                            %File name must be different than 'test.m'
    80                 list_ids(end+1)=eval(list(i).name(5:end-2));                  %Keep test id only (skip 'test' and '.m')
     76for i=1:numel(flist),
     77        if ( strncmp(flist(i).name,'test',4) &...                         %File name must start with 'test'
     78                        strncmp(fliplr(flist(i).name),fliplr('.m'),2)&...           %File name must end by '.m'
     79                        ~strcmp(flist(i).name,'test.m'))                            %File name must be different than 'test.m'
     80                list_ids(end+1)=eval(flist(i).name(5:end-2));                  %Keep test id only (skip 'test' and '.m')
    8181        end
    8282end
Note: See TracChangeset for help on using the changeset viewer.