Changeset 13646


Ignore:
Timestamp:
10/12/12 16:44:17 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: cosmetics, removed multiple blank lines

Location:
issm/trunk-jpl/src/m
Files:
195 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/array/array_numel.m

    r3569 r13646  
    1717        inum=numel(varargin{iarg});
    1818    end
    19    
     19
    2020    if ~isequal(inum,1)
    2121        if isequal(anum,1)
  • issm/trunk-jpl/src/m/array/array_size.m

    r3569 r13646  
    1717        isize=size(varargin{iarg});
    1818    end
    19    
     19
    2020    if ~isequal(isize,[1 1])
    2121        if isequal(asize,[1 1])
  • issm/trunk-jpl/src/m/array/str2int.m

    r6614 r13646  
    4444
    4545end
    46 
  • issm/trunk-jpl/src/m/array/struc_desc.m

    r3569 r13646  
    2222        desc=cellstr(varargin{iarg});
    2323    end
    24    
     24
    2525    for i=1:length(desc)
    2626        sarrayoi=struc_desci(sarray,desc{i});
  • issm/trunk-jpl/src/m/boundaryconditions/SetMarineIceSheetBC.m

    r13470 r13646  
    7474md.diagnostic.icefront=pressureload;
    7575
    76 
    7776%Create zeros basalforcings and surfaceforcings
    7877if (isnan(md.surfaceforcings.precipitation) & (md.surfaceforcings.ispdd==1)),
  • issm/trunk-jpl/src/m/classes/autodiff.m

    r13516 r13646  
    4141                        end
    4242
    43 
    4443                end % }}}
    4544                function disp(obj) % {{{
     
    5453                        WriteData(fid,'object',obj,'fieldname','isautodiff','format','Boolean');
    5554                        WriteData(fid,'object',obj,'fieldname','driver','format','String');
    56                        
     55
    5756                        %early return
    5857                        if ~obj.isautodiff,
     
    104103                        if strcmpi(obj.driver,'fos_forward'),
    105104                                index=0;
    106                                
     105
    107106                                for i=1:num_independent_objects,
    108107                                        indep=obj.independents{i};
     
    125124                        if strcmpi(obj.driver,'fos_reverse'),
    126125                                index=0;
    127                                
     126
    128127                                for i=1:num_dependent_objects,
    129128                                        dep=obj.dependents{i};
     
    146145                        if strcmpi(obj.driver,'fov_forward'),
    147146                                indices=0;
    148                                
     147
    149148                                for i=1:num_independent_objects,
    150149                                        indep=obj.independents{i};
  • issm/trunk-jpl/src/m/classes/dependent.m

    r13509 r13646  
    1616        methods
    1717                 function obj= dependent(varargin) % {{{
    18                          
     18
    1919                         %use provided options to change fields
    2020                         options=pairoptions(varargin{:});
    21                                
     21
    2222                         obj.name=getfieldvalue(options,'name','');
    2323                         obj.type=getfieldvalue(options,'type','');
     
    6868                        fielddisplay(obj,'name','variable name (must match corresponding Enum)');
    6969                        fielddisplay(obj,'type','type of variable (''vertex'' or ''scalar'')');
    70                        
     70
    7171                        if ~isnan(obj.fos_reverse_index),
    7272                                fielddisplay(obj,'fos_reverse_index','index for fos_reverse driver of ADOLC');
  • issm/trunk-jpl/src/m/classes/diagnostic.m

    r13040 r13646  
    3838                         %maximum of non-linear iterations.
    3939                         obj.maxiter=100;
    40                          
     40
    4141                         %Convergence criterion: absolute, relative and residual
    4242                         obj.restol=10^-4;
    4343                         obj.reltol=0.01;
    4444                         obj.abstol=10;
    45                          
     45
    4646                         obj.stokesreconditioning=10^13;
    4747                         obj.shelf_dampening=0;
  • issm/trunk-jpl/src/m/classes/flaim.m

    r13020 r13646  
    5959                        fielddisplay(obj,'usevalueordering'   ,'flag to consider target values for flight path evaluation');
    6060                        fielddisplay(obj,'split_antimeridian' ,'flag to split polygons on the antimeridian');
    61                        
     61
    6262                        disp(sprintf('\n      Optimization:'));
    6363                        fielddisplay(obj,'path_optimize'     ,'optimize? (default false)');
  • issm/trunk-jpl/src/m/classes/groundingline.m

    r13020 r13646  
    2525                        %basal melting rate correction:
    2626                        obj.melting_rate=0;
    27 
    2827
    2928                end % }}}
  • issm/trunk-jpl/src/m/classes/independent.m

    r13461 r13646  
    1414        methods
    1515                 function obj= independent(varargin) % {{{
    16                          
     16
    1717                         %use provided options to change fields
    1818                         options=pairoptions(varargin{:});
     
    4949                        end
    5050
    51 
    5251                end % }}}
    5352                function disp(obj) % {{{
  • issm/trunk-jpl/src/m/classes/mesh.m

    r13020 r13646  
    1515                numberofvertices            = 0;
    1616                numberofedges               = 0;
    17                
     17
    1818                lat                         = NaN
    1919                long                        = NaN
     
    158158                        fielddisplay(obj,'lowerelements','lower element list (NaN for element on the lower layer');
    159159                        fielddisplay(obj,'vertexonboundary','vertices on the boundary of the domain flag list');
    160                        
     160
    161161                        fielddisplay(obj,'segments','edges on domain boundary (vertex1 vertex2 element)');
    162162                        fielddisplay(obj,'segmentmarkers','number associated to each segment');
  • issm/trunk-jpl/src/m/classes/model/model.m

    r13347 r13646  
    930930                         if isfield(structmd,'npart'); md.qmu.numberofpartitions=structmd.npart; end
    931931                         if isfield(structmd,'part'); md.qmu.partition=structmd.part; end
    932                                  
     932
    933933                         %Field changes
    934934                         if (isfield(structmd,'type') & ischar(structmd.type)),
     
    10371037                                 md.mesh.lowerelements(1:md.mesh.numberofelements2d)=NaN;
    10381038                         end
    1039                                  
     1039
    10401040                         if ~isfield(structmd,'diagnostic_ref');
    10411041                                 md.diagnostic.referential=NaN*ones(md.mesh.numberofvertices,6);
  • issm/trunk-jpl/src/m/classes/modellist.m

    r13012 r13646  
    271271                        end
    272272
    273 
    274273                        %now, tar all the files and then erase them.
    275274                        eval(['!find -iname ''' name '-*'' > file_list.txt']);
     
    369368%      LaunchMultipleQueueJobgemini(cluster,name,executionpath)
    370369
    371 
    372370%first, check we have the binary file and the queueing script
    373371if ~exist([ name '.queue'],'file'),
  • issm/trunk-jpl/src/m/classes/organizer.m

    r12648 r13646  
    114114                 end%}}}
    115115                 function bool=perform(org,string) % {{{
    116                          
     116
    117117                         bool=false;
    118118
     
    155155                         name=[org.repository '/' org.prefix org.steps(org.currentstep).string ];
    156156                         disp(['saving model as: ' name]);
    157                          
     157
    158158                         %check that md is a model
    159159                         if ~isa(md,'model'), warning('third argument is not a model'); end
  • issm/trunk-jpl/src/m/classes/planetmesh.m

    r13043 r13646  
    1717                numberofelements            = 0;
    1818                numberofvertices            = 0;
    19                
     19
    2020                lat                         = NaN
    2121                long                        = NaN
     
    103103                        fielddisplay(obj,'dimension','planetmesh dimension (2d or 3d)');
    104104                        fielddisplay(obj,'numberoflayers','number of extrusion layers');
    105                        
     105
    106106                        fielddisplay(obj,'vertexconnectivity','list of vertices connected to vertex_i');
    107107                        fielddisplay(obj,'elementconnectivity','list of vertices connected to element_i');
  • issm/trunk-jpl/src/m/classes/prognostic.m

    r13443 r13646  
    5050                        end
    5151
    52 
    5352                end % }}}
    5453                function disp(obj) % {{{
  • issm/trunk-jpl/src/m/classes/qmu.m

    r13486 r13646  
    3333                end % }}}
    3434                function obj = setdefaultparameters(obj) % {{{
    35        
     35
    3636                end % }}}
    3737                function md = checkconsistency(obj,md,solution,analyses) % {{{
  • issm/trunk-jpl/src/m/classes/qmu/@dakota_method/dakota_method.m

    r3094 r13646  
    4949        params   =struct();
    5050    end
    51    
     51
    5252    methods
    5353        function [dm]=dakota_method(method)
     
    828828
    829829                    end
    830                    
     830
    831831%  if more than one argument, issue warning
    832832
     
    852852                disp(sprintf('    responses: %s'      ,string_cell(dm(i).responses)));
    853853                disp(sprintf('       ghspec: %s\n'    ,string_cell(dm(i).ghspec)));
    854    
     854
    855855%  display the parameters within the object
    856856
     
    860860                    maxlen=max(maxlen,length(fnames{j}));
    861861                end
    862    
     862
    863863                for j=1:numel(fnames)
    864864                    disp(sprintf(['       params.%-' num2str(maxlen+1) 's: %s'],...
     
    870870    end
    871871end
    872 
  • issm/trunk-jpl/src/m/classes/qmu/@dakota_method/dmeth_params_write.m

    r5424 r13646  
    4646                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
    4747        end
    48        
     48
    4949    case {'npsol'}
    5050        param_write(fid,sbeg,'max_iterations','           = ','\n',dm.params);
     
    6464                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
    6565        end
    66        
     66
    6767    case {'conmin'}
    6868        param_write(fid,sbeg,'max_iterations','           = ','\n',dm.params);
     
    8080                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
    8181        end
    82        
     82
    8383    case {'optpp'}
    8484        param_write(fid,sbeg,'max_iterations','           = ','\n',dm.params);
     
    120120                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
    121121        end
    122        
     122
    123123    case {'apps'}
    124124        param_write(fid,sbeg,'max_function_evaluations',' = ','\n',dm.params);
     
    140140                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
    141141        end
    142        
     142
    143143    case {'coliny'}
    144144        param_write(fid,sbeg,'max_iterations','           = ','\n',dm.params);
     
    212212                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
    213213        end
    214        
     214
    215215    case {'ncsu'}
    216216        param_write(fid,sbeg,'max_iterations','           = ','\n',dm.params);
     
    226226                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
    227227        end
    228        
     228
    229229    case {'jega'}
    230230        param_write(fid,sbeg,'max_iterations','           = ','\n',dm.params);
     
    282282                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
    283283        end
    284        
     284
    285285    case {'lsq'}
    286286        switch dm.method
     
    344344                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
    345345        end
    346        
     346
    347347    case {'nond'}
    348348        switch dm.method
     
    426426                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
    427427        end
    428        
     428
    429429    case {'dace'}
    430430        switch dm.method
     
    484484                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
    485485        end
    486        
     486
    487487    case {'param'}
    488488        param_write(fid,sbeg,'output',' ','\n',dm.params);
     
    512512            case {'multidim_parameter_study'}
    513513                param_write(fid,sbeg,'partitions',' = ','\n',dm.params);
    514            
     514
    515515            otherwise
    516516                error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method);
  • issm/trunk-jpl/src/m/classes/qmu/continuous_design.m

    r9548 r13646  
    3939        scale     = 1.;
    4040    end
    41    
     41
    4242    methods
    4343        function [cdv]=continuous_design(varargin)
     
    6565                    cdv(asizec{:})=continuous_design;
    6666                    clear asizec
    67                    
     67
    6868                    if ischar(varargin{1})
    6969                        varargin{1}=cellstr(varargin{1});
     
    212212        end
    213213    end
    214    
     214
    215215    methods (Static)
    216216        function []=dakota_write(fidi,dvar)
  • issm/trunk-jpl/src/m/classes/qmu/continuous_state.m

    r9548 r13646  
    3535        upper     = Inf;
    3636    end
    37    
     37
    3838    methods
    3939        function [csv]=continuous_state(varargin)
     
    6161                    csv(asizec{:})=continuous_state;
    6262                    clear asizec
    63                    
     63
    6464                    if ischar(varargin{1})
    6565                        varargin{1}=cellstr(varargin{1});
     
    177177        end
    178178    end
    179    
     179
    180180    methods (Static)
    181181        function []=dakota_write(fidi,dvar)
  • issm/trunk-jpl/src/m/classes/qmu/least_squares_term.m

    r9548 r13646  
    3535        weight    = 1.;
    3636    end
    37    
     37
    3838    methods
    3939        function [lst]=least_squares_term(varargin)
     
    5454                        lst(asizec{:})=least_squares_term;
    5555                        clear asizec
    56                    
     56
    5757                        if ischar(varargin{1})
    5858                            varargin{1}=cellstr(varargin{1});
     
    169169        end
    170170    end
    171    
     171
    172172    methods (Static)
    173173        function [rdesc]=dakota_write(fidi,dresp,rdesc)
  • issm/trunk-jpl/src/m/classes/qmu/linear_equality_constraint.m

    r9548 r13646  
    3535        scale     = 1.;
    3636    end
    37    
     37
    3838    methods
    3939        function [lec]=linear_equality_constraint(varargin)
     
    6969                    lec(asizec{:})=linear_equality_constraint;
    7070                    clear asizec
    71                    
     71
    7272                    for i=1:numel(lec)
    7373                        if (size(varargin{1},1) > 1)
     
    167167        end
    168168    end
    169    
     169
    170170    methods (Static)
    171171        function []=dakota_write(fidi,dvar)
  • issm/trunk-jpl/src/m/classes/qmu/linear_inequality_constraint.m

    r9548 r13646  
    3737        scale     = 1.;
    3838    end
    39    
     39
    4040    methods
    4141        function [lic]=linear_inequality_constraint(varargin)
     
    7777                    lic(asizec{:})=linear_inequality_constraint;
    7878                    clear asizec
    79                    
     79
    8080                    for i=1:numel(lic)
    8181                        if (size(varargin{1},1) > 1)
     
    189189        end
    190190    end
    191    
     191
    192192    methods (Static)
    193193        function []=dakota_write(fidi,dvar)
     
    203203    end
    204204end
    205 
  • issm/trunk-jpl/src/m/classes/qmu/nonlinear_equality_constraint.m

    r9548 r13646  
    3535        scale     = 1.;
    3636    end
    37    
     37
    3838    methods
    3939        function [nec]=nonlinear_equality_constraint(varargin)
     
    6161                    nec(asizec{:})=nonlinear_equality_constraint;
    6262                    clear asizec
    63                    
     63
    6464                    if ischar(varargin{1})
    6565                        varargin{1}=cellstr(varargin{1});
     
    171171        end
    172172    end
    173    
     173
    174174    methods (Static)
    175175        function [rdesc]=dakota_write(fidi,dresp,rdesc)
  • issm/trunk-jpl/src/m/classes/qmu/nonlinear_inequality_constraint.m

    r9548 r13646  
    3737        scale     = 1.;
    3838    end
    39    
     39
    4040    methods
    4141        function [nic]=nonlinear_inequality_constraint(varargin)
     
    6969                    nic(asizec{:})=nonlinear_inequality_constraint;
    7070                    clear asizec
    71                    
     71
    7272                    if ischar(varargin{1})
    7373                        varargin{1}=cellstr(varargin{1});
     
    189189        end
    190190    end
    191    
     191
    192192    methods (Static)
    193193        function [rdesc]=dakota_write(fidi,dresp,rdesc)
  • issm/trunk-jpl/src/m/classes/qmu/normal_uncertain.m

    r9548 r13646  
    3737        upper     = Inf;
    3838    end
    39    
     39
    4040    methods
    4141        function [nuv]=normal_uncertain(varargin)
     
    6969                    nuv(asizec{:})=normal_uncertain;
    7070                    clear asizec
    71                    
     71
    7272                    if ischar(varargin{1})
    7373                        varargin{1}=cellstr(varargin{1});
     
    193193        end
    194194    end
    195    
     195
    196196    methods (Static)
    197197        function []=dakota_write(fidi,dvar)
  • issm/trunk-jpl/src/m/classes/qmu/objective_function.m

    r9548 r13646  
    3535        weight    = 1.;
    3636    end
    37    
     37
    3838    methods
    3939        function [of]=objective_function(varargin)
     
    5454                        of(asizec{:})=objective_function;
    5555                        clear asizec
    56                    
     56
    5757                        if ischar(varargin{1})
    5858                            varargin{1}=cellstr(varargin{1});
     
    169169        end
    170170    end
    171    
     171
    172172    methods (Static)
    173173        function [rdesc]=dakota_write(fidi,dresp,rdesc)
  • issm/trunk-jpl/src/m/classes/qmu/response_function.m

    r9548 r13646  
    3737        grell     =[];
    3838    end
    39    
     39
    4040    methods
    4141        function [rf]=response_function(varargin)
     
    5656                        rf(asizec{:})=response_function;
    5757                        clear asizec
    58                    
     58
    5959                        if ischar(varargin{1})
    6060                            varargin{1}=cellstr(varargin{1});
     
    166166        end
    167167    end
    168    
     168
    169169    methods (Static)
    170170        function [rdesc]=dakota_write(fidi,dresp,rdesc)
     
    178178            [rdesc]=rlist_write(fidi,'response_functions','response_function',rf,rdesc);
    179179        end
    180        
     180
    181181        function []=dakota_rlev_write(fidi,dresp,params)
    182182
  • issm/trunk-jpl/src/m/classes/qmu/uniform_uncertain.m

    r9548 r13646  
    3232        upper     = Inf;
    3333    end
    34    
     34
    3535    methods
    3636        function [uuv]=uniform_uncertain(varargin)
     
    6464                    uuv(asizec{:})=uniform_uncertain;
    6565                    clear asizec
    66                    
     66
    6767                    if ischar(varargin{1})
    6868                        varargin{1}=cellstr(varargin{1});
     
    152152        end
    153153    end
    154    
     154
    155155    methods (Static)
    156156        function []=dakota_write(fidi,dvar)
  • issm/trunk-jpl/src/m/classes/surfaceforcings.m

    r13521 r13646  
    3737                end % }}}
    3838                function obj = setdefaultparameters(obj) % {{{
    39                  
     39
    4040                  %pdd method not used in default mode
    4141                  obj.ispdd=0;
  • issm/trunk-jpl/src/m/classes/verbose.m

    r13435 r13646  
    109109                end % }}}
    110110                function disp(verbose) % {{{
    111                        
     111
    112112                %BEGINDISP
    113113                disp(sprintf('class ''%s''  = ',class(verbose)));
  • issm/trunk-jpl/src/m/consistency/ismodelselfconsistent.m

    r13043 r13646  
    4646%   Usage:
    4747%      [analyses, numanalyses]=AnalysisConfiguration(solutiontype);
    48 
    49 
    5048
    5149switch solutiontype,
  • issm/trunk-jpl/src/m/contrib/bamg/YamsCall.m

    r13170 r13646  
    5353fprintf(fid,'%i %i %i %i\n',[md.mesh.elements zeros(md.mesh.numberofelements,1)]');
    5454numberofelements1=md.mesh.numberofelements;
    55        
     55
    5656%Deal with rifts
    5757if ~isnan(md.rifts.riftstruct),
    58        
     58
    5959        %we have the list of triangles that make up the rift. keep those triangles around during refinement.
    6060        triangles=[];
  • issm/trunk-jpl/src/m/contrib/bamg/yams.m

    r13012 r13646  
    102102
    103103end
    104        
     104
    105105disp(['Final mesh, number of elements: ' num2str(md.mesh.numberofelements)]);
    106106
  • issm/trunk-jpl/src/m/contrib/uci/expremovestraightsegments.m

    r13010 r13646  
    1111for i=1:length(a),
    1212        contour=a(i);
    13        
     13
    1414        s=sqrt(contour.x.^2+contour.y.^2);
    1515        d=diff(s);
    16        
     16
    1717        pos=find(abs(d)>cutoff);
    1818        pos=[0;pos;length(contour.x)];
  • issm/trunk-jpl/src/m/exp/expcontract.m

    r12691 r13646  
    66%
    77%   See also EXPMASTER, EXPDOC
    8 
    98
    109contour=expread(oldfile);
  • issm/trunk-jpl/src/m/exp/expcreatecontour.m

    r13010 r13646  
    3434%write contour using expwrite
    3535expwrite(a,filename);
    36 
  • issm/trunk-jpl/src/m/exp/expexcludeoutliers.m

    r13010 r13646  
    77%
    88%   See also EXPMASTER, EXPDOC
    9 
    109
    1110contour=expread(contourname);
  • issm/trunk-jpl/src/m/exp/expflip.m

    r5453 r13646  
    55%
    66%
    7 
    8 
    9 
    10 
    117
    128a=expread(domainname,1);
  • issm/trunk-jpl/src/m/exp/expll2xy.m

    r12570 r13646  
    55%      - sgn = Sign of latitude +1 : north latitude (default is mer=45 lat=70)
    66%                               -1 : south latitude (default is mer=0  lat=71)
    7 
    87
    98%Get central_meridian and standard_parallel depending on hemisphere
  • issm/trunk-jpl/src/m/exp/expswapxy.m

    r8469 r13646  
    66%
    77%   See also EXPMASTER, EXPDOC
    8 
    98
    109contours=expread(filename,1);
  • issm/trunk-jpl/src/m/exp/exptool.m

    r13026 r13646  
    308308                        backup{counter,4}=closed;
    309309
    310 
    311310                case 12
    312311
  • issm/trunk-jpl/src/m/exp/expwrite.m

    r13341 r13646  
    2020                error('contours x and y coordinates must be of identical size');
    2121        end
    22    
     22
    2323        if isfield(a,'name'),
    2424                if ~isempty(a(n).name),
     
    3030                fprintf(fid,'%s\n','## Name:');
    3131        end
    32    
     32
    3333        fprintf(fid,'%s\n','## Icon:0');
    3434        fprintf(fid,'%s\n','# Points Count Value');
  • issm/trunk-jpl/src/m/exp/expxy2ll.m

    r12570 r13646  
    55%      - sgn = Sign of latitude +1 : north latitude (default is mer=45 lat=70)
    66%                               -1 : south latitude (default is mer=0  lat=71)
    7 
    87
    98%Get central_meridian and standard_parallel depending on hemisphere
  • issm/trunk-jpl/src/m/exp/manipulation/addcontour.m

    r8662 r13646  
    77%   Usage:
    88%      [A,numprofiles,numpoints,closed]=addcontour(A,numprofiles,numpoints,closed,prevplot,root,options)
    9                    
     9
    1010        title('click to add a point to the new profile, RETURN to exit','FontSize',14)
    1111        hold on
     
    1818
    1919                [xi,yi] = ginput(1);
    20                                          
     20
    2121                if ~isempty(xi)
    2222                        x(end+1,1)=xi;
  • issm/trunk-jpl/src/m/exp/manipulation/addendprofile.m

    r8662 r13646  
    77%   Usage:
    88%      [A,numprofiles,numpoints,closed]=addendprofile(A,numprofiles,numpoints,closed,prevplot,root,options)
    9                
     9
    1010        %some checks
    1111        if numprofiles==0
  • issm/trunk-jpl/src/m/exp/manipulation/addinsideprofile.m

    r8662 r13646  
    77%   Usage:
    88%      [A,numprofiles,numpoints,closed]=addinsideprofile(A,numprofiles,numpoints,closed,prevplot,root,options)
    9                
     9
    1010        %some checks
    1111        if numprofiles==0
  • issm/trunk-jpl/src/m/exp/manipulation/addprofile.m

    r8662 r13646  
    77%   Usage:
    88%      [A,numprofiles,numpoints,closed]=addprofile(A,numprofiles,numpoints,closed,prevplot,root,options)
    9                    
     9
    1010        title('click to add a point to the new profile, RETURN to exit','FontSize',14)
    1111        hold on
     
    1818
    1919                [xi,yi] = ginput(1);
    20                                          
     20
    2121                if ~isempty(xi)
    2222                        x(end+1,1)=xi;
  • issm/trunk-jpl/src/m/exp/manipulation/closeprofile.m

    r8662 r13646  
    1313                return
    1414        end
    15                    
     15
    1616        title('click on the profiles to be closed, RETURN to exit','FontSize',14)
    1717        hold on
     
    3333
    3434                [xi,yi] = ginput(1);
    35                                          
     35
    3636                if ~isempty(xi)
    3737
  • issm/trunk-jpl/src/m/exp/manipulation/cutarea.m

    r12617 r13646  
    1010%   Usage:
    1111%      [A,numprofiles,numpoints,closed]=cutarea(A,numprofiles,numpoints,closed,prevplot,root,options)
    12                
     12
    1313        hold on
    1414        loop=1;
  • issm/trunk-jpl/src/m/exp/manipulation/cutprofile.m

    r8662 r13646  
    77%   Usage:
    88%      [A,numprofiles,numpoints,closed]=cutprofile(A,numprofiles,numpoints,closed,prevplot,root,options)
    9                
     9
    1010        %some checks
    1111        if numprofiles==0
  • issm/trunk-jpl/src/m/exp/manipulation/modifyposition.m

    r8662 r13646  
    77%   Usage:
    88%      [A,numprofiles,numpoints,closed]=modifyposition(A,numprofiles,numpoints,closed,prevplot,root,options)
    9                
     9
    1010        %some checks
    1111        if numprofiles==0
  • issm/trunk-jpl/src/m/exp/manipulation/orientprofile.m

    r13026 r13646  
    2121                        return
    2222                end
    23                    
     23
    2424                [xi,yi] = ginput(1);
    25                                          
     25
    2626                if ~isempty(xi)
    2727
  • issm/trunk-jpl/src/m/exp/manipulation/removepoints.m

    r8662 r13646  
    77%   Usage:
    88%      [A,numprofiles,numpoints,closed]=removepoints(A,numprofiles,numpoints,closed,prevplot,root,options)
    9                
     9
    1010        %some checks
    1111        if numprofiles==0
  • issm/trunk-jpl/src/m/exp/manipulation/removeprofile.m

    r8662 r13646  
    2121                        return
    2222                end
    23                    
     23
    2424                [xi,yi] = ginput(1);
    25                                          
     25
    2626                if ~isempty(xi)
    2727
  • issm/trunk-jpl/src/m/exp/manipulation/removeseveralpoints.m

    r8662 r13646  
    77%   Usage:
    88%      [A,numprofiles,numpoints,closed]=removeseveralpoints(A,numprofiles,numpoints,closed,prevplot,root,options)
    9                
     9
    1010        %some checks
    1111        if numprofiles==0
  • issm/trunk-jpl/src/m/geometry/SegIntersect.m

    r13351 r13646  
    4949        O1C=O2O1'*O1C;
    5050        O1D=O2O1'*O1D;
    51        
     51
    5252        %test if one point is included in the other segment (->bval=1)
    5353        if (O1C-O1A)*(O1D-O1A)<0
  • issm/trunk-jpl/src/m/interp/SectionValues.m

    r13008 r13646  
    2222        y=infile.y;
    2323end
    24 
    2524
    2625%get the specified resolution
  • issm/trunk-jpl/src/m/inversions/parametercontrolB.m

    r13006 r13646  
    3838        md.inversion.nsteps=nsteps;
    3939end
    40 
    4140
    4241%cm_min
  • issm/trunk-jpl/src/m/kml/edgeadjacency.m

    r6312 r13646  
    3131        inode1=elem(i,j);
    3232        inode2=elem(i,mod(j,size(elem,2))+1);
    33        
     33
    3434%  loop over the elements containing the first node of the edge to see
    3535%  if they contain the second node of the edge
  • issm/trunk-jpl/src/m/kml/exp2kml.m

    r12997 r13646  
    66%
    77
    8 
    98%First, read exp file
    109domain=expread(input);
    11 
    1210
    1311%then transform:
  • issm/trunk-jpl/src/m/kml/kml2exp.m

    r12997 r13646  
    66%
    77
    8 
    9 
    10 
    118%First, read polygon kml file.
    129structure=kml_shapefile(input);
    13        
     10
    1411%create exp file:
    1512domain=struct();
  • issm/trunk-jpl/src/m/kml/kml_colorstyle.m

    r7460 r13646  
    1818        colormode ='normal';
    1919    end
    20    
     20
    2121    methods
    2222        function [kml]=kml_colorstyle(varargin)
     
    160160
    161161        end
    162        
     162
    163163%  string write the object
    164164
     
    196196
    197197        end
    198        
     198
    199199    end
    200    
     200
    201201end
    202 
  • issm/trunk-jpl/src/m/kml/kml_container.m

    r7460 r13646  
    2121    properties
    2222    end
    23    
     23
    2424    methods
    2525        function [kml]=kml_container(varargin)
     
    150150
    151151        end
    152        
     152
    153153%  string write the object
    154154
     
    180180
    181181        end
    182        
     182
    183183%  delete the object
    184184
     
    193193
    194194        end
    195        
     195
    196196    end
    197    
     197
    198198end
    199 
  • issm/trunk-jpl/src/m/kml/kml_document.m

    r7460 r13646  
    2323        feature   ={};
    2424    end
    25    
     25
    2626    methods
    2727        function [kml]=kml_document(varargin)
     
    162162
    163163        end
    164        
     164
    165165%  string write the object
    166166
     
    202202
    203203        end
    204        
     204
    205205%  delete the object
    206206
     
    230230
    231231        end
    232        
     232
    233233    end
    234    
     234
    235235end
    236 
  • issm/trunk-jpl/src/m/kml/kml_feature.m

    r7460 r13646  
    2828        style     ={};
    2929    end
    30    
     30
    3131    methods
    3232        function [kml]=kml_feature(varargin)
     
    204204
    205205        end
    206        
     206
    207207%  string write the object
    208208
     
    262262
    263263        end
    264        
     264
    265265%  delete the object
    266266
     
    289289
    290290        end
    291        
     291
    292292    end
    293    
     293
    294294end
    295 
  • issm/trunk-jpl/src/m/kml/kml_file_swrite.m

    r7418 r13646  
    130130
    131131end
    132 
  • issm/trunk-jpl/src/m/kml/kml_file_write.m

    r7270 r13646  
    124124
    125125end
    126 
  • issm/trunk-jpl/src/m/kml/kml_folder.m

    r7460 r13646  
    2323        feature   ={};
    2424    end
    25    
     25
    2626    methods
    2727        function [kml]=kml_folder(varargin)
     
    162162
    163163        end
    164        
     164
    165165%  string write the object
    166166
     
    202202
    203203        end
    204        
     204
    205205%  delete the object
    206206
     
    230230
    231231        end
    232        
     232
    233233    end
    234    
     234
    235235end
    236 
  • issm/trunk-jpl/src/m/kml/kml_geometry.m

    r7460 r13646  
    1414    properties
    1515    end
    16    
     16
    1717    methods
    1818        function [kml]=kml_geometry(varargin)
     
    143143
    144144        end
    145        
     145
    146146%  string write the object
    147147
     
    173173
    174174        end
    175        
     175
    176176    end
    177    
     177
    178178end
    179 
  • issm/trunk-jpl/src/m/kml/kml_linearring.m

    r7461 r13646  
    2222        coords    =zeros(0,3);
    2323    end
    24    
     24
    2525    methods
    2626        function [kml]=kml_linearring(varargin)
     
    165165
    166166        end
    167        
     167
    168168%  string write the object
    169169
     
    203203
    204204        end
    205        
     205
    206206    end
    207    
     207
    208208end
    209 
  • issm/trunk-jpl/src/m/kml/kml_linestring.m

    r7460 r13646  
    2222        coords    =zeros(0,3);
    2323    end
    24    
     24
    2525    methods
    2626        function [kml]=kml_linestring(varargin)
     
    165165
    166166        end
    167        
     167
    168168%  string write the object
    169169
     
    203203
    204204        end
    205        
     205
    206206    end
    207    
     207
    208208end
    209 
  • issm/trunk-jpl/src/m/kml/kml_linestyle.m

    r7460 r13646  
    1818        width     =1;
    1919    end
    20    
     20
    2121    methods
    2222        function [kml]=kml_linestyle(varargin)
     
    143143
    144144        end
    145        
     145
    146146%  string write the object
    147147
     
    170170
    171171        end
    172        
     172
    173173    end
    174    
     174
    175175end
    176 
  • issm/trunk-jpl/src/m/kml/kml_mesh_elem.m

    r9733 r13646  
    100100cmap=colormap;
    101101close(hfig)
    102    
     102
    103103if exist('edata','var')
    104104    if ~exist('cmin','var')
     
    175175
    176176end
    177 
  • issm/trunk-jpl/src/m/kml/kml_mesh_write.m

    r9733 r13646  
    193193    cmap=colormap;
    194194    close(hfig)
    195    
     195
    196196    disp(['Writing ' num2str(size(cmap,1)) ' Matlab colors as KML style templates.']);
    197197    for i=1:size(cmap,1)
     
    259259
    260260end
    261 
  • issm/trunk-jpl/src/m/kml/kml_multigeometry.m

    r7460 r13646  
    1616        geometry  ={};
    1717    end
    18    
     18
    1919    methods
    2020        function [kml]=kml_multigeometry(varargin)
     
    156156
    157157        end
    158        
     158
    159159%  string write the object
    160160
     
    197197
    198198        end
    199        
     199
    200200%  delete the object
    201201
     
    225225
    226226        end
    227        
     227
    228228    end
    229    
     229
    230230end
    231 
  • issm/trunk-jpl/src/m/kml/kml_object.m

    r7460 r13646  
    1515        id        ='';
    1616    end
    17    
     17
    1818    methods
    1919        function [kml]=kml_object(varargin)
     
    144144
    145145        end
    146        
     146
    147147%  string write the object
    148148
     
    174174
    175175        end
    176        
     176
    177177    end
    178    
     178
    179179end
    180 
  • issm/trunk-jpl/src/m/kml/kml_part_edges.m

    r12028 r13646  
    101101cmap=colormap;
    102102close(hfig)
    103    
     103
    104104if exist('edata','var')
    105105    if ~exist('cmin','var')
     
    139139    for k=1:md.qmu.numberofpartitions
    140140%        disp(['partition k=' int2str(k)])
    141        
     141
    142142%  for each partition, find all the included elements and determine the
    143143%  perimeter (including those shared by another partition)
     
    154154        [edgeper,elemper,iloop]=edgeperimeter(elemp,nodeconp,edgeadjp);
    155155        iloop(end+1)=size(edgeper,1)+1;
    156        
     156
    157157%  determine the data to be used for the colors (if any)
    158158
     
    170170            end
    171171        end
    172        
     172
    173173%  set up the placemark with multigeometry
    174174
     
    211211            lat=[];
    212212            long=[];
    213            
     213
    214214%  loop over the element edges on the loop of the partition
    215215
     
    241241                    slast=0;
    242242                    j=j+1;
    243                    
     243
    244244%  element not entirely within partition, so figure out boundary
    245245                else
     
    327327                            end
    328328                            nlast=0;
    329                            
     329
    330330%  write out midpoint of first side
    331331                            kline.coords(end+1,:)=[(md.mesh.long(elemp(ielem,slast))...
     
    481481
    482482end
    483 
  • issm/trunk-jpl/src/m/kml/kml_part_elems.m

    r9733 r13646  
    101101cmap=colormap;
    102102close(hfig)
    103    
     103
    104104if exist('edata','var')
    105105    if ~exist('cmin','var')
     
    215215
    216216end
    217 
  • issm/trunk-jpl/src/m/kml/kml_part_flagedges.m

    r9733 r13646  
    108108
    109109end
    110 
  • issm/trunk-jpl/src/m/kml/kml_partitions.m

    r12028 r13646  
    102102cmap=colormap;
    103103close(hfig)
    104    
     104
    105105if exist('edata','var')
    106106    if ~exist('cmin','var')
     
    140140    for k=1:md.qmu.numberofpartitions
    141141%        disp(['partition k=' int2str(k)])
    142        
     142
    143143%  for each partition, find all the included elements and determine the
    144144%  perimeter (including those shared by another partition)
     
    171171            end
    172172        end
    173        
     173
    174174%  set up the placemark with multigeometry
    175175
     
    197197        kmgeom=kml_multigeometry();
    198198        kmgeom.geometry  ={repmat(kml_polygon(),1,length(iloop)-1)};
    199        
     199
    200200%  loop over each loop of the perimeter for the given partition
    201201
     
    213213            lat=[];
    214214            long=[];
    215            
     215
    216216%  loop over the element edges on the loop of the partition
    217217
     
    243243                    slast=0;
    244244                    j=j+1;
    245                    
     245
    246246%  element not entirely within partition, so figure out boundary
    247247                else
     
    329329                            end
    330330                            nlast=0;
    331                            
     331
    332332%  write out midpoint of first side
    333333                            kring.coords(end+1,:)=[(md.mesh.long(elemp(ielem,slast))...
     
    484484
    485485end
    486 
  • issm/trunk-jpl/src/m/kml/kml_placemark.m

    r7460 r13646  
    2323        geometry  =kml_geometry.empty();
    2424    end
    25    
     25
    2626    methods
    2727        function [kml]=kml_placemark(varargin)
     
    163163
    164164        end
    165        
     165
    166166%  string write the object
    167167
     
    204204
    205205        end
    206        
     206
    207207%  delete the object
    208208
     
    233233
    234234        end
    235        
     235
    236236    end
    237    
     237
    238238end
    239 
  • issm/trunk-jpl/src/m/kml/kml_polygon.m

    r7460 r13646  
    2424        inner     =kml_linearring.empty();
    2525    end
    26    
     26
    2727    methods
    2828        function [kml]=kml_polygon(varargin)
     
    183183
    184184        end
    185        
     185
    186186%  string write the object
    187187
     
    234234
    235235        end
    236        
     236
    237237%  delete the object
    238238
     
    266266
    267267        end
    268        
     268
    269269    end
    270    
     270
    271271end
    272 
  • issm/trunk-jpl/src/m/kml/kml_polystyle.m

    r7460 r13646  
    2020        outline   =true;
    2121    end
    22    
     22
    2323    methods
    2424        function [kml]=kml_polystyle(varargin)
     
    148148
    149149        end
    150        
     150
    151151%  string write the object
    152152
     
    176176
    177177        end
    178        
     178
    179179    end
    180    
     180
    181181end
    182 
  • issm/trunk-jpl/src/m/kml/kml_style.m

    r7460 r13646  
    3030        list      =[];
    3131    end
    32    
     32
    3333    methods
    3434        function [kml]=kml_style(varargin)
     
    206206
    207207        end
    208        
     208
    209209%  string write the object
    210210
     
    268268
    269269        end
    270        
     270
    271271%  delete the object
    272272
     
    322322
    323323        end
    324        
     324
    325325    end
    326    
     326
    327327end
    328 
  • issm/trunk-jpl/src/m/kml/kml_styleselector.m

    r7460 r13646  
    1414    properties
    1515    end
    16    
     16
    1717    methods
    1818        function [kml]=kml_styleselector(varargin)
     
    143143
    144144        end
    145        
     145
    146146%  string write the object
    147147
     
    173173
    174174        end
    175        
     175
    176176    end
    177    
     177
    178178end
    179 
  • issm/trunk-jpl/src/m/kml/kml_substyle.m

    r7460 r13646  
    1414    properties
    1515    end
    16    
     16
    1717    methods
    1818        function [kml]=kml_substyle(varargin)
     
    143143
    144144        end
    145        
     145
    146146%  string write the object
    147147
     
    173173
    174174        end
    175        
     175
    176176    end
    177    
     177
    178178end
    179 
  • issm/trunk-jpl/src/m/kml/kml_unsh_edges.m

    r12028 r13646  
    114114
    115115end
    116 
  • issm/trunk-jpl/src/m/kml/string_buf.m

    r7336 r13646  
    173173
    174174        end
    175        
     175
    176176%  reset the object
    177177
     
    183183
    184184        end
    185        
     185
    186186    end
    187    
     187
    188188end
    189 
  • issm/trunk-jpl/src/m/mech/basalstress.m

    r13005 r13646  
    66%
    77%   See also: plot_basaldrag
    8 
    98
    109%compute exponents
  • issm/trunk-jpl/src/m/mesh/FixMesh.m

    r13012 r13646  
    3232        %now, the index:
    3333        pos=find(index2>orphan); index2(pos)=index2(pos)-1;
    34        
     34
    3535        %look again for orphans on new mesh
    3636        flags=zeros(length(x2),1);flags(index2)=1;
  • issm/trunk-jpl/src/m/mesh/NodeInElement.m

    r13012 r13646  
    2525        x0=newx(i);
    2626        y0=newy(i);
    27        
     27
    2828        %first area coordinate
    2929        area_1=(y3y2.*(x0-x3)-x3x2.*(y0-y3))./delta;
     
    3232        %third area coordinate
    3333        area_3=1-area_1-area_2;
    34        
     34
    3535        %get elements for which all area coordinates are positive (meaning (x0,y0) belongs to these elements
    3636        pos=find((area_1>=0-epsilon) & (area_2>=0-epsilon) & (area_3>=0-epsilon));
  • issm/trunk-jpl/src/m/mesh/bamg.m

    r13495 r13646  
    236236                requiredvertices=double(getfieldvalue(options,'RequiredVertices')); %for some reason, it is of class "single"
    237237                if(size(requiredvertices,2)==2), requiredvertices=[requiredvertices 4.*ones(size(requiredvertices,1),1)]; end
    238        
     238
    239239                %only keep those inside
    240240                flags=ContourToNodes(requiredvertices(:,1),requiredvertices(:,2),domain(1),0);
  • issm/trunk-jpl/src/m/mesh/planet/mesh_refine_tri4.m

    r12913 r13646  
    2929%
    3030
    31 
    3231% ---this method is not implemented, but the idea here remains...
    3332% This can be done until some minimal distance (D) of the mean
     
    3635% Alternatively, it could be done until some minimum mean
    3736% area of faces is achieved.  As is, it just refines once.
    38 
    3937
    4038% $Revision: 1.1 $ $Date: 2004/11/12 01:32:35 $
     
    8078
    8179for f = 1:Nface,
    82    
     80
    8381    % Get the triangle vertex indices
    8482    NA = FV.faces(f,1);
    8583    NB = FV.faces(f,2);
    8684    NC = FV.faces(f,3);
    87    
     85
    8886    % Get the triangle vertex coordinates
    8987    A = FV.vertices(NA,:);
    9088    B = FV.vertices(NB,:);
    9189    C = FV.vertices(NC,:);
    92    
     90
    9391    % Now find the midpoints between vertices
    9492    a = (A + B) ./ 2;
    9593    b = (B + C) ./ 2;
    9694    c = (C + A) ./ 2;
    97    
     95
    9896    % Find the length of each median
    9997    %A2blen = sqrt ( sum( (A - b).^2, 2 ) );
    10098    %B2clen = sqrt ( sum( (B - c).^2, 2 ) );
    10199    %C2alen = sqrt ( sum( (C - a).^2, 2 ) );
    102    
     100
    103101    % Store the midpoint vertices, while
    104102    % checking if midpoint vertex already exists
     
    106104    [FV, Nb] = mesh_find_vertex(FV,b);
    107105    [FV, Nc] = mesh_find_vertex(FV,c);
    108    
     106
    109107    % Create new faces with orig vertices plus midpoints
    110108    F2(f*4-3,:) = [ NA, Na, Nc ];
     
    112110    F2(f*4-1,:) = [ Nc, Nb, NC ];
    113111    F2(f*4-0,:) = [ Na, Nb, Nc ];
    114    
     112
    115113end
    116114
     
    121119
    122120return
    123 
    124121
    125122%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  • issm/trunk-jpl/src/m/mesh/planet/planetmixedmesh.m

    r12981 r13646  
    3333        for j=1:nthetha-1,
    3434                count=(i-1)*(nthetha-1)+j;
    35        
     35
    3636                A=(i-1)*nthetha+j;
    3737                B=(i-1)*nthetha+j+1;
    3838                C=(i)*nthetha+j+1;
    3939                D=(i)*nthetha+j;
    40                
     40
    4141                quads(count,:)=[A B C D];
    4242        end
     
    6464quads=[trias;quads];
    6565
    66 
    6766% now add south pole:
    6867phii=180*conv;
     
    8584quads=[quads;trias];
    8685
    87 
    8886md.mesh.elements=quads;
    8987md.mesh.x=x;
  • issm/trunk-jpl/src/m/mesh/planet/sphere_project.m

    r12913 r13646  
    5050% use of arctan functions, which have branches.
    5151
    52 
    5352% Convert Cartesian X,Y,Z to spherical (radians)
    5453theta = atan2( (Y-yo), (X-xo) );
  • issm/trunk-jpl/src/m/mesh/planet/sphere_tri.m

    r12913 r13646  
    4343% See also: mesh_refine, sphere_project
    4444%
    45 
    46 
    4745
    4846% $Revision: 1.2 $ $Date: 2005/07/20 23:07:03 $
     
    8078end
    8179
    82 
    8380% -----------------
    8481% define the starting shapes
     
    8885switch shape,
    8986case 'tetra',
    90    
     87
    9188    % Vertices of a tetrahedron
    9289    sqrt_3 = 0.5773502692;
    93    
     90
    9491    tetra.v = [  sqrt_3,  sqrt_3,  sqrt_3 ;   % +X, +Y, +Z  - PPP
    9592                -sqrt_3, -sqrt_3,  sqrt_3 ;   % -X, -Y, +Z  - MMP
    9693                -sqrt_3,  sqrt_3, -sqrt_3 ;   % -X, +Y, -Z  - MPM
    9794                 sqrt_3, -sqrt_3, -sqrt_3 ];  % +X, -Y, -Z  - PMM
    98        
     95
    9996    % Structure describing a tetrahedron
    10097    tetra.f = [ 1, 2, 3;
     
    10299                3, 2, 4;
    103100                4, 1, 3 ];
    104    
     101
    105102    FV.vertices = tetra.v;
    106103    FV.faces    = tetra.f;
    107    
     104
    108105case 'oct',
    109    
     106
    110107    % Six equidistant points lying on the unit sphere
    111108    oct.v = [  1,  0,  0 ;  %  X
     
    115112               0,  0,  1 ;      %  Z
    116113               0,  0, -1 ];     % -Z
    117        
     114
    118115    % Join vertices to create a unit octahedron
    119116    oct.f = [ 1 5 3 ;    %  X  Z  Y  -  First the top half
     
    125122              2 4 6 ;    % -X  Z -Z
    126123              4 1 6 ];   % -Y  Z -Z
    127    
     124
    128125    FV.vertices = oct.v;
    129126    FV.faces    = oct.f;
    130    
     127
    131128case 'ico',
    132    
     129
    133130    % Twelve vertices of icosahedron on unit sphere
    134131    tau = 0.8506508084; % t=(1+sqrt(5))/2, tau=t/sqrt(1+t^2)
    135132    one = 0.5257311121; % one=1/sqrt(1+t^2) , unit sphere
    136    
     133
    137134    ico.v( 1,:) = [  tau,  one,    0 ]; % ZA
    138135    ico.v( 2,:) = [ -tau,  one,    0 ]; % ZB
     
    147144    ico.v(11,:) = [   0 , -tau, -one ]; % XC
    148145    ico.v(12,:) = [   0 ,  tau, -one ]; % XD
    149    
     146
    150147    % Structure for unit icosahedron
    151148    ico.f = [  5,  8,  9 ;
     
    169166               8, 10,  3 ;
    170167               7,  3, 11 ];
    171        
     168
    172169    FV.vertices = ico.v;
    173170    FV.faces    = ico.f;
    174171end
    175 
    176172
    177173% -----------------
    178174% refine the starting shapes with subdivisions
    179175if maxlevel,
    180    
     176
    181177    % Subdivide each starting triangle (maxlevel) times
    182178    for level = 1:maxlevel,
    183        
     179
    184180        % Subdivide each triangle and normalize the new points thus
    185181        % generated to lie on the surface of a sphere radius r.
    186182        FV = mesh_refine_tri4(FV);
    187183        FV.vertices = sphere_project(FV.vertices,r);
    188        
     184
    189185        % An alternative might be to define a min distance
    190186        % between vertices and recurse or use fminsearch
    191        
     187
    192188    end
    193189end
  • issm/trunk-jpl/src/m/mesh/rifts/meshaddrifts.m

    r9736 r13646  
    1212%        be preserved. There can be as many pairs of closed contour and rift contour as wished.
    1313
    14 
    1514%read rift:
    1615domains=expread(riftname,1);
     
    2019%now loop over rifts:
    2120for rift_i=1:length(rifts),
    22        
     21
    2322        %refine rift to desired resolution:
    2423        contour=contours(rift_i);
    2524        rift=rifts(rift_i);
    26        
     25
    2726        delete('Meshaddrifts.Rift.exp');
    2827        expwrite(rift,'Meshaddrifts.Rift.Coarse.exp');
    2928        expcoarsen('Meshaddrifts.Rift.exp','Meshaddrifts.Rift.Coarse.exp',rift.density);
    3029        delete('Meshaddrifts.Rift.Coarse.exp');
    31        
     30
    3231        %extract model:
    3332        expwrite(contour,'Meshaddrifts.Contour.exp');
    3433        md2=modelextract(md,'Meshaddrifts.Contour.exp');
    35        
     34
    3635        %create domain of md2 model:
    3736        md2.mesh.segments=contourenvelope(md2,'Meshaddrifts.Contour.exp');
     
    4140                domain_index(end+1)=md2.mesh.segments(pos,2);
    4241        end
    43        
     42
    4443        domain.x=md2.mesh.x(domain_index);
    4544        domain.y=md2.mesh.y(domain_index);
     
    4746        domain.density=1;
    4847        expwrite(domain,'Meshaddrifts.Domain.exp');
    49        
     48
    5049        %unloop domain index: used for later.
    5150        domain_index=domain_index(1:end-1);
    52        
     51
    5352        %remesh md2 using new domain outline, and rift profile:
    5453        md2=meshnodensity(md2,'Meshaddrifts.Domain.exp','Meshaddrifts.Rift.exp');
    5554        md2=meshprocessrifts(md2);
    56        
     55
    5756        %plug md2 mesh into md mesh:
    5857        [md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.z,md.mesh.numberofelements,md.mesh.numberofvertices,elconv,nodeconv,elconv2,nodeconv2]=meshplug(md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.z,...
     
    6160        %update md2 rifts using elconv and nodeconv, and plug them into md:
    6261        md2.rifts=updateriftindexing(md2.rifts,elconv2,nodeconv2);
    63        
     62
    6463        for i=1:md.rifts.numrifts,
    6564                md.rifts.riftstruct(i)=updateriftindexing(md.rifts.riftstruct(i),elconv,nodeconv);
    6665        end
    67        
     66
    6867        if md.rifts.numrifts==0,
    6968                md.rifts.riftstruct=md2.rifts;
     
    7372                md.rifts.numrifts=md.rifts.numrifts+1;
    7473        end
    75        
     74
    7675        md.mesh.segments(:,1:2)=nodeconv(md.mesh.segments(:,1:2));
    7776        md.mesh.segments(:,3)=elconv(md.mesh.segments(:,3));
  • issm/trunk-jpl/src/m/mesh/rifts/meshplug.m

    r8298 r13646  
    22%MESHPLUG - embed mesh into another one
    33%     See also meshaddrifts
    4 
    54
    65%initialize elconv,nodeconv conversion tables from md mesh to new md mesh
     
    4847end
    4948
    50 
    5149%plug elements
    5250elements=[elements;elements2];
    53 
    5451
    5552%now, increase number of nodes
     
    8784nodeconv(temp_nodeconv)=temp_nodeconvnum;
    8885nodeconv(extractednodes_minusborder)=NaN;
    89 
  • issm/trunk-jpl/src/m/mesh/rifts/meshprocessoutsiderifts.m

    r13524 r13646  
    66%
    77
    8 
    9 
    108%go through rifts, and figure out which ones touch the domain outline
    119for i=1:md.rifts.numrifts,
    12        
     10
    1311        %first, flag nodes that belong to the domain outline
    1412        flags=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,domainoutline,'node',0);
     
    2018        %we have found outsidetips, tips that touch the domain outline. go through them
    2119        for j=1:length(outsidetips),
    22                
     20
    2321                tip=outsidetips(j);
    2422                %find tip in the segments, take first segment (there should be 2) that holds tip,
     
    5250                        B=md.mesh.elements(nextelement,find(~ismember(md.mesh.elements(nextelement,:),[A B])));
    5351                end
    54                
     52
    5553                %take the list of elements on one side of the rift that connect to the tip,
    5654                %and duplicate the tip on them, so as to open the rift to the outside.
     
    5957                md.mesh.y=[md.mesh.y;md.mesh.y(tip)];
    6058                md.mesh.numberofvertices=num;
    61                
     59
    6260                %replace tip in elements
    6361                newelements=md.mesh.elements(elements,:);
     
    8078        end
    8179end
    82 
    8380
    8481%Fill in rest of fields:
  • issm/trunk-jpl/src/m/mesh/rifts/rifttipsonmesh.m

    r13012 r13646  
    1313        x_tip=rift.x(1);
    1414        y_tip=rift.y(1);
    15        
     15
    1616        index=find_point(md.mesh.x,md.mesh.y,x_tip,y_tip);
    1717        tips(end+1)=index;
     
    1919        x_tip=rift.x(end);
    2020        y_tip=rift.y(end);
    21        
     21
    2222        index=find_point(md.mesh.x,md.mesh.y,x_tip,y_tip);
    2323        tips(end+1)=index;
    2424
    2525end
    26 
  • issm/trunk-jpl/src/m/miscellaneous/isnans.m

    r13011 r13646  
    55%
    66%  See also : ISNAN
    7 
    87
    98if isstruct(array),
  • issm/trunk-jpl/src/m/miscellaneous/parallelrange.m

    r13010 r13646  
    1212end
    1313
    14 
    1514%There may be some rows left. Distribute evenly.
    1615row_rest=globalsize - numprocs*floor(globalsize/numprocs);
  • issm/trunk-jpl/src/m/os/ismpi.m

    r13303 r13646  
    44%   Usage:
    55%       flag=ismpi();
    6 
    76
    87configfile=[issmdir() '/bin/config.h']; %should find it in the install target
  • issm/trunk-jpl/src/m/os/ismumps.m

    r12155 r13646  
    44%   Usage:
    55%       flag=ismumps();
    6 
    76
    87configfile=[issmdir() '/bin/config.h']; %should find it in the install target
  • issm/trunk-jpl/src/m/os/ispetsc.m

    r12155 r13646  
    44%   Usage:
    55%       flag=ispetsc();
    6 
    76
    87configfile=[issmdir() '/bin/config.h']; %should find it in the install target
  • issm/trunk-jpl/src/m/os/issmbbftpin.m

    r6204 r13646  
    3535        end
    3636        command=[command '''  pfe1.nas.nasa.gov'];
    37        
     37
    3838        eval(command);
    3939
     
    4545        end
    4646
    47 
    4847end
  • issm/trunk-jpl/src/m/os/issmbbftpout.m

    r6204 r13646  
    1919        end
    2020else
    21        
     21
    2222        %build a string of the type: bbftp -s -u elarour -e 'setnbstream 8; cd /nobackupp10/elarour/Testing/Interactive3/; put Antarctica.tar.gz' pfe1.nas.nasa.gov
    2323        command=['!bbftp -s -V -u ' login ' -e ''setnbstream 8; cd ' path '; ']
     
    2626        end
    2727        command=[command '''  pfe1.nas.nasa.gov'];
    28        
     28
    2929        eval(command);
    3030end
  • issm/trunk-jpl/src/m/os/issmscpin.m

    r13170 r13646  
    3131        if ispc(),
    3232                %use the putty project pscp.exe: it should be in the path.
    33                
     33
    3434                %get ISSM_DIR variable
    3535                [status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]');
     
    6262                end
    6363
    64 
    6564                if port,
    6665                        eval(['!scp -P ' num2str(port) ' ' login '@localhost:' path '/' string ' ./']);
     
    6867                        eval(['!scp ' login '@' host ':' path '/' string ' ./']);
    6968                end
    70                
     69
    7170                %check scp worked
    7271                for i=1:numel(packages),
  • issm/trunk-jpl/src/m/os/issmscpout.m

    r13170 r13646  
    2222        if ispc(),
    2323                %use the putty project pscp.exe: it should be in the path.
    24                
     24
    2525                %get ISSM_DIR variable
    2626                [status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]');
     
    4848                end
    4949                string=[string ' '];
    50                
     50
    5151                if port,
    5252                        eval(['!scp -P ' num2str(port) ' ' string ' ' login '@localhost:' path]);
  • issm/trunk-jpl/src/m/os/issmssh.m

    r13170 r13646  
    1414        if ispc(),
    1515                %use the putty project plink.exe: it should be in the path.
    16                
     16
    1717                %get ISSM_DIR variable
    1818                [status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]');
  • issm/trunk-jpl/src/m/os/issmstssh.m

    r13633 r13646  
    55%      issmstssh(host,command)
    66
    7 
    87%just use starcluster command to pipe an ssh command through
    98system([starcluster() ' sshmaster ' host ' --user ' login ' ''' command '''']);
  • issm/trunk-jpl/src/m/parameterization/contourenvelope.m

    r13006 r13646  
    7272                nodein=zeros(mesh.numberofvertices,1);
    7373                elemin=zeros(mesh.numberofelements,1);
    74                
     74
    7575                pos=find(flags);
    7676                elemin(pos)=1;
  • issm/trunk-jpl/src/m/parameterization/parameterize.m

    r13071 r13646  
    5656end
    5757md.miscellaneous.notes=['Model created by using parameter file: ' parametername ' on: ' datestr(now)];
    58 
  • issm/trunk-jpl/src/m/partition/AreaAverageOntoPartition.m

    r12173 r13646  
    1515        %save 3D model
    1616        md3d=md;
    17        
     17
    1818        md.mesh.elements=md.mesh.elements2d;
    1919        md.mesh.x=md.mesh.x2d;
  • issm/trunk-jpl/src/m/partition/partitioner.m

    r11315 r13646  
    5050end
    5151
    52 
    5352if strcmpi(package,'chaco'),
    5453
     
    5756        method(1)=3;    %  global method (3=inertial (geometric))
    5857        method(3)=0;    %  vertex weights (0=off, 1=on)
    59        
     58
    6059        %specify bisection
    6160        method(6)=getfieldvalue(options,'section');%  ndims (1=bisection, 2=quadrisection, 3=octasection)
     
    6867                weights=[];
    6968        end
    70        
     69
    7170        %  partition into nparts
    7271        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.
     
    7978        end
    8079        maptab=Scotch(md.qmu.adjacency,[],weights,[],'cmplt',[npart]);
    81        
     80
    8281        part=maptab(:,2);%index partitions from 1 up. like metis.
    83 
    8482
    8583elseif strcmpi(package,'linear'),
  • issm/trunk-jpl/src/m/plot/applyoptions.m

    r13564 r13646  
    66%
    77%   See also: PLOTMODEL, PARSE_OPTIONS
    8                
    98
    109%some defaults
     
    226225else
    227226        %do nothing
    228        
    229 end
    230 
     227
     228end
    231229
    232230%area
     
    320318end
    321319
    322 
    323320%position of figure
    324321if exist(options,'figposition'),
    325        
     322
    326323        figposition=getfieldvalue(options,'figposition');
    327324        if ischar(figposition),
  • issm/trunk-jpl/src/m/plot/arrow.m

    r13009 r13646  
    88%            'ratio': default .5 (ratio headarrow/length)
    99%            'widthratio': default is 1/10 of length
    10 
    1110
    1211%recover options
  • issm/trunk-jpl/src/m/plot/checkplotoptions.m

    r13009 r13646  
    5353        end
    5454end
    55        
     55
    5656%text
    5757if exist(options,'text'),
  • issm/trunk-jpl/src/m/plot/latlonoverlay.m

    r13009 r13646  
    117117        end
    118118
    119 
    120119        pos=find(x<=xlimits(2) & x>=xlimits(1) & y<=ylimits(2) & y>=ylimits(1));
    121120        if length(pos)<=1, continue; end
  • issm/trunk-jpl/src/m/plot/plot_manager.m

    r13009 r13646  
    3333                        plot_highlightelements(md,options,subplotwidth,i);
    3434                        return;
    35                
     35
    3636                case 'qmumean',
    3737                        plot_qmumean(md,options,nlines,ncols,i);
    3838                        return;
    39                
     39
    4040                case 'qmustddev',
    4141                        plot_qmustddev(md,options,nlines,ncols,i);
    4242                        return;
    43                
     43
    4444                case 'qmuhistnorm',
    4545                        plot_qmuhistnorm(md,options,nlines,ncols,i);
     
    118118                        plot_segments(md,options,subplotwidth,i,data)
    119119                        return
    120                
     120
    121121                case 'quiver'
    122122                        data=[md.initialization.vx md.initialization.vy]; %Go ahead and try plot_unit
     
    199199                error('cannot kmlgroundoverlay on multi-plots');
    200200        end
    201        
     201
    202202        %call routine to build kml file and image that goes with it.
    203203        kmlgroundoverlay(md,options);
  • issm/trunk-jpl/src/m/plot/plot_overlay.m

    r13565 r13646  
    2525        error('buildoverlay error message: overlay not supported for quiver plots');
    2626end
    27 
    2827
    2928%radar power
  • issm/trunk-jpl/src/m/plot/plot_qmu_mass_flux_segments.m

    r13009 r13646  
    2727
    2828                %plot normals
    29                
     29
    3030                for j=1:length(segments),
    3131                        xstart=mean([segments(j,1) segments(j,3)]);
  • issm/trunk-jpl/src/m/plot/plot_qmuhistnorm.m

    r13009 r13646  
    44subplot(nlines,ncols,index);
    55hold on
    6 
    76
    87%recover histnorm data
  • issm/trunk-jpl/src/m/plot/plot_qmustddev.m

    r13009 r13646  
    4747end
    4848
    49 
    5049%now, project onto vertices
    5150responses_on_node=responses(md.qmu.partition+1);
  • issm/trunk-jpl/src/m/plot/plot_riftnumbering.m

    r13009 r13646  
    8888end
    8989
    90 
    9190%apply options
    9291options=addfielddefault(options,'title','Rift/Fault location');
  • issm/trunk-jpl/src/m/plot/plot_riftrelvel.m

    r13009 r13646  
    6363end
    6464for i=1:size(md.rifts.riftstruct,1),
    65        
     65
    6666        %get nodes on rift
    6767        penaltypairs=md.rifts.riftstruct(i).penaltypairs;
  • issm/trunk-jpl/src/m/plot/plot_rifts.m

    r13009 r13646  
    1616offset=getfieldvalue(options,'offset',500);
    1717if isstruct(md.rifts.riftstruct),
    18        
     18
    1919        for i=1:size(md.rifts.riftstruct,1),
    2020                penaltypairs=md.rifts.riftstruct(i).penaltypairs;
  • issm/trunk-jpl/src/m/plot/plot_riftvel.m

    r13009 r13646  
    8989end
    9090
    91 
    9291%legend
    9392if isp1 & isp2
  • issm/trunk-jpl/src/m/plot/plot_sarpwr.m

    r13009 r13646  
    1717        md.mesh.z=md.mesh.z*unit;
    1818end
    19                                        
     19
    2020imagesc(md.radaroverlay.x,md.radaroverlay.y,double(md.radaroverlay.pwr)),set(gca,'YDir','normal');colormap(gray);
    2121
  • issm/trunk-jpl/src/m/plot/plot_section.m

    r13009 r13646  
    115115                        hold on
    116116
    117 
    118117                        %3D
    119118                else
  • issm/trunk-jpl/src/m/plot/plot_segments.m

    r13009 r13646  
    4242        h3=plot(xstart,ystart,'r*');
    4343
    44 
    4544else
    4645        error('plot_segments: 3d plot of segments not supported yet!');
  • issm/trunk-jpl/src/m/plot/plot_thermaltransient_results.m

    r13009 r13646  
    2222eval(string);
    2323clear string;
    24 
  • issm/trunk-jpl/src/m/plot/plotmodel.m

    r13009 r13646  
    3232%go through subplots
    3333if numberofplots,
    34                
     34
    3535        %Create figure
    3636        if strcmpi(getfieldvalue(options.list{1},'visible','on'),'off'),
  • issm/trunk-jpl/src/m/plot/processdata.m

    r13440 r13646  
    7474                error('plotmodel error message: data not supported yet');
    7575        end
    76        
     76
    7777        %quiver?
    7878        if datasize(2)>1,
  • issm/trunk-jpl/src/m/plot/processmesh.m

    r13085 r13646  
    3636                z=md.mesh.z;
    3737        end
    38 
    3938
    4039        if isprop(md.mesh,'elements2d'), elements2d=md.mesh.elements2d; end
  • issm/trunk-jpl/src/m/plot/quiver_colorbar.m

    r13009 r13646  
    3131        fontsize=getfieldvalue(options,'fontsize',14);
    3232        set(hcb,'FontSize',fontsize);
    33        
     33
    3434        if exist(options,'colorbartitle'),
    3535                backup=gca;
  • issm/trunk-jpl/src/m/plot/radarpower.m

    r13562 r13646  
    9090                system('rm -rf ./temp.tif');
    9191
    92 
    9392        elseif strcmpi(md.mesh.hemisphere,'s'),
    9493                if highres,
  • issm/trunk-jpl/src/m/print/printmodel.m

    r13006 r13646  
    2323%      printmodel('image','tiff')
    2424%      printmodel('image','eps','margin','on','frame','on','hardcopy','on')
    25 
    2625
    2726%get options:
     
    5453%InvertHardcopy off imposes MATLAB to use the same colors
    5554set(fig, 'InvertHardcopy', getfieldvalue(options,'hardcopy'));
    56 
    5755
    5856%we could have several formats, as a cell array of strings.
  • issm/trunk-jpl/src/m/qmu/MassFluxProcessProfile.m

    r4773 r13646  
    77% See also: PROCESS_QMU_RESPONSE_DATA, PREQMU
    88
    9 
    109%first read the profile points.
    1110profile=expread([directory '/' profilename]);
  • issm/trunk-jpl/src/m/qmu/dakota_cdfs.m

    r3092 r13646  
    136136        end
    137137    end
    138    
     138
    139139    varargout{1}=dresp;
    140    
     140
    141141elseif exist('samp','var') && ~isempty(samp)
    142142    cdf=zeros(length(resp)+length(prob)+length(rel)+length(grel),...
     
    147147            resp,prob,rel,grel);
    148148    end
    149    
     149
    150150    varargout{1}=cdf;
    151    
     151
    152152elseif exist('mean','var'  ) && ~isempty(mean  ) && ...
    153153       exist('stddev','var') && ~isempty(stddev)
     
    159159            resp,prob,rel,grel);
    160160    end
    161    
     161
    162162    varargout{1}=cdf;
    163163else
     
    178178    mu   =mean(samp);
    179179    sigma=std(samp);
    180    
     180
    181181    cdf=zeros(length(resp)+length(prob)+length(rel)+length(grel),4);
    182182    cdf(:,:)=NaN;
  • issm/trunk-jpl/src/m/qmu/dakota_in_data.m

    r11642 r13646  
    8888% dmeth=dmeth_params_merge(dmeth,dparams)
    8989
    90 
    9190%%  variables
    9291
     
    9998
    10099end
    101    
     100
    102101%%  responses
    103102
  • issm/trunk-jpl/src/m/qmu/dakota_in_params.m

    r5486 r13646  
    209209
    210210end
    211 
  • issm/trunk-jpl/src/m/qmu/dakota_in_parse.m

    r1014 r13646  
    4242%
    4343function [method,dvar,dresp]=dakota_in_parse(filei)
    44    
     44
    4545if ~nargin
    4646    help dakota_in_parse
     
    631631
    632632itoken=itoken+1;
    633    
     633
    634634%  read next line if necessary
    635635
     
    644644    itoken=1;
    645645end
    646    
     646
    647647end
    648648
     
    668668    itoken=1;
    669669end
    670    
     670
    671671%  check for equal sign and skip
    672672
  • issm/trunk-jpl/src/m/qmu/dakota_moments.m

    r3092 r13646  
    8989            moments_calc(dresp(i).sample,alpha);
    9090    end
    91    
     91
    9292    varargout{1}=dresp;
    93    
     93
    9494elseif exist('samp','var') && ~isempty(samp)
    9595    mean    =zeros(1,size(samp,2));
     
    106106            moments_calc(samp(:,i),alpha);
    107107    end
    108    
     108
    109109    varargout{1}=mean;
    110110    varargout{2}=stddev;
  • issm/trunk-jpl/src/m/qmu/dakota_out_parse.m

    r6690 r13646  
    170170end
    171171display(sprintf('Number of columns (Dakota V+R)=%d.',ntokens-1));
    172    
     172
    173173%  process rows of matrix
    174174
     
    301301    end
    302302    [ntokens,tokens]=fltokens(fline);
    303    
     303
    304304%  add new response function and moments
    305305
     
    336336    end
    337337    [ntokens,tokens]=fltokens(fline);
    338    
     338
    339339%  find response function associated with confidence intervals
    340340
     
    464464    cmat.row   =cell(1,1);
    465465    cmat.matrix=zeros(1,ntokens);
    466    
     466
    467467    for i=1:ntokens
    468468        cmat.column(1,i)=cellstr(tokens{1}{i});
    469469    end
    470    
     470
    471471%  process rows of matrix, reading until blank line
    472472
     
    583583            display(sprintf('  %s',dresp(idresp).descriptor));
    584584        end
    585    
     585
    586586%  skip column headings of cdf
    587587
  • issm/trunk-jpl/src/m/qmu/examples/direct.m

    r9650 r13646  
    44md.qmu.params.evaluation_concurrency=1;
    55
    6 
    7 
    86%or for matlab direct driver
    97md.qmu.params.direct=true;
  • issm/trunk-jpl/src/m/qmu/examples/lrel_mmf.m

    r9650 r13646  
    9393%part_hist(md.qmu.partition,md.vertex_weight)
    9494%plotmodel(md,'data',log10(md.results.dakota.dresp_out(9).impfac(md.qmu.partition+1)))
    95 
  • issm/trunk-jpl/src/m/qmu/expandvariables.m

    r9668 r13646  
    44
    55for i=1:length(fnames)
    6    
     6
    77%  for linear constraints, just copy
    88
  • issm/trunk-jpl/src/m/qmu/importancefactors.m

    r9742 r13646  
    88%   Example: factors=importancefactors(md,'drag','max_vel');
    99%
    10 
    1110
    1211variablenamelength=length(variablename);
  • issm/trunk-jpl/src/m/qmu/lclist_write.m

    r12995 r13646  
    6060
    6161end
    62 
  • issm/trunk-jpl/src/m/qmu/plot/plot_boxplot.m

    r7398 r13646  
    6262    dresp=varargin{iarg};
    6363    iarg=iarg+1;
    64    
     64
    6565%     if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg}))
    6666    if iarg <= nargin && iscell(varargin{iarg})
     
    6868        iarg=iarg+1;
    6969    end
    70    
     70
    7171    descr=cell (1,length(dresp));
    7272    lsamp=zeros(1,length(dresp));
     
    8484    sampr=varargin{iarg};
    8585    iarg=iarg+1;
    86    
     86
    8787    if     iarg <= nargin && iscell(varargin{iarg})
    8888        descr=varargin{iarg};
     
    119119    iarg=iarg+2;
    120120end
    121    
     121
    122122%%  draw the plot
    123123
  • issm/trunk-jpl/src/m/qmu/plot/plot_cdf.m

    r7398 r13646  
    7777    dresp=varargin{iarg};
    7878    iarg=iarg+1;
    79    
     79
    8080%     if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg}))
    8181    if iarg <= nargin && iscell(varargin{iarg})
     
    188188    set(hl1(i),'Color',cmap(imap,:))
    189189end
    190    
     190
    191191xlim('auto')
    192192[xlims]=xlim;
     
    278278        end
    279279    end
    280    
     280
    281281    if strcmpi(pdfplt,'line')
    282282        xplot=xpdf;
  • issm/trunk-jpl/src/m/qmu/plot/plot_hist_norm.m

    r8732 r13646  
    8989    dresp1=varargin{iarg};
    9090    iarg=iarg+1;
    91    
     91
    9292%     if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg}))
    9393    if iarg <= nargin && iscell(varargin{iarg})
     
    9595        iarg=iarg+1;
    9696    end
    97    
     97
    9898    descr=cell (1,length(dresp1));
    9999    lsamp=zeros(1,length(dresp1));
     
    111111    sampr=varargin{iarg};
    112112    iarg=iarg+1;
    113    
     113
    114114    lsamp(1:size(sampr,2))=size(sampr,1);
    115115
     
    142142        iarg=iarg+1;
    143143    end
    144    
     144
    145145    mu   =zeros(1,length(dresp2));
    146146    sigma=zeros(1,length(dresp2));
     
    298298    end
    299299end
    300    
     300
    301301xlim('auto')
    302302[xlims]=xlim;
  • issm/trunk-jpl/src/m/qmu/plot/plot_hist_norm_ci.m

    r7398 r13646  
    7878    dresp=varargin{iarg};
    7979    iarg=iarg+1;
    80    
     80
    8181%     if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg}))
    8282    if iarg <= nargin && iscell(varargin{iarg})
     
    8484        iarg=iarg+1;
    8585    end
    86    
     86
    8787    descr=cell (1,length(dresp));
    8888    lsamp=zeros(1,length(dresp));
     
    9292    sampr=zeros(max(lsamp),length(dresp));
    9393    sampr(:,:)=NaN;
    94    
     94
    9595    mu     =zeros(1,length(dresp));
    9696    sigma  =zeros(1,length(dresp));
     
    109109    sampr=varargin{iarg};
    110110    iarg=iarg+1;
    111    
     111
    112112    lsamp(1:size(sampr,2))=size(sampr,1);
    113113
     
    121121        descr=cell(1,size(sampr,2));
    122122    end
    123    
     123
    124124    mu     =zeros(1,size(sampr,2));
    125125    sigma  =zeros(1,size(sampr,2));
     
    325325    end
    326326end
    327    
     327
    328328xlim('auto')
    329329[xlims]=xlim;
  • issm/trunk-jpl/src/m/qmu/plot/plot_if_bars.m

    r7398 r13646  
    6666    dresp=varargin{iarg};
    6767    iarg=iarg+1;
    68    
     68
    6969%     if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg}))
    7070    if iarg <= nargin && iscell(varargin{iarg})
     
    7272        iarg=iarg+1;
    7373    end
    74    
     74
    7575    descr=cell (1,length(dresp));
    7676    lifr =zeros(1,length(dresp));
     
    125125    end
    126126    clear ifmean
    127    
     127
    128128    dvar=dvar(index);
    129129    ifr =ifr (:,index);
     
    136136    dvar(nif+1,1)=cellstr(sprintf('others < %f',ifmin));
    137137    ifr (:,nif+1)=0.;
    138    
     138
    139139    nif2=0;
    140140    dvar2=cell (size(dvar));
    141141    ifr2 =zeros(size(ifr ));
    142    
     142
    143143%  sum filtered rows and copy unfiltered rows
    144144
     
    152152        end
    153153    end
    154    
     154
    155155%  copy sums
    156156
    157157    dvar2(nif2+1)  =dvar(nif+1);
    158158    ifr2 (:,nif2+1)=ifr (:,nif+1);
    159    
     159
    160160%  copy back and truncate filtered rows
    161161
  • issm/trunk-jpl/src/m/qmu/plot/plot_if_spec.m

    r7398 r13646  
    7272    dresp=varargin{iarg};
    7373    iarg=iarg+1;
    74    
     74
    7575%     if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg}))
    7676    if iarg <= nargin && iscell(varargin{iarg})
     
    7878        iarg=iarg+1;
    7979    end
    80    
     80
    8181    descr=cell (1,length(dresp));
    8282    lifr =zeros(1,length(dresp));
     
    137137    end
    138138    clear ifmean
    139    
     139
    140140    dvar=dvar(index);
    141141    ifr =ifr (:,index);
     
    148148    dvar(nif+1,1)=cellstr(sprintf('others < %f',ifmin));
    149149    ifr (:,nif+1)=0.;
    150    
     150
    151151    nif2=0;
    152152    dvar2=cell (size(dvar));
    153153    ifr2 =zeros(size(ifr ));
    154    
     154
    155155%  sum filtered rows and copy unfiltered rows
    156156
     
    164164        end
    165165    end
    166    
     166
    167167%  copy sums
    168168
    169169    dvar2(nif2+1)  =dvar(nif+1);
    170170    ifr2 (:,nif2+1)=ifr (:,nif+1);
    171    
     171
    172172%  copy back and truncate filtered rows
    173173
  • issm/trunk-jpl/src/m/qmu/plot/plot_normdist_bars.m

    r7398 r13646  
    7373    dresp=varargin{iarg};
    7474    iarg=iarg+1;
    75    
     75
    7676%     if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg}))
    7777    if iarg <= nargin && iscell(varargin{iarg})
     
    8282    sampr=varargin{iarg};
    8383    iarg=iarg+1;
    84    
     84
    8585    if     iarg <= nargin && iscell(varargin{iarg})
    8686        descr=varargin{iarg};
     
    9292        descr=cell(1:size(sampr,2));
    9393    end
    94    
     94
    9595    dresp=struct([]);
    9696    for i=1:size(sampr,2)
  • issm/trunk-jpl/src/m/qmu/plot/plot_normplot.m

    r7398 r13646  
    6262    dresp=varargin{iarg};
    6363    iarg=iarg+1;
    64    
     64
    6565%     if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg}))
    6666    if iarg <= nargin && iscell(varargin{iarg})
     
    6868        iarg=iarg+1;
    6969    end
    70    
     70
    7171    descr=cell (1,length(dresp));
    7272    lsamp=zeros(1,length(dresp));
     
    8484    sampr=varargin{iarg};
    8585    iarg=iarg+1;
    86    
     86
    8787    if     iarg <= nargin && iscell(varargin{iarg})
    8888        descr=varargin{iarg};
     
    119119    iarg=iarg+2;
    120120end
    121    
     121
    122122%%  draw the plot
    123123
  • issm/trunk-jpl/src/m/qmu/plot/plot_prob_bars.m

    r7398 r13646  
    5757%%  assemble the data into a matrix and calculate the increments
    5858
    59 
    6059%%  process input data and assemble into matrices and increments
    6160
     
    6665    dresp=varargin{iarg};
    6766    iarg=iarg+1;
    68    
     67
    6968%     if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg}))
    7069    if iarg <= nargin && iscell(varargin{iarg})
     
    7271        iarg=iarg+1;
    7372    end
    74    
     73
    7574    descr=cell (1,length(dresp));
    7675    lcdfr=zeros(1,length(dresp));
  • issm/trunk-jpl/src/m/qmu/plot/plot_rlev_bars.m

    r7398 r13646  
    6262    dresp=varargin{iarg};
    6363    iarg=iarg+1;
    64    
     64
    6565%     if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg}))
    6666    if iarg <= nargin && iscell(varargin{iarg})
     
    6868        iarg=iarg+1;
    6969    end
    70    
     70
    7171    descr=cell (1,length(dresp));
    7272    lcdfr=zeros(1,length(dresp));
  • issm/trunk-jpl/src/m/qmu/plot/plot_rlev_bars_ci.m

    r7398 r13646  
    7474    dresp=varargin{iarg};
    7575    iarg=iarg+1;
    76    
     76
    7777%     if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg}))
    7878    if iarg <= nargin && iscell(varargin{iarg})
     
    8383    sampr=varargin{iarg};
    8484    iarg=iarg+1;
    85    
     85
    8686    if     iarg <= nargin && iscell(varargin{iarg})
    8787        descr=varargin{iarg};
     
    9393        descr=cell(1:size(sampr,2));
    9494    end
    95    
     95
    9696    dresp=struct([]);
    9797    for i=1:size(sampr,2)
     
    136136        display('Using calculated normal fits from sample data.')
    137137    end
    138    
     138
    139139    if ~isfield(dresp(i),'cdf') || isempty(dresp(i).cdf)
    140140%  use minus/plus integer standard deviations
  • issm/trunk-jpl/src/m/qmu/plot/plot_rvsv_line.m

    r7398 r13646  
    7474    dvar=varargin{iarg};
    7575    iarg=iarg+1;
    76    
     76
    7777%     if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg}))
    7878    if iarg <= nargin && iscell(varargin{iarg})
     
    8080        iarg=iarg+1;
    8181    end
    82    
     82
    8383    descv=cell (1,length(dvar));
    8484    lsamp=zeros(1,length(dvar));
     
    9696    sampv=varargin{iarg};
    9797    iarg=iarg+1;
    98    
     98
    9999    if     iarg <= nargin && iscell(varargin{iarg})
    100100        descv=varargin{iarg};
     
    119119    dresp=varargin{iarg};
    120120    iarg=iarg+1;
    121    
     121
    122122%     if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg}))
    123123    if iarg <= nargin && iscell(varargin{iarg})
     
    125125        iarg=iarg+1;
    126126    end
    127    
     127
    128128    descr=cell (1,length(dresp));
    129129    lsamp=zeros(1,length(dresp));
     
    141141    sampr=varargin{iarg};
    142142    iarg=iarg+1;
    143    
     143
    144144    if     iarg <= nargin && iscell(varargin{iarg})
    145145        descr=varargin{iarg};
     
    177177    iarg=iarg+2;
    178178end
    179    
     179
    180180if     ~exist('nplotr','var') && ~exist('nplotc','var')
    181181    nplotr=1;
     
    225225                'IconDisplayStyle','off'); % Exclude line from legend
    226226        end
    227        
     227
    228228%  add the annotation
    229229
  • issm/trunk-jpl/src/m/qmu/plot/plot_rvsv_scat3.m

    r7398 r13646  
    7979    dvar=varargin{iarg};
    8080    iarg=iarg+1;
    81    
     81
    8282%     if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg}))
    8383    if iarg <= nargin && iscell(varargin{iarg})
     
    8585        iarg=iarg+1;
    8686    end
    87    
     87
    8888    descv=cell (1,length(dvar));
    8989    lsamp=zeros(1,length(dvar));
     
    101101    sampv=varargin{iarg};
    102102    iarg=iarg+1;
    103    
     103
    104104    if     iarg <= nargin && iscell(varargin{iarg})
    105105        descv=varargin{iarg};
     
    128128    dresp=varargin{iarg};
    129129    iarg=iarg+1;
    130    
     130
    131131%     if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg}))
    132132    if iarg <= nargin && iscell(varargin{iarg})
     
    134134        iarg=iarg+1;
    135135    end
    136    
     136
    137137    descr=cell (1,length(dresp));
    138138    lsamp=zeros(1,length(dresp));
     
    150150    sampr=varargin{iarg};
    151151    iarg=iarg+1;
    152    
     152
    153153    if     iarg <= nargin && iscell(varargin{iarg})
    154154        descr=varargin{iarg};
     
    187187    iarg=iarg+2;
    188188end
    189    
     189
    190190if     ~exist('nplotr','var') && ~exist('nplotc','var')
    191191    nplotr=ceil(sqrt(size(sampr,2)));
     
    208208
    209209for iresp=1:size(sampr,2)
    210    
     210
    211211%  initialize the subplot
    212212
  • issm/trunk-jpl/src/m/qmu/plot/plot_rvsv_surf.m

    r7398 r13646  
    7676    dvar=varargin{iarg};
    7777    iarg=iarg+1;
    78    
     78
    7979%     if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg}))
    8080    if iarg <= nargin && iscell(varargin{iarg})
     
    8282        iarg=iarg+1;
    8383    end
    84    
     84
    8585    descv=cell (1,length(dvar));
    8686    lsamp=zeros(1,length(dvar));
     
    9898    sampv=varargin{iarg};
    9999    iarg=iarg+1;
    100    
     100
    101101    if     iarg <= nargin && iscell(varargin{iarg})
    102102        descv=varargin{iarg};
     
    125125    dresp=varargin{iarg};
    126126    iarg=iarg+1;
    127    
     127
    128128%     if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg}))
    129129    if iarg <= nargin && iscell(varargin{iarg})
     
    131131        iarg=iarg+1;
    132132    end
    133    
     133
    134134    descr=cell (1,length(dresp));
    135135    lsamp=zeros(1,length(dresp));
     
    147147    sampr=varargin{iarg};
    148148    iarg=iarg+1;
    149    
     149
    150150    if     iarg <= nargin && iscell(varargin{iarg})
    151151        descr=varargin{iarg};
     
    184184    iarg=iarg+2;
    185185end
    186    
     186
    187187if     ~exist('nplotr','var') && ~exist('nplotc','var')
    188188    nplotr=ceil(sqrt(size(sampr,2)));
     
    208208        z(ixi(i),iyi(i))=sampr(i,iresp);
    209209    end
    210    
     210
    211211%  initialize the subplot
    212212
  • issm/trunk-jpl/src/m/qmu/plot/plot_sampdist_bars.m

    r7398 r13646  
    7272    dresp=varargin{iarg};
    7373    iarg=iarg+1;
    74    
     74
    7575%     if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg}))
    7676    if iarg <= nargin && iscell(varargin{iarg})
     
    8181    sampr=varargin{iarg};
    8282    iarg=iarg+1;
    83    
     83
    8484    if     iarg <= nargin && iscell(varargin{iarg})
    8585        descr=varargin{iarg};
     
    9191        descr=cell(1:size(sampr,2));
    9292    end
    93    
     93
    9494    dresp=struct([]);
    9595    for i=1:size(sampr,2)
  • issm/trunk-jpl/src/m/qmu/process_qmu_options.m

    r8987 r13646  
    9999outoptions.iparams=iparams;
    100100outoptions.runmpi=runmpi;
    101 
  • issm/trunk-jpl/src/m/qmu/process_qmu_response_data.m

    r9742 r13646  
    55%
    66% See also PREQMU, PRESOLVE
    7 
    87
    98%preliminary data
     
    2221end
    2322
    24 
    2523%deal with mass flux profiles
    2624if process_mass_flux_profiles,
     
    3028                error('process_qmu_response_data error message: could not find a mass_flux exp profile!');
    3129        end
    32        
     30
    3331        if ~iscell(md.qmu.mass_flux_profiles),
    3432                error('process_qmu_response_data error message: qmu_mass_flux_profiles field should be a cell array of domain outline names');
  • issm/trunk-jpl/src/m/qmu/qmu_correlation.m

    r9650 r13646  
    1212        error('qmu_correlation error message: could not find dresp_dat field in dakota results. you need to run montecarlo before computing correlations');
    1313end
    14        
     14
    1515data=md.qmu.results.dresp_dat;
    1616
  • issm/trunk-jpl/src/m/qmu/qmuisdistributed.m

    r5200 r13646  
    11function found=qmuisdistribted(string)
    22%QMUISDISTRIBTED - figure out if a string is a decriptor with a numerical postfix. Like thickness1, or drag10
    3 
    43
    54%just take last string element, and see if it is numeric.
  • issm/trunk-jpl/src/m/qmu/qmumarshall.m

    r9650 r13646  
    4747        end
    4848end
    49                        
     49
    5050if qmu_segments,
    5151        WriteData(fid,md.qmu.mass_flux_num_profiles,'Integer','qmu_mass_flux_num_profiles');
     
    5757        WriteData(fid,md.qmu.mass_flux_num_profiles,'Integer','qmu_mass_flux_num_profiles');
    5858end
    59 
    6059
    6160%write part and npart to disk
  • issm/trunk-jpl/src/m/qmu/qmuresponse.m

    r4431 r13646  
    114114        error(['qmuresponse error message: unknown descriptor ' descriptor]);
    115115end
    116 
  • issm/trunk-jpl/src/m/qmu/qmuroot.m

    r2157 r13646  
    1111        end
    1212end
    13 
  • issm/trunk-jpl/src/m/qmu/rlist_write.m

    r12995 r13646  
    6868
    6969end
    70 
  • issm/trunk-jpl/src/m/qmu/sensitivities.m

    r13241 r13646  
    88%   Example: sens=sensitivities(md,'DragCoefficient','MaxVel');
    99%
    10 
    1110
    1211variablenamelength=length(variablename);
  • issm/trunk-jpl/src/m/qmu/setupdesign/IsScaled.m

    r9742 r13646  
    1212
    1313case {'RiftsFriction'},
    14        
     14
    1515        status=2; %special treatment
    1616
  • issm/trunk-jpl/src/m/qmu/setupdesign/QmuSetupVariables.m

    r9650 r13646  
    66%decide whether this is a distributed variable, which will drive whether we expand it into npart values,
    77%or if we just carry it forward as is.
    8 
    98
    109%ok, key off according to type of descriptor:
  • issm/trunk-jpl/src/m/qmu/vector_write.m

    r12995 r13646  
    3131    nitem=nitem+1;
    3232    lsvec=lsvec+1+length(sitem);
    33    
     33
    3434    if (nitem <= nmax) && (lsvec <= cmax)
    3535        svec=[svec ' ' sitem];
  • issm/trunk-jpl/src/m/regional/basinzoom.m

    r13010 r13646  
    3939%Ok, find basin we are talking about:
    4040load([jplsvn() '/projects/ModelData/Names/Names.mat']);
    41                
     41
    4242%Go through names:
    4343found=0;
  • issm/trunk-jpl/src/m/regional/regionaltransient2d.m

    r13418 r13646  
    156156                md2.results=[];
    157157        end
    158 
  • issm/trunk-jpl/src/m/regional/showbasins.m

    r13010 r13646  
    2121        options=pairoptions(varargin{:});
    2222end
    23 
    2423
    2524%recover some options, and set defaults
  • issm/trunk-jpl/src/m/solve/loadresultsfromdisk.m

    r13004 r13646  
    5050        end
    5151
    52 
    5352%post processes qmu results if necessary
    5453else
  • issm/trunk-jpl/src/m/solve/parseresultsfromdisk.m

    r13006 r13646  
    1919%   Usage:
    2020%      results=parseresultsfromdiskioserial(filename)
    21 
    2221
    2322%Open file
     
    5453%   Usage:
    5554%      results=parseresultsfromdiskiosplit(filename)
    56 
    5755
    5856%Open file
     
    177175%      field=ReadDataDimensions(fid)
    178176
    179 
    180177%read field
    181178[length,count]=fread(fid,1,'int');
  • issm/trunk-jpl/src/m/solve/solve.m

    r13383 r13646  
    7474end
    7575
    76 
    7776%Write all input files
    7877marshall(md);                                          % bin file
    7978PetscFile(md.solver,[md.miscellaneous.name '.petsc']); % petsc file
    8079BuildQueueScript(cluster,md.private.runtimename,md.miscellaneous.name,md.private.solution,md.settings.io_gather,md.debug.valgrind,md.debug.gprof); % queue file
    81 
    8280
    8381%Stop here if batch mode
  • issm/trunk-jpl/src/m/solvers/asmoptions.m

    r11871 r13646  
    44%   Usage:
    55%      options=asmoptions;
    6                          
     6
    77%retrieve options provided in varargin
    88options=pairoptions(varargin{:});
  • issm/trunk-jpl/src/m/solvers/iluasmoptions.m

    r12932 r13646  
    44%   Usage:
    55%      options=iluasmoptions;
    6                          
     6
    77%retrieve options provided in varargin
    88options=pairoptions(varargin{:});
  • issm/trunk-jpl/src/m/solvers/jacobiasmoptions.m

    r11871 r13646  
    44%   Usage:
    55%      options=jacobiasmoptions;
    6                          
     6
    77%retrieve options provided in varargin
    88options=pairoptions(varargin{:});
  • issm/trunk-jpl/src/m/solvers/jacobicgoptions.m

    r11871 r13646  
    44%   Usage:
    55%      options=jacobiasmoptions;
    6                          
     6
    77%retrieve options provided in varargin
    88options=pairoptions(varargin{:});
  • issm/trunk-jpl/src/m/solvers/matlaboptions.m

    r11871 r13646  
    44%   Usage:
    55%      options=matlaboptions;
    6                          
     6
    77%retrieve options provided in varargin
    88options=pairoptions(varargin{:});
  • issm/trunk-jpl/src/m/solvers/soroptions.m

    r11871 r13646  
    44%   Usage:
    55%      options=soroptions;
    6                          
     6
    77%retrieve options provided in varargin
    88options=pairoptions(varargin{:});
  • issm/trunk-jpl/src/m/string/issmprintf.m

    r6321 r13646  
    88%   Example:
    99%      issmprintf(1,'%s\n','string to display');
    10        
     10
    1111if flag,
    1212        disp(sprintf(format,varargin{:}));
  • issm/trunk-jpl/src/m/string/strsplit.m

    r1 r13646  
    1616
    1717%   mailto:    gie.spaepen@ua.ac.be
    18 
    19 
    2018
    2119%Check input arguments
     
    8785        splittedstring = tempsplit;
    8886    end
    89    
    90        
     87
    9188end
  • issm/trunk-jpl/src/m/string/strsplit_strict.m

    r2467 r13646  
    44%   Usage:
    55%      output = strsplit_strict(inpstr,delimiter)
    6 
    76
    87%Check input arguments
Note: See TracChangeset for help on using the changeset viewer.