Changeset 13646
- Timestamp:
- 10/12/12 16:44:17 (12 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 195 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/array/array_numel.m
r3569 r13646 17 17 inum=numel(varargin{iarg}); 18 18 end 19 19 20 20 if ~isequal(inum,1) 21 21 if isequal(anum,1) -
issm/trunk-jpl/src/m/array/array_size.m
r3569 r13646 17 17 isize=size(varargin{iarg}); 18 18 end 19 19 20 20 if ~isequal(isize,[1 1]) 21 21 if isequal(asize,[1 1]) -
issm/trunk-jpl/src/m/array/str2int.m
r6614 r13646 44 44 45 45 end 46 -
issm/trunk-jpl/src/m/array/struc_desc.m
r3569 r13646 22 22 desc=cellstr(varargin{iarg}); 23 23 end 24 24 25 25 for i=1:length(desc) 26 26 sarrayoi=struc_desci(sarray,desc{i}); -
issm/trunk-jpl/src/m/boundaryconditions/SetMarineIceSheetBC.m
r13470 r13646 74 74 md.diagnostic.icefront=pressureload; 75 75 76 77 76 %Create zeros basalforcings and surfaceforcings 78 77 if (isnan(md.surfaceforcings.precipitation) & (md.surfaceforcings.ispdd==1)), -
issm/trunk-jpl/src/m/classes/autodiff.m
r13516 r13646 41 41 end 42 42 43 44 43 end % }}} 45 44 function disp(obj) % {{{ … … 54 53 WriteData(fid,'object',obj,'fieldname','isautodiff','format','Boolean'); 55 54 WriteData(fid,'object',obj,'fieldname','driver','format','String'); 56 55 57 56 %early return 58 57 if ~obj.isautodiff, … … 104 103 if strcmpi(obj.driver,'fos_forward'), 105 104 index=0; 106 105 107 106 for i=1:num_independent_objects, 108 107 indep=obj.independents{i}; … … 125 124 if strcmpi(obj.driver,'fos_reverse'), 126 125 index=0; 127 126 128 127 for i=1:num_dependent_objects, 129 128 dep=obj.dependents{i}; … … 146 145 if strcmpi(obj.driver,'fov_forward'), 147 146 indices=0; 148 147 149 148 for i=1:num_independent_objects, 150 149 indep=obj.independents{i}; -
issm/trunk-jpl/src/m/classes/dependent.m
r13509 r13646 16 16 methods 17 17 function obj= dependent(varargin) % {{{ 18 18 19 19 %use provided options to change fields 20 20 options=pairoptions(varargin{:}); 21 21 22 22 obj.name=getfieldvalue(options,'name',''); 23 23 obj.type=getfieldvalue(options,'type',''); … … 68 68 fielddisplay(obj,'name','variable name (must match corresponding Enum)'); 69 69 fielddisplay(obj,'type','type of variable (''vertex'' or ''scalar'')'); 70 70 71 71 if ~isnan(obj.fos_reverse_index), 72 72 fielddisplay(obj,'fos_reverse_index','index for fos_reverse driver of ADOLC'); -
issm/trunk-jpl/src/m/classes/diagnostic.m
r13040 r13646 38 38 %maximum of non-linear iterations. 39 39 obj.maxiter=100; 40 40 41 41 %Convergence criterion: absolute, relative and residual 42 42 obj.restol=10^-4; 43 43 obj.reltol=0.01; 44 44 obj.abstol=10; 45 45 46 46 obj.stokesreconditioning=10^13; 47 47 obj.shelf_dampening=0; -
issm/trunk-jpl/src/m/classes/flaim.m
r13020 r13646 59 59 fielddisplay(obj,'usevalueordering' ,'flag to consider target values for flight path evaluation'); 60 60 fielddisplay(obj,'split_antimeridian' ,'flag to split polygons on the antimeridian'); 61 61 62 62 disp(sprintf('\n Optimization:')); 63 63 fielddisplay(obj,'path_optimize' ,'optimize? (default false)'); -
issm/trunk-jpl/src/m/classes/groundingline.m
r13020 r13646 25 25 %basal melting rate correction: 26 26 obj.melting_rate=0; 27 28 27 29 28 end % }}} -
issm/trunk-jpl/src/m/classes/independent.m
r13461 r13646 14 14 methods 15 15 function obj= independent(varargin) % {{{ 16 16 17 17 %use provided options to change fields 18 18 options=pairoptions(varargin{:}); … … 49 49 end 50 50 51 52 51 end % }}} 53 52 function disp(obj) % {{{ -
issm/trunk-jpl/src/m/classes/mesh.m
r13020 r13646 15 15 numberofvertices = 0; 16 16 numberofedges = 0; 17 17 18 18 lat = NaN 19 19 long = NaN … … 158 158 fielddisplay(obj,'lowerelements','lower element list (NaN for element on the lower layer'); 159 159 fielddisplay(obj,'vertexonboundary','vertices on the boundary of the domain flag list'); 160 160 161 161 fielddisplay(obj,'segments','edges on domain boundary (vertex1 vertex2 element)'); 162 162 fielddisplay(obj,'segmentmarkers','number associated to each segment'); -
issm/trunk-jpl/src/m/classes/model/model.m
r13347 r13646 930 930 if isfield(structmd,'npart'); md.qmu.numberofpartitions=structmd.npart; end 931 931 if isfield(structmd,'part'); md.qmu.partition=structmd.part; end 932 932 933 933 %Field changes 934 934 if (isfield(structmd,'type') & ischar(structmd.type)), … … 1037 1037 md.mesh.lowerelements(1:md.mesh.numberofelements2d)=NaN; 1038 1038 end 1039 1039 1040 1040 if ~isfield(structmd,'diagnostic_ref'); 1041 1041 md.diagnostic.referential=NaN*ones(md.mesh.numberofvertices,6); -
issm/trunk-jpl/src/m/classes/modellist.m
r13012 r13646 271 271 end 272 272 273 274 273 %now, tar all the files and then erase them. 275 274 eval(['!find -iname ''' name '-*'' > file_list.txt']); … … 369 368 % LaunchMultipleQueueJobgemini(cluster,name,executionpath) 370 369 371 372 370 %first, check we have the binary file and the queueing script 373 371 if ~exist([ name '.queue'],'file'), -
issm/trunk-jpl/src/m/classes/organizer.m
r12648 r13646 114 114 end%}}} 115 115 function bool=perform(org,string) % {{{ 116 116 117 117 bool=false; 118 118 … … 155 155 name=[org.repository '/' org.prefix org.steps(org.currentstep).string ]; 156 156 disp(['saving model as: ' name]); 157 157 158 158 %check that md is a model 159 159 if ~isa(md,'model'), warning('third argument is not a model'); end -
issm/trunk-jpl/src/m/classes/planetmesh.m
r13043 r13646 17 17 numberofelements = 0; 18 18 numberofvertices = 0; 19 19 20 20 lat = NaN 21 21 long = NaN … … 103 103 fielddisplay(obj,'dimension','planetmesh dimension (2d or 3d)'); 104 104 fielddisplay(obj,'numberoflayers','number of extrusion layers'); 105 105 106 106 fielddisplay(obj,'vertexconnectivity','list of vertices connected to vertex_i'); 107 107 fielddisplay(obj,'elementconnectivity','list of vertices connected to element_i'); -
issm/trunk-jpl/src/m/classes/prognostic.m
r13443 r13646 50 50 end 51 51 52 53 52 end % }}} 54 53 function disp(obj) % {{{ -
issm/trunk-jpl/src/m/classes/qmu.m
r13486 r13646 33 33 end % }}} 34 34 function obj = setdefaultparameters(obj) % {{{ 35 35 36 36 end % }}} 37 37 function md = checkconsistency(obj,md,solution,analyses) % {{{ -
issm/trunk-jpl/src/m/classes/qmu/@dakota_method/dakota_method.m
r3094 r13646 49 49 params =struct(); 50 50 end 51 51 52 52 methods 53 53 function [dm]=dakota_method(method) … … 828 828 829 829 end 830 830 831 831 % if more than one argument, issue warning 832 832 … … 852 852 disp(sprintf(' responses: %s' ,string_cell(dm(i).responses))); 853 853 disp(sprintf(' ghspec: %s\n' ,string_cell(dm(i).ghspec))); 854 854 855 855 % display the parameters within the object 856 856 … … 860 860 maxlen=max(maxlen,length(fnames{j})); 861 861 end 862 862 863 863 for j=1:numel(fnames) 864 864 disp(sprintf([' params.%-' num2str(maxlen+1) 's: %s'],... … … 870 870 end 871 871 end 872 -
issm/trunk-jpl/src/m/classes/qmu/@dakota_method/dmeth_params_write.m
r5424 r13646 46 46 error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method); 47 47 end 48 48 49 49 case {'npsol'} 50 50 param_write(fid,sbeg,'max_iterations',' = ','\n',dm.params); … … 64 64 error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method); 65 65 end 66 66 67 67 case {'conmin'} 68 68 param_write(fid,sbeg,'max_iterations',' = ','\n',dm.params); … … 80 80 error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method); 81 81 end 82 82 83 83 case {'optpp'} 84 84 param_write(fid,sbeg,'max_iterations',' = ','\n',dm.params); … … 120 120 error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method); 121 121 end 122 122 123 123 case {'apps'} 124 124 param_write(fid,sbeg,'max_function_evaluations',' = ','\n',dm.params); … … 140 140 error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method); 141 141 end 142 142 143 143 case {'coliny'} 144 144 param_write(fid,sbeg,'max_iterations',' = ','\n',dm.params); … … 212 212 error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method); 213 213 end 214 214 215 215 case {'ncsu'} 216 216 param_write(fid,sbeg,'max_iterations',' = ','\n',dm.params); … … 226 226 error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method); 227 227 end 228 228 229 229 case {'jega'} 230 230 param_write(fid,sbeg,'max_iterations',' = ','\n',dm.params); … … 282 282 error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method); 283 283 end 284 284 285 285 case {'lsq'} 286 286 switch dm.method … … 344 344 error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method); 345 345 end 346 346 347 347 case {'nond'} 348 348 switch dm.method … … 426 426 error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method); 427 427 end 428 428 429 429 case {'dace'} 430 430 switch dm.method … … 484 484 error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method); 485 485 end 486 486 487 487 case {'param'} 488 488 param_write(fid,sbeg,'output',' ','\n',dm.params); … … 512 512 case {'multidim_parameter_study'} 513 513 param_write(fid,sbeg,'partitions',' = ','\n',dm.params); 514 514 515 515 otherwise 516 516 error('Unrecognized ''%s'' method: ''%s''.',dm.type,dm.method); -
issm/trunk-jpl/src/m/classes/qmu/continuous_design.m
r9548 r13646 39 39 scale = 1.; 40 40 end 41 41 42 42 methods 43 43 function [cdv]=continuous_design(varargin) … … 65 65 cdv(asizec{:})=continuous_design; 66 66 clear asizec 67 67 68 68 if ischar(varargin{1}) 69 69 varargin{1}=cellstr(varargin{1}); … … 212 212 end 213 213 end 214 214 215 215 methods (Static) 216 216 function []=dakota_write(fidi,dvar) -
issm/trunk-jpl/src/m/classes/qmu/continuous_state.m
r9548 r13646 35 35 upper = Inf; 36 36 end 37 37 38 38 methods 39 39 function [csv]=continuous_state(varargin) … … 61 61 csv(asizec{:})=continuous_state; 62 62 clear asizec 63 63 64 64 if ischar(varargin{1}) 65 65 varargin{1}=cellstr(varargin{1}); … … 177 177 end 178 178 end 179 179 180 180 methods (Static) 181 181 function []=dakota_write(fidi,dvar) -
issm/trunk-jpl/src/m/classes/qmu/least_squares_term.m
r9548 r13646 35 35 weight = 1.; 36 36 end 37 37 38 38 methods 39 39 function [lst]=least_squares_term(varargin) … … 54 54 lst(asizec{:})=least_squares_term; 55 55 clear asizec 56 56 57 57 if ischar(varargin{1}) 58 58 varargin{1}=cellstr(varargin{1}); … … 169 169 end 170 170 end 171 171 172 172 methods (Static) 173 173 function [rdesc]=dakota_write(fidi,dresp,rdesc) -
issm/trunk-jpl/src/m/classes/qmu/linear_equality_constraint.m
r9548 r13646 35 35 scale = 1.; 36 36 end 37 37 38 38 methods 39 39 function [lec]=linear_equality_constraint(varargin) … … 69 69 lec(asizec{:})=linear_equality_constraint; 70 70 clear asizec 71 71 72 72 for i=1:numel(lec) 73 73 if (size(varargin{1},1) > 1) … … 167 167 end 168 168 end 169 169 170 170 methods (Static) 171 171 function []=dakota_write(fidi,dvar) -
issm/trunk-jpl/src/m/classes/qmu/linear_inequality_constraint.m
r9548 r13646 37 37 scale = 1.; 38 38 end 39 39 40 40 methods 41 41 function [lic]=linear_inequality_constraint(varargin) … … 77 77 lic(asizec{:})=linear_inequality_constraint; 78 78 clear asizec 79 79 80 80 for i=1:numel(lic) 81 81 if (size(varargin{1},1) > 1) … … 189 189 end 190 190 end 191 191 192 192 methods (Static) 193 193 function []=dakota_write(fidi,dvar) … … 203 203 end 204 204 end 205 -
issm/trunk-jpl/src/m/classes/qmu/nonlinear_equality_constraint.m
r9548 r13646 35 35 scale = 1.; 36 36 end 37 37 38 38 methods 39 39 function [nec]=nonlinear_equality_constraint(varargin) … … 61 61 nec(asizec{:})=nonlinear_equality_constraint; 62 62 clear asizec 63 63 64 64 if ischar(varargin{1}) 65 65 varargin{1}=cellstr(varargin{1}); … … 171 171 end 172 172 end 173 173 174 174 methods (Static) 175 175 function [rdesc]=dakota_write(fidi,dresp,rdesc) -
issm/trunk-jpl/src/m/classes/qmu/nonlinear_inequality_constraint.m
r9548 r13646 37 37 scale = 1.; 38 38 end 39 39 40 40 methods 41 41 function [nic]=nonlinear_inequality_constraint(varargin) … … 69 69 nic(asizec{:})=nonlinear_inequality_constraint; 70 70 clear asizec 71 71 72 72 if ischar(varargin{1}) 73 73 varargin{1}=cellstr(varargin{1}); … … 189 189 end 190 190 end 191 191 192 192 methods (Static) 193 193 function [rdesc]=dakota_write(fidi,dresp,rdesc) -
issm/trunk-jpl/src/m/classes/qmu/normal_uncertain.m
r9548 r13646 37 37 upper = Inf; 38 38 end 39 39 40 40 methods 41 41 function [nuv]=normal_uncertain(varargin) … … 69 69 nuv(asizec{:})=normal_uncertain; 70 70 clear asizec 71 71 72 72 if ischar(varargin{1}) 73 73 varargin{1}=cellstr(varargin{1}); … … 193 193 end 194 194 end 195 195 196 196 methods (Static) 197 197 function []=dakota_write(fidi,dvar) -
issm/trunk-jpl/src/m/classes/qmu/objective_function.m
r9548 r13646 35 35 weight = 1.; 36 36 end 37 37 38 38 methods 39 39 function [of]=objective_function(varargin) … … 54 54 of(asizec{:})=objective_function; 55 55 clear asizec 56 56 57 57 if ischar(varargin{1}) 58 58 varargin{1}=cellstr(varargin{1}); … … 169 169 end 170 170 end 171 171 172 172 methods (Static) 173 173 function [rdesc]=dakota_write(fidi,dresp,rdesc) -
issm/trunk-jpl/src/m/classes/qmu/response_function.m
r9548 r13646 37 37 grell =[]; 38 38 end 39 39 40 40 methods 41 41 function [rf]=response_function(varargin) … … 56 56 rf(asizec{:})=response_function; 57 57 clear asizec 58 58 59 59 if ischar(varargin{1}) 60 60 varargin{1}=cellstr(varargin{1}); … … 166 166 end 167 167 end 168 168 169 169 methods (Static) 170 170 function [rdesc]=dakota_write(fidi,dresp,rdesc) … … 178 178 [rdesc]=rlist_write(fidi,'response_functions','response_function',rf,rdesc); 179 179 end 180 180 181 181 function []=dakota_rlev_write(fidi,dresp,params) 182 182 -
issm/trunk-jpl/src/m/classes/qmu/uniform_uncertain.m
r9548 r13646 32 32 upper = Inf; 33 33 end 34 34 35 35 methods 36 36 function [uuv]=uniform_uncertain(varargin) … … 64 64 uuv(asizec{:})=uniform_uncertain; 65 65 clear asizec 66 66 67 67 if ischar(varargin{1}) 68 68 varargin{1}=cellstr(varargin{1}); … … 152 152 end 153 153 end 154 154 155 155 methods (Static) 156 156 function []=dakota_write(fidi,dvar) -
issm/trunk-jpl/src/m/classes/surfaceforcings.m
r13521 r13646 37 37 end % }}} 38 38 function obj = setdefaultparameters(obj) % {{{ 39 39 40 40 %pdd method not used in default mode 41 41 obj.ispdd=0; -
issm/trunk-jpl/src/m/classes/verbose.m
r13435 r13646 109 109 end % }}} 110 110 function disp(verbose) % {{{ 111 111 112 112 %BEGINDISP 113 113 disp(sprintf('class ''%s'' = ',class(verbose))); -
issm/trunk-jpl/src/m/consistency/ismodelselfconsistent.m
r13043 r13646 46 46 % Usage: 47 47 % [analyses, numanalyses]=AnalysisConfiguration(solutiontype); 48 49 50 48 51 49 switch solutiontype, -
issm/trunk-jpl/src/m/contrib/bamg/YamsCall.m
r13170 r13646 53 53 fprintf(fid,'%i %i %i %i\n',[md.mesh.elements zeros(md.mesh.numberofelements,1)]'); 54 54 numberofelements1=md.mesh.numberofelements; 55 55 56 56 %Deal with rifts 57 57 if ~isnan(md.rifts.riftstruct), 58 58 59 59 %we have the list of triangles that make up the rift. keep those triangles around during refinement. 60 60 triangles=[]; -
issm/trunk-jpl/src/m/contrib/bamg/yams.m
r13012 r13646 102 102 103 103 end 104 104 105 105 disp(['Final mesh, number of elements: ' num2str(md.mesh.numberofelements)]); 106 106 -
issm/trunk-jpl/src/m/contrib/uci/expremovestraightsegments.m
r13010 r13646 11 11 for i=1:length(a), 12 12 contour=a(i); 13 13 14 14 s=sqrt(contour.x.^2+contour.y.^2); 15 15 d=diff(s); 16 16 17 17 pos=find(abs(d)>cutoff); 18 18 pos=[0;pos;length(contour.x)]; -
issm/trunk-jpl/src/m/exp/expcontract.m
r12691 r13646 6 6 % 7 7 % See also EXPMASTER, EXPDOC 8 9 8 10 9 contour=expread(oldfile); -
issm/trunk-jpl/src/m/exp/expcreatecontour.m
r13010 r13646 34 34 %write contour using expwrite 35 35 expwrite(a,filename); 36 -
issm/trunk-jpl/src/m/exp/expexcludeoutliers.m
r13010 r13646 7 7 % 8 8 % See also EXPMASTER, EXPDOC 9 10 9 11 10 contour=expread(contourname); -
issm/trunk-jpl/src/m/exp/expflip.m
r5453 r13646 5 5 % 6 6 % 7 8 9 10 11 7 12 8 a=expread(domainname,1); -
issm/trunk-jpl/src/m/exp/expll2xy.m
r12570 r13646 5 5 % - sgn = Sign of latitude +1 : north latitude (default is mer=45 lat=70) 6 6 % -1 : south latitude (default is mer=0 lat=71) 7 8 7 9 8 %Get central_meridian and standard_parallel depending on hemisphere -
issm/trunk-jpl/src/m/exp/expswapxy.m
r8469 r13646 6 6 % 7 7 % See also EXPMASTER, EXPDOC 8 9 8 10 9 contours=expread(filename,1); -
issm/trunk-jpl/src/m/exp/exptool.m
r13026 r13646 308 308 backup{counter,4}=closed; 309 309 310 311 310 case 12 312 311 -
issm/trunk-jpl/src/m/exp/expwrite.m
r13341 r13646 20 20 error('contours x and y coordinates must be of identical size'); 21 21 end 22 22 23 23 if isfield(a,'name'), 24 24 if ~isempty(a(n).name), … … 30 30 fprintf(fid,'%s\n','## Name:'); 31 31 end 32 32 33 33 fprintf(fid,'%s\n','## Icon:0'); 34 34 fprintf(fid,'%s\n','# Points Count Value'); -
issm/trunk-jpl/src/m/exp/expxy2ll.m
r12570 r13646 5 5 % - sgn = Sign of latitude +1 : north latitude (default is mer=45 lat=70) 6 6 % -1 : south latitude (default is mer=0 lat=71) 7 8 7 9 8 %Get central_meridian and standard_parallel depending on hemisphere -
issm/trunk-jpl/src/m/exp/manipulation/addcontour.m
r8662 r13646 7 7 % Usage: 8 8 % [A,numprofiles,numpoints,closed]=addcontour(A,numprofiles,numpoints,closed,prevplot,root,options) 9 9 10 10 title('click to add a point to the new profile, RETURN to exit','FontSize',14) 11 11 hold on … … 18 18 19 19 [xi,yi] = ginput(1); 20 20 21 21 if ~isempty(xi) 22 22 x(end+1,1)=xi; -
issm/trunk-jpl/src/m/exp/manipulation/addendprofile.m
r8662 r13646 7 7 % Usage: 8 8 % [A,numprofiles,numpoints,closed]=addendprofile(A,numprofiles,numpoints,closed,prevplot,root,options) 9 9 10 10 %some checks 11 11 if numprofiles==0 -
issm/trunk-jpl/src/m/exp/manipulation/addinsideprofile.m
r8662 r13646 7 7 % Usage: 8 8 % [A,numprofiles,numpoints,closed]=addinsideprofile(A,numprofiles,numpoints,closed,prevplot,root,options) 9 9 10 10 %some checks 11 11 if numprofiles==0 -
issm/trunk-jpl/src/m/exp/manipulation/addprofile.m
r8662 r13646 7 7 % Usage: 8 8 % [A,numprofiles,numpoints,closed]=addprofile(A,numprofiles,numpoints,closed,prevplot,root,options) 9 9 10 10 title('click to add a point to the new profile, RETURN to exit','FontSize',14) 11 11 hold on … … 18 18 19 19 [xi,yi] = ginput(1); 20 20 21 21 if ~isempty(xi) 22 22 x(end+1,1)=xi; -
issm/trunk-jpl/src/m/exp/manipulation/closeprofile.m
r8662 r13646 13 13 return 14 14 end 15 15 16 16 title('click on the profiles to be closed, RETURN to exit','FontSize',14) 17 17 hold on … … 33 33 34 34 [xi,yi] = ginput(1); 35 35 36 36 if ~isempty(xi) 37 37 -
issm/trunk-jpl/src/m/exp/manipulation/cutarea.m
r12617 r13646 10 10 % Usage: 11 11 % [A,numprofiles,numpoints,closed]=cutarea(A,numprofiles,numpoints,closed,prevplot,root,options) 12 12 13 13 hold on 14 14 loop=1; -
issm/trunk-jpl/src/m/exp/manipulation/cutprofile.m
r8662 r13646 7 7 % Usage: 8 8 % [A,numprofiles,numpoints,closed]=cutprofile(A,numprofiles,numpoints,closed,prevplot,root,options) 9 9 10 10 %some checks 11 11 if numprofiles==0 -
issm/trunk-jpl/src/m/exp/manipulation/modifyposition.m
r8662 r13646 7 7 % Usage: 8 8 % [A,numprofiles,numpoints,closed]=modifyposition(A,numprofiles,numpoints,closed,prevplot,root,options) 9 9 10 10 %some checks 11 11 if numprofiles==0 -
issm/trunk-jpl/src/m/exp/manipulation/orientprofile.m
r13026 r13646 21 21 return 22 22 end 23 23 24 24 [xi,yi] = ginput(1); 25 25 26 26 if ~isempty(xi) 27 27 -
issm/trunk-jpl/src/m/exp/manipulation/removepoints.m
r8662 r13646 7 7 % Usage: 8 8 % [A,numprofiles,numpoints,closed]=removepoints(A,numprofiles,numpoints,closed,prevplot,root,options) 9 9 10 10 %some checks 11 11 if numprofiles==0 -
issm/trunk-jpl/src/m/exp/manipulation/removeprofile.m
r8662 r13646 21 21 return 22 22 end 23 23 24 24 [xi,yi] = ginput(1); 25 25 26 26 if ~isempty(xi) 27 27 -
issm/trunk-jpl/src/m/exp/manipulation/removeseveralpoints.m
r8662 r13646 7 7 % Usage: 8 8 % [A,numprofiles,numpoints,closed]=removeseveralpoints(A,numprofiles,numpoints,closed,prevplot,root,options) 9 9 10 10 %some checks 11 11 if numprofiles==0 -
issm/trunk-jpl/src/m/geometry/SegIntersect.m
r13351 r13646 49 49 O1C=O2O1'*O1C; 50 50 O1D=O2O1'*O1D; 51 51 52 52 %test if one point is included in the other segment (->bval=1) 53 53 if (O1C-O1A)*(O1D-O1A)<0 -
issm/trunk-jpl/src/m/interp/SectionValues.m
r13008 r13646 22 22 y=infile.y; 23 23 end 24 25 24 26 25 %get the specified resolution -
issm/trunk-jpl/src/m/inversions/parametercontrolB.m
r13006 r13646 38 38 md.inversion.nsteps=nsteps; 39 39 end 40 41 40 42 41 %cm_min -
issm/trunk-jpl/src/m/kml/edgeadjacency.m
r6312 r13646 31 31 inode1=elem(i,j); 32 32 inode2=elem(i,mod(j,size(elem,2))+1); 33 33 34 34 % loop over the elements containing the first node of the edge to see 35 35 % if they contain the second node of the edge -
issm/trunk-jpl/src/m/kml/exp2kml.m
r12997 r13646 6 6 % 7 7 8 9 8 %First, read exp file 10 9 domain=expread(input); 11 12 10 13 11 %then transform: -
issm/trunk-jpl/src/m/kml/kml2exp.m
r12997 r13646 6 6 % 7 7 8 9 10 11 8 %First, read polygon kml file. 12 9 structure=kml_shapefile(input); 13 10 14 11 %create exp file: 15 12 domain=struct(); -
issm/trunk-jpl/src/m/kml/kml_colorstyle.m
r7460 r13646 18 18 colormode ='normal'; 19 19 end 20 20 21 21 methods 22 22 function [kml]=kml_colorstyle(varargin) … … 160 160 161 161 end 162 162 163 163 % string write the object 164 164 … … 196 196 197 197 end 198 198 199 199 end 200 200 201 201 end 202 -
issm/trunk-jpl/src/m/kml/kml_container.m
r7460 r13646 21 21 properties 22 22 end 23 23 24 24 methods 25 25 function [kml]=kml_container(varargin) … … 150 150 151 151 end 152 152 153 153 % string write the object 154 154 … … 180 180 181 181 end 182 182 183 183 % delete the object 184 184 … … 193 193 194 194 end 195 195 196 196 end 197 197 198 198 end 199 -
issm/trunk-jpl/src/m/kml/kml_document.m
r7460 r13646 23 23 feature ={}; 24 24 end 25 25 26 26 methods 27 27 function [kml]=kml_document(varargin) … … 162 162 163 163 end 164 164 165 165 % string write the object 166 166 … … 202 202 203 203 end 204 204 205 205 % delete the object 206 206 … … 230 230 231 231 end 232 232 233 233 end 234 234 235 235 end 236 -
issm/trunk-jpl/src/m/kml/kml_feature.m
r7460 r13646 28 28 style ={}; 29 29 end 30 30 31 31 methods 32 32 function [kml]=kml_feature(varargin) … … 204 204 205 205 end 206 206 207 207 % string write the object 208 208 … … 262 262 263 263 end 264 264 265 265 % delete the object 266 266 … … 289 289 290 290 end 291 291 292 292 end 293 293 294 294 end 295 -
issm/trunk-jpl/src/m/kml/kml_file_swrite.m
r7418 r13646 130 130 131 131 end 132 -
issm/trunk-jpl/src/m/kml/kml_file_write.m
r7270 r13646 124 124 125 125 end 126 -
issm/trunk-jpl/src/m/kml/kml_folder.m
r7460 r13646 23 23 feature ={}; 24 24 end 25 25 26 26 methods 27 27 function [kml]=kml_folder(varargin) … … 162 162 163 163 end 164 164 165 165 % string write the object 166 166 … … 202 202 203 203 end 204 204 205 205 % delete the object 206 206 … … 230 230 231 231 end 232 232 233 233 end 234 234 235 235 end 236 -
issm/trunk-jpl/src/m/kml/kml_geometry.m
r7460 r13646 14 14 properties 15 15 end 16 16 17 17 methods 18 18 function [kml]=kml_geometry(varargin) … … 143 143 144 144 end 145 145 146 146 % string write the object 147 147 … … 173 173 174 174 end 175 175 176 176 end 177 177 178 178 end 179 -
issm/trunk-jpl/src/m/kml/kml_linearring.m
r7461 r13646 22 22 coords =zeros(0,3); 23 23 end 24 24 25 25 methods 26 26 function [kml]=kml_linearring(varargin) … … 165 165 166 166 end 167 167 168 168 % string write the object 169 169 … … 203 203 204 204 end 205 205 206 206 end 207 207 208 208 end 209 -
issm/trunk-jpl/src/m/kml/kml_linestring.m
r7460 r13646 22 22 coords =zeros(0,3); 23 23 end 24 24 25 25 methods 26 26 function [kml]=kml_linestring(varargin) … … 165 165 166 166 end 167 167 168 168 % string write the object 169 169 … … 203 203 204 204 end 205 205 206 206 end 207 207 208 208 end 209 -
issm/trunk-jpl/src/m/kml/kml_linestyle.m
r7460 r13646 18 18 width =1; 19 19 end 20 20 21 21 methods 22 22 function [kml]=kml_linestyle(varargin) … … 143 143 144 144 end 145 145 146 146 % string write the object 147 147 … … 170 170 171 171 end 172 172 173 173 end 174 174 175 175 end 176 -
issm/trunk-jpl/src/m/kml/kml_mesh_elem.m
r9733 r13646 100 100 cmap=colormap; 101 101 close(hfig) 102 102 103 103 if exist('edata','var') 104 104 if ~exist('cmin','var') … … 175 175 176 176 end 177 -
issm/trunk-jpl/src/m/kml/kml_mesh_write.m
r9733 r13646 193 193 cmap=colormap; 194 194 close(hfig) 195 195 196 196 disp(['Writing ' num2str(size(cmap,1)) ' Matlab colors as KML style templates.']); 197 197 for i=1:size(cmap,1) … … 259 259 260 260 end 261 -
issm/trunk-jpl/src/m/kml/kml_multigeometry.m
r7460 r13646 16 16 geometry ={}; 17 17 end 18 18 19 19 methods 20 20 function [kml]=kml_multigeometry(varargin) … … 156 156 157 157 end 158 158 159 159 % string write the object 160 160 … … 197 197 198 198 end 199 199 200 200 % delete the object 201 201 … … 225 225 226 226 end 227 227 228 228 end 229 229 230 230 end 231 -
issm/trunk-jpl/src/m/kml/kml_object.m
r7460 r13646 15 15 id =''; 16 16 end 17 17 18 18 methods 19 19 function [kml]=kml_object(varargin) … … 144 144 145 145 end 146 146 147 147 % string write the object 148 148 … … 174 174 175 175 end 176 176 177 177 end 178 178 179 179 end 180 -
issm/trunk-jpl/src/m/kml/kml_part_edges.m
r12028 r13646 101 101 cmap=colormap; 102 102 close(hfig) 103 103 104 104 if exist('edata','var') 105 105 if ~exist('cmin','var') … … 139 139 for k=1:md.qmu.numberofpartitions 140 140 % disp(['partition k=' int2str(k)]) 141 141 142 142 % for each partition, find all the included elements and determine the 143 143 % perimeter (including those shared by another partition) … … 154 154 [edgeper,elemper,iloop]=edgeperimeter(elemp,nodeconp,edgeadjp); 155 155 iloop(end+1)=size(edgeper,1)+1; 156 156 157 157 % determine the data to be used for the colors (if any) 158 158 … … 170 170 end 171 171 end 172 172 173 173 % set up the placemark with multigeometry 174 174 … … 211 211 lat=[]; 212 212 long=[]; 213 213 214 214 % loop over the element edges on the loop of the partition 215 215 … … 241 241 slast=0; 242 242 j=j+1; 243 243 244 244 % element not entirely within partition, so figure out boundary 245 245 else … … 327 327 end 328 328 nlast=0; 329 329 330 330 % write out midpoint of first side 331 331 kline.coords(end+1,:)=[(md.mesh.long(elemp(ielem,slast))... … … 481 481 482 482 end 483 -
issm/trunk-jpl/src/m/kml/kml_part_elems.m
r9733 r13646 101 101 cmap=colormap; 102 102 close(hfig) 103 103 104 104 if exist('edata','var') 105 105 if ~exist('cmin','var') … … 215 215 216 216 end 217 -
issm/trunk-jpl/src/m/kml/kml_part_flagedges.m
r9733 r13646 108 108 109 109 end 110 -
issm/trunk-jpl/src/m/kml/kml_partitions.m
r12028 r13646 102 102 cmap=colormap; 103 103 close(hfig) 104 104 105 105 if exist('edata','var') 106 106 if ~exist('cmin','var') … … 140 140 for k=1:md.qmu.numberofpartitions 141 141 % disp(['partition k=' int2str(k)]) 142 142 143 143 % for each partition, find all the included elements and determine the 144 144 % perimeter (including those shared by another partition) … … 171 171 end 172 172 end 173 173 174 174 % set up the placemark with multigeometry 175 175 … … 197 197 kmgeom=kml_multigeometry(); 198 198 kmgeom.geometry ={repmat(kml_polygon(),1,length(iloop)-1)}; 199 199 200 200 % loop over each loop of the perimeter for the given partition 201 201 … … 213 213 lat=[]; 214 214 long=[]; 215 215 216 216 % loop over the element edges on the loop of the partition 217 217 … … 243 243 slast=0; 244 244 j=j+1; 245 245 246 246 % element not entirely within partition, so figure out boundary 247 247 else … … 329 329 end 330 330 nlast=0; 331 331 332 332 % write out midpoint of first side 333 333 kring.coords(end+1,:)=[(md.mesh.long(elemp(ielem,slast))... … … 484 484 485 485 end 486 -
issm/trunk-jpl/src/m/kml/kml_placemark.m
r7460 r13646 23 23 geometry =kml_geometry.empty(); 24 24 end 25 25 26 26 methods 27 27 function [kml]=kml_placemark(varargin) … … 163 163 164 164 end 165 165 166 166 % string write the object 167 167 … … 204 204 205 205 end 206 206 207 207 % delete the object 208 208 … … 233 233 234 234 end 235 235 236 236 end 237 237 238 238 end 239 -
issm/trunk-jpl/src/m/kml/kml_polygon.m
r7460 r13646 24 24 inner =kml_linearring.empty(); 25 25 end 26 26 27 27 methods 28 28 function [kml]=kml_polygon(varargin) … … 183 183 184 184 end 185 185 186 186 % string write the object 187 187 … … 234 234 235 235 end 236 236 237 237 % delete the object 238 238 … … 266 266 267 267 end 268 268 269 269 end 270 270 271 271 end 272 -
issm/trunk-jpl/src/m/kml/kml_polystyle.m
r7460 r13646 20 20 outline =true; 21 21 end 22 22 23 23 methods 24 24 function [kml]=kml_polystyle(varargin) … … 148 148 149 149 end 150 150 151 151 % string write the object 152 152 … … 176 176 177 177 end 178 178 179 179 end 180 180 181 181 end 182 -
issm/trunk-jpl/src/m/kml/kml_style.m
r7460 r13646 30 30 list =[]; 31 31 end 32 32 33 33 methods 34 34 function [kml]=kml_style(varargin) … … 206 206 207 207 end 208 208 209 209 % string write the object 210 210 … … 268 268 269 269 end 270 270 271 271 % delete the object 272 272 … … 322 322 323 323 end 324 324 325 325 end 326 326 327 327 end 328 -
issm/trunk-jpl/src/m/kml/kml_styleselector.m
r7460 r13646 14 14 properties 15 15 end 16 16 17 17 methods 18 18 function [kml]=kml_styleselector(varargin) … … 143 143 144 144 end 145 145 146 146 % string write the object 147 147 … … 173 173 174 174 end 175 175 176 176 end 177 177 178 178 end 179 -
issm/trunk-jpl/src/m/kml/kml_substyle.m
r7460 r13646 14 14 properties 15 15 end 16 16 17 17 methods 18 18 function [kml]=kml_substyle(varargin) … … 143 143 144 144 end 145 145 146 146 % string write the object 147 147 … … 173 173 174 174 end 175 175 176 176 end 177 177 178 178 end 179 -
issm/trunk-jpl/src/m/kml/kml_unsh_edges.m
r12028 r13646 114 114 115 115 end 116 -
issm/trunk-jpl/src/m/kml/string_buf.m
r7336 r13646 173 173 174 174 end 175 175 176 176 % reset the object 177 177 … … 183 183 184 184 end 185 185 186 186 end 187 187 188 188 end 189 -
issm/trunk-jpl/src/m/mech/basalstress.m
r13005 r13646 6 6 % 7 7 % See also: plot_basaldrag 8 9 8 10 9 %compute exponents -
issm/trunk-jpl/src/m/mesh/FixMesh.m
r13012 r13646 32 32 %now, the index: 33 33 pos=find(index2>orphan); index2(pos)=index2(pos)-1; 34 34 35 35 %look again for orphans on new mesh 36 36 flags=zeros(length(x2),1);flags(index2)=1; -
issm/trunk-jpl/src/m/mesh/NodeInElement.m
r13012 r13646 25 25 x0=newx(i); 26 26 y0=newy(i); 27 27 28 28 %first area coordinate 29 29 area_1=(y3y2.*(x0-x3)-x3x2.*(y0-y3))./delta; … … 32 32 %third area coordinate 33 33 area_3=1-area_1-area_2; 34 34 35 35 %get elements for which all area coordinates are positive (meaning (x0,y0) belongs to these elements 36 36 pos=find((area_1>=0-epsilon) & (area_2>=0-epsilon) & (area_3>=0-epsilon)); -
issm/trunk-jpl/src/m/mesh/bamg.m
r13495 r13646 236 236 requiredvertices=double(getfieldvalue(options,'RequiredVertices')); %for some reason, it is of class "single" 237 237 if(size(requiredvertices,2)==2), requiredvertices=[requiredvertices 4.*ones(size(requiredvertices,1),1)]; end 238 238 239 239 %only keep those inside 240 240 flags=ContourToNodes(requiredvertices(:,1),requiredvertices(:,2),domain(1),0); -
issm/trunk-jpl/src/m/mesh/planet/mesh_refine_tri4.m
r12913 r13646 29 29 % 30 30 31 32 31 % ---this method is not implemented, but the idea here remains... 33 32 % This can be done until some minimal distance (D) of the mean … … 36 35 % Alternatively, it could be done until some minimum mean 37 36 % area of faces is achieved. As is, it just refines once. 38 39 37 40 38 % $Revision: 1.1 $ $Date: 2004/11/12 01:32:35 $ … … 80 78 81 79 for f = 1:Nface, 82 80 83 81 % Get the triangle vertex indices 84 82 NA = FV.faces(f,1); 85 83 NB = FV.faces(f,2); 86 84 NC = FV.faces(f,3); 87 85 88 86 % Get the triangle vertex coordinates 89 87 A = FV.vertices(NA,:); 90 88 B = FV.vertices(NB,:); 91 89 C = FV.vertices(NC,:); 92 90 93 91 % Now find the midpoints between vertices 94 92 a = (A + B) ./ 2; 95 93 b = (B + C) ./ 2; 96 94 c = (C + A) ./ 2; 97 95 98 96 % Find the length of each median 99 97 %A2blen = sqrt ( sum( (A - b).^2, 2 ) ); 100 98 %B2clen = sqrt ( sum( (B - c).^2, 2 ) ); 101 99 %C2alen = sqrt ( sum( (C - a).^2, 2 ) ); 102 100 103 101 % Store the midpoint vertices, while 104 102 % checking if midpoint vertex already exists … … 106 104 [FV, Nb] = mesh_find_vertex(FV,b); 107 105 [FV, Nc] = mesh_find_vertex(FV,c); 108 106 109 107 % Create new faces with orig vertices plus midpoints 110 108 F2(f*4-3,:) = [ NA, Na, Nc ]; … … 112 110 F2(f*4-1,:) = [ Nc, Nb, NC ]; 113 111 F2(f*4-0,:) = [ Na, Nb, Nc ]; 114 112 115 113 end 116 114 … … 121 119 122 120 return 123 124 121 125 122 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -
issm/trunk-jpl/src/m/mesh/planet/planetmixedmesh.m
r12981 r13646 33 33 for j=1:nthetha-1, 34 34 count=(i-1)*(nthetha-1)+j; 35 35 36 36 A=(i-1)*nthetha+j; 37 37 B=(i-1)*nthetha+j+1; 38 38 C=(i)*nthetha+j+1; 39 39 D=(i)*nthetha+j; 40 40 41 41 quads(count,:)=[A B C D]; 42 42 end … … 64 64 quads=[trias;quads]; 65 65 66 67 66 % now add south pole: 68 67 phii=180*conv; … … 85 84 quads=[quads;trias]; 86 85 87 88 86 md.mesh.elements=quads; 89 87 md.mesh.x=x; -
issm/trunk-jpl/src/m/mesh/planet/sphere_project.m
r12913 r13646 50 50 % use of arctan functions, which have branches. 51 51 52 53 52 % Convert Cartesian X,Y,Z to spherical (radians) 54 53 theta = atan2( (Y-yo), (X-xo) ); -
issm/trunk-jpl/src/m/mesh/planet/sphere_tri.m
r12913 r13646 43 43 % See also: mesh_refine, sphere_project 44 44 % 45 46 47 45 48 46 % $Revision: 1.2 $ $Date: 2005/07/20 23:07:03 $ … … 80 78 end 81 79 82 83 80 % ----------------- 84 81 % define the starting shapes … … 88 85 switch shape, 89 86 case 'tetra', 90 87 91 88 % Vertices of a tetrahedron 92 89 sqrt_3 = 0.5773502692; 93 90 94 91 tetra.v = [ sqrt_3, sqrt_3, sqrt_3 ; % +X, +Y, +Z - PPP 95 92 -sqrt_3, -sqrt_3, sqrt_3 ; % -X, -Y, +Z - MMP 96 93 -sqrt_3, sqrt_3, -sqrt_3 ; % -X, +Y, -Z - MPM 97 94 sqrt_3, -sqrt_3, -sqrt_3 ]; % +X, -Y, -Z - PMM 98 95 99 96 % Structure describing a tetrahedron 100 97 tetra.f = [ 1, 2, 3; … … 102 99 3, 2, 4; 103 100 4, 1, 3 ]; 104 101 105 102 FV.vertices = tetra.v; 106 103 FV.faces = tetra.f; 107 104 108 105 case 'oct', 109 106 110 107 % Six equidistant points lying on the unit sphere 111 108 oct.v = [ 1, 0, 0 ; % X … … 115 112 0, 0, 1 ; % Z 116 113 0, 0, -1 ]; % -Z 117 114 118 115 % Join vertices to create a unit octahedron 119 116 oct.f = [ 1 5 3 ; % X Z Y - First the top half … … 125 122 2 4 6 ; % -X Z -Z 126 123 4 1 6 ]; % -Y Z -Z 127 124 128 125 FV.vertices = oct.v; 129 126 FV.faces = oct.f; 130 127 131 128 case 'ico', 132 129 133 130 % Twelve vertices of icosahedron on unit sphere 134 131 tau = 0.8506508084; % t=(1+sqrt(5))/2, tau=t/sqrt(1+t^2) 135 132 one = 0.5257311121; % one=1/sqrt(1+t^2) , unit sphere 136 133 137 134 ico.v( 1,:) = [ tau, one, 0 ]; % ZA 138 135 ico.v( 2,:) = [ -tau, one, 0 ]; % ZB … … 147 144 ico.v(11,:) = [ 0 , -tau, -one ]; % XC 148 145 ico.v(12,:) = [ 0 , tau, -one ]; % XD 149 146 150 147 % Structure for unit icosahedron 151 148 ico.f = [ 5, 8, 9 ; … … 169 166 8, 10, 3 ; 170 167 7, 3, 11 ]; 171 168 172 169 FV.vertices = ico.v; 173 170 FV.faces = ico.f; 174 171 end 175 176 172 177 173 % ----------------- 178 174 % refine the starting shapes with subdivisions 179 175 if maxlevel, 180 176 181 177 % Subdivide each starting triangle (maxlevel) times 182 178 for level = 1:maxlevel, 183 179 184 180 % Subdivide each triangle and normalize the new points thus 185 181 % generated to lie on the surface of a sphere radius r. 186 182 FV = mesh_refine_tri4(FV); 187 183 FV.vertices = sphere_project(FV.vertices,r); 188 184 189 185 % An alternative might be to define a min distance 190 186 % between vertices and recurse or use fminsearch 191 187 192 188 end 193 189 end -
issm/trunk-jpl/src/m/mesh/rifts/meshaddrifts.m
r9736 r13646 12 12 % be preserved. There can be as many pairs of closed contour and rift contour as wished. 13 13 14 15 14 %read rift: 16 15 domains=expread(riftname,1); … … 20 19 %now loop over rifts: 21 20 for rift_i=1:length(rifts), 22 21 23 22 %refine rift to desired resolution: 24 23 contour=contours(rift_i); 25 24 rift=rifts(rift_i); 26 25 27 26 delete('Meshaddrifts.Rift.exp'); 28 27 expwrite(rift,'Meshaddrifts.Rift.Coarse.exp'); 29 28 expcoarsen('Meshaddrifts.Rift.exp','Meshaddrifts.Rift.Coarse.exp',rift.density); 30 29 delete('Meshaddrifts.Rift.Coarse.exp'); 31 30 32 31 %extract model: 33 32 expwrite(contour,'Meshaddrifts.Contour.exp'); 34 33 md2=modelextract(md,'Meshaddrifts.Contour.exp'); 35 34 36 35 %create domain of md2 model: 37 36 md2.mesh.segments=contourenvelope(md2,'Meshaddrifts.Contour.exp'); … … 41 40 domain_index(end+1)=md2.mesh.segments(pos,2); 42 41 end 43 42 44 43 domain.x=md2.mesh.x(domain_index); 45 44 domain.y=md2.mesh.y(domain_index); … … 47 46 domain.density=1; 48 47 expwrite(domain,'Meshaddrifts.Domain.exp'); 49 48 50 49 %unloop domain index: used for later. 51 50 domain_index=domain_index(1:end-1); 52 51 53 52 %remesh md2 using new domain outline, and rift profile: 54 53 md2=meshnodensity(md2,'Meshaddrifts.Domain.exp','Meshaddrifts.Rift.exp'); 55 54 md2=meshprocessrifts(md2); 56 55 57 56 %plug md2 mesh into md mesh: 58 57 [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,... … … 61 60 %update md2 rifts using elconv and nodeconv, and plug them into md: 62 61 md2.rifts=updateriftindexing(md2.rifts,elconv2,nodeconv2); 63 62 64 63 for i=1:md.rifts.numrifts, 65 64 md.rifts.riftstruct(i)=updateriftindexing(md.rifts.riftstruct(i),elconv,nodeconv); 66 65 end 67 66 68 67 if md.rifts.numrifts==0, 69 68 md.rifts.riftstruct=md2.rifts; … … 73 72 md.rifts.numrifts=md.rifts.numrifts+1; 74 73 end 75 74 76 75 md.mesh.segments(:,1:2)=nodeconv(md.mesh.segments(:,1:2)); 77 76 md.mesh.segments(:,3)=elconv(md.mesh.segments(:,3)); -
issm/trunk-jpl/src/m/mesh/rifts/meshplug.m
r8298 r13646 2 2 %MESHPLUG - embed mesh into another one 3 3 % See also meshaddrifts 4 5 4 6 5 %initialize elconv,nodeconv conversion tables from md mesh to new md mesh … … 48 47 end 49 48 50 51 49 %plug elements 52 50 elements=[elements;elements2]; 53 54 51 55 52 %now, increase number of nodes … … 87 84 nodeconv(temp_nodeconv)=temp_nodeconvnum; 88 85 nodeconv(extractednodes_minusborder)=NaN; 89 -
issm/trunk-jpl/src/m/mesh/rifts/meshprocessoutsiderifts.m
r13524 r13646 6 6 % 7 7 8 9 10 8 %go through rifts, and figure out which ones touch the domain outline 11 9 for i=1:md.rifts.numrifts, 12 10 13 11 %first, flag nodes that belong to the domain outline 14 12 flags=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,domainoutline,'node',0); … … 20 18 %we have found outsidetips, tips that touch the domain outline. go through them 21 19 for j=1:length(outsidetips), 22 20 23 21 tip=outsidetips(j); 24 22 %find tip in the segments, take first segment (there should be 2) that holds tip, … … 52 50 B=md.mesh.elements(nextelement,find(~ismember(md.mesh.elements(nextelement,:),[A B]))); 53 51 end 54 52 55 53 %take the list of elements on one side of the rift that connect to the tip, 56 54 %and duplicate the tip on them, so as to open the rift to the outside. … … 59 57 md.mesh.y=[md.mesh.y;md.mesh.y(tip)]; 60 58 md.mesh.numberofvertices=num; 61 59 62 60 %replace tip in elements 63 61 newelements=md.mesh.elements(elements,:); … … 80 78 end 81 79 end 82 83 80 84 81 %Fill in rest of fields: -
issm/trunk-jpl/src/m/mesh/rifts/rifttipsonmesh.m
r13012 r13646 13 13 x_tip=rift.x(1); 14 14 y_tip=rift.y(1); 15 15 16 16 index=find_point(md.mesh.x,md.mesh.y,x_tip,y_tip); 17 17 tips(end+1)=index; … … 19 19 x_tip=rift.x(end); 20 20 y_tip=rift.y(end); 21 21 22 22 index=find_point(md.mesh.x,md.mesh.y,x_tip,y_tip); 23 23 tips(end+1)=index; 24 24 25 25 end 26 -
issm/trunk-jpl/src/m/miscellaneous/isnans.m
r13011 r13646 5 5 % 6 6 % See also : ISNAN 7 8 7 9 8 if isstruct(array), -
issm/trunk-jpl/src/m/miscellaneous/parallelrange.m
r13010 r13646 12 12 end 13 13 14 15 14 %There may be some rows left. Distribute evenly. 16 15 row_rest=globalsize - numprocs*floor(globalsize/numprocs); -
issm/trunk-jpl/src/m/os/ismpi.m
r13303 r13646 4 4 % Usage: 5 5 % flag=ismpi(); 6 7 6 8 7 configfile=[issmdir() '/bin/config.h']; %should find it in the install target -
issm/trunk-jpl/src/m/os/ismumps.m
r12155 r13646 4 4 % Usage: 5 5 % flag=ismumps(); 6 7 6 8 7 configfile=[issmdir() '/bin/config.h']; %should find it in the install target -
issm/trunk-jpl/src/m/os/ispetsc.m
r12155 r13646 4 4 % Usage: 5 5 % flag=ispetsc(); 6 7 6 8 7 configfile=[issmdir() '/bin/config.h']; %should find it in the install target -
issm/trunk-jpl/src/m/os/issmbbftpin.m
r6204 r13646 35 35 end 36 36 command=[command ''' pfe1.nas.nasa.gov']; 37 37 38 38 eval(command); 39 39 … … 45 45 end 46 46 47 48 47 end -
issm/trunk-jpl/src/m/os/issmbbftpout.m
r6204 r13646 19 19 end 20 20 else 21 21 22 22 %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 23 23 command=['!bbftp -s -V -u ' login ' -e ''setnbstream 8; cd ' path '; '] … … 26 26 end 27 27 command=[command ''' pfe1.nas.nasa.gov']; 28 28 29 29 eval(command); 30 30 end -
issm/trunk-jpl/src/m/os/issmscpin.m
r13170 r13646 31 31 if ispc(), 32 32 %use the putty project pscp.exe: it should be in the path. 33 33 34 34 %get ISSM_DIR variable 35 35 [status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]'); … … 62 62 end 63 63 64 65 64 if port, 66 65 eval(['!scp -P ' num2str(port) ' ' login '@localhost:' path '/' string ' ./']); … … 68 67 eval(['!scp ' login '@' host ':' path '/' string ' ./']); 69 68 end 70 69 71 70 %check scp worked 72 71 for i=1:numel(packages), -
issm/trunk-jpl/src/m/os/issmscpout.m
r13170 r13646 22 22 if ispc(), 23 23 %use the putty project pscp.exe: it should be in the path. 24 24 25 25 %get ISSM_DIR variable 26 26 [status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]'); … … 48 48 end 49 49 string=[string ' ']; 50 50 51 51 if port, 52 52 eval(['!scp -P ' num2str(port) ' ' string ' ' login '@localhost:' path]); -
issm/trunk-jpl/src/m/os/issmssh.m
r13170 r13646 14 14 if ispc(), 15 15 %use the putty project plink.exe: it should be in the path. 16 16 17 17 %get ISSM_DIR variable 18 18 [status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]'); -
issm/trunk-jpl/src/m/os/issmstssh.m
r13633 r13646 5 5 % issmstssh(host,command) 6 6 7 8 7 %just use starcluster command to pipe an ssh command through 9 8 system([starcluster() ' sshmaster ' host ' --user ' login ' ''' command '''']); -
issm/trunk-jpl/src/m/parameterization/contourenvelope.m
r13006 r13646 72 72 nodein=zeros(mesh.numberofvertices,1); 73 73 elemin=zeros(mesh.numberofelements,1); 74 74 75 75 pos=find(flags); 76 76 elemin(pos)=1; -
issm/trunk-jpl/src/m/parameterization/parameterize.m
r13071 r13646 56 56 end 57 57 md.miscellaneous.notes=['Model created by using parameter file: ' parametername ' on: ' datestr(now)]; 58 -
issm/trunk-jpl/src/m/partition/AreaAverageOntoPartition.m
r12173 r13646 15 15 %save 3D model 16 16 md3d=md; 17 17 18 18 md.mesh.elements=md.mesh.elements2d; 19 19 md.mesh.x=md.mesh.x2d; -
issm/trunk-jpl/src/m/partition/partitioner.m
r11315 r13646 50 50 end 51 51 52 53 52 if strcmpi(package,'chaco'), 54 53 … … 57 56 method(1)=3; % global method (3=inertial (geometric)) 58 57 method(3)=0; % vertex weights (0=off, 1=on) 59 58 60 59 %specify bisection 61 60 method(6)=getfieldvalue(options,'section');% ndims (1=bisection, 2=quadrisection, 3=octasection) … … 68 67 weights=[]; 69 68 end 70 69 71 70 % partition into nparts 72 71 part=Chaco(md.qmu.adjacency,weights,[],md.mesh.x, md.mesh.y ,md.mesh.z,method,npart,[])'+1; %index partitions from 1 up. like metis. … … 79 78 end 80 79 maptab=Scotch(md.qmu.adjacency,[],weights,[],'cmplt',[npart]); 81 80 82 81 part=maptab(:,2);%index partitions from 1 up. like metis. 83 84 82 85 83 elseif strcmpi(package,'linear'), -
issm/trunk-jpl/src/m/plot/applyoptions.m
r13564 r13646 6 6 % 7 7 % See also: PLOTMODEL, PARSE_OPTIONS 8 9 8 10 9 %some defaults … … 226 225 else 227 226 %do nothing 228 229 end 230 227 228 end 231 229 232 230 %area … … 320 318 end 321 319 322 323 320 %position of figure 324 321 if exist(options,'figposition'), 325 322 326 323 figposition=getfieldvalue(options,'figposition'); 327 324 if ischar(figposition), -
issm/trunk-jpl/src/m/plot/arrow.m
r13009 r13646 8 8 % 'ratio': default .5 (ratio headarrow/length) 9 9 % 'widthratio': default is 1/10 of length 10 11 10 12 11 %recover options -
issm/trunk-jpl/src/m/plot/checkplotoptions.m
r13009 r13646 53 53 end 54 54 end 55 55 56 56 %text 57 57 if exist(options,'text'), -
issm/trunk-jpl/src/m/plot/latlonoverlay.m
r13009 r13646 117 117 end 118 118 119 120 119 pos=find(x<=xlimits(2) & x>=xlimits(1) & y<=ylimits(2) & y>=ylimits(1)); 121 120 if length(pos)<=1, continue; end -
issm/trunk-jpl/src/m/plot/plot_manager.m
r13009 r13646 33 33 plot_highlightelements(md,options,subplotwidth,i); 34 34 return; 35 35 36 36 case 'qmumean', 37 37 plot_qmumean(md,options,nlines,ncols,i); 38 38 return; 39 39 40 40 case 'qmustddev', 41 41 plot_qmustddev(md,options,nlines,ncols,i); 42 42 return; 43 43 44 44 case 'qmuhistnorm', 45 45 plot_qmuhistnorm(md,options,nlines,ncols,i); … … 118 118 plot_segments(md,options,subplotwidth,i,data) 119 119 return 120 120 121 121 case 'quiver' 122 122 data=[md.initialization.vx md.initialization.vy]; %Go ahead and try plot_unit … … 199 199 error('cannot kmlgroundoverlay on multi-plots'); 200 200 end 201 201 202 202 %call routine to build kml file and image that goes with it. 203 203 kmlgroundoverlay(md,options); -
issm/trunk-jpl/src/m/plot/plot_overlay.m
r13565 r13646 25 25 error('buildoverlay error message: overlay not supported for quiver plots'); 26 26 end 27 28 27 29 28 %radar power -
issm/trunk-jpl/src/m/plot/plot_qmu_mass_flux_segments.m
r13009 r13646 27 27 28 28 %plot normals 29 29 30 30 for j=1:length(segments), 31 31 xstart=mean([segments(j,1) segments(j,3)]); -
issm/trunk-jpl/src/m/plot/plot_qmuhistnorm.m
r13009 r13646 4 4 subplot(nlines,ncols,index); 5 5 hold on 6 7 6 8 7 %recover histnorm data -
issm/trunk-jpl/src/m/plot/plot_qmustddev.m
r13009 r13646 47 47 end 48 48 49 50 49 %now, project onto vertices 51 50 responses_on_node=responses(md.qmu.partition+1); -
issm/trunk-jpl/src/m/plot/plot_riftnumbering.m
r13009 r13646 88 88 end 89 89 90 91 90 %apply options 92 91 options=addfielddefault(options,'title','Rift/Fault location'); -
issm/trunk-jpl/src/m/plot/plot_riftrelvel.m
r13009 r13646 63 63 end 64 64 for i=1:size(md.rifts.riftstruct,1), 65 65 66 66 %get nodes on rift 67 67 penaltypairs=md.rifts.riftstruct(i).penaltypairs; -
issm/trunk-jpl/src/m/plot/plot_rifts.m
r13009 r13646 16 16 offset=getfieldvalue(options,'offset',500); 17 17 if isstruct(md.rifts.riftstruct), 18 18 19 19 for i=1:size(md.rifts.riftstruct,1), 20 20 penaltypairs=md.rifts.riftstruct(i).penaltypairs; -
issm/trunk-jpl/src/m/plot/plot_riftvel.m
r13009 r13646 89 89 end 90 90 91 92 91 %legend 93 92 if isp1 & isp2 -
issm/trunk-jpl/src/m/plot/plot_sarpwr.m
r13009 r13646 17 17 md.mesh.z=md.mesh.z*unit; 18 18 end 19 19 20 20 imagesc(md.radaroverlay.x,md.radaroverlay.y,double(md.radaroverlay.pwr)),set(gca,'YDir','normal');colormap(gray); 21 21 -
issm/trunk-jpl/src/m/plot/plot_section.m
r13009 r13646 115 115 hold on 116 116 117 118 117 %3D 119 118 else -
issm/trunk-jpl/src/m/plot/plot_segments.m
r13009 r13646 42 42 h3=plot(xstart,ystart,'r*'); 43 43 44 45 44 else 46 45 error('plot_segments: 3d plot of segments not supported yet!'); -
issm/trunk-jpl/src/m/plot/plot_thermaltransient_results.m
r13009 r13646 22 22 eval(string); 23 23 clear string; 24 -
issm/trunk-jpl/src/m/plot/plotmodel.m
r13009 r13646 32 32 %go through subplots 33 33 if numberofplots, 34 34 35 35 %Create figure 36 36 if strcmpi(getfieldvalue(options.list{1},'visible','on'),'off'), -
issm/trunk-jpl/src/m/plot/processdata.m
r13440 r13646 74 74 error('plotmodel error message: data not supported yet'); 75 75 end 76 76 77 77 %quiver? 78 78 if datasize(2)>1, -
issm/trunk-jpl/src/m/plot/processmesh.m
r13085 r13646 36 36 z=md.mesh.z; 37 37 end 38 39 38 40 39 if isprop(md.mesh,'elements2d'), elements2d=md.mesh.elements2d; end -
issm/trunk-jpl/src/m/plot/quiver_colorbar.m
r13009 r13646 31 31 fontsize=getfieldvalue(options,'fontsize',14); 32 32 set(hcb,'FontSize',fontsize); 33 33 34 34 if exist(options,'colorbartitle'), 35 35 backup=gca; -
issm/trunk-jpl/src/m/plot/radarpower.m
r13562 r13646 90 90 system('rm -rf ./temp.tif'); 91 91 92 93 92 elseif strcmpi(md.mesh.hemisphere,'s'), 94 93 if highres, -
issm/trunk-jpl/src/m/print/printmodel.m
r13006 r13646 23 23 % printmodel('image','tiff') 24 24 % printmodel('image','eps','margin','on','frame','on','hardcopy','on') 25 26 25 27 26 %get options: … … 54 53 %InvertHardcopy off imposes MATLAB to use the same colors 55 54 set(fig, 'InvertHardcopy', getfieldvalue(options,'hardcopy')); 56 57 55 58 56 %we could have several formats, as a cell array of strings. -
issm/trunk-jpl/src/m/qmu/MassFluxProcessProfile.m
r4773 r13646 7 7 % See also: PROCESS_QMU_RESPONSE_DATA, PREQMU 8 8 9 10 9 %first read the profile points. 11 10 profile=expread([directory '/' profilename]); -
issm/trunk-jpl/src/m/qmu/dakota_cdfs.m
r3092 r13646 136 136 end 137 137 end 138 138 139 139 varargout{1}=dresp; 140 140 141 141 elseif exist('samp','var') && ~isempty(samp) 142 142 cdf=zeros(length(resp)+length(prob)+length(rel)+length(grel),... … … 147 147 resp,prob,rel,grel); 148 148 end 149 149 150 150 varargout{1}=cdf; 151 151 152 152 elseif exist('mean','var' ) && ~isempty(mean ) && ... 153 153 exist('stddev','var') && ~isempty(stddev) … … 159 159 resp,prob,rel,grel); 160 160 end 161 161 162 162 varargout{1}=cdf; 163 163 else … … 178 178 mu =mean(samp); 179 179 sigma=std(samp); 180 180 181 181 cdf=zeros(length(resp)+length(prob)+length(rel)+length(grel),4); 182 182 cdf(:,:)=NaN; -
issm/trunk-jpl/src/m/qmu/dakota_in_data.m
r11642 r13646 88 88 % dmeth=dmeth_params_merge(dmeth,dparams) 89 89 90 91 90 %% variables 92 91 … … 99 98 100 99 end 101 100 102 101 %% responses 103 102 -
issm/trunk-jpl/src/m/qmu/dakota_in_params.m
r5486 r13646 209 209 210 210 end 211 -
issm/trunk-jpl/src/m/qmu/dakota_in_parse.m
r1014 r13646 42 42 % 43 43 function [method,dvar,dresp]=dakota_in_parse(filei) 44 44 45 45 if ~nargin 46 46 help dakota_in_parse … … 631 631 632 632 itoken=itoken+1; 633 633 634 634 % read next line if necessary 635 635 … … 644 644 itoken=1; 645 645 end 646 646 647 647 end 648 648 … … 668 668 itoken=1; 669 669 end 670 670 671 671 % check for equal sign and skip 672 672 -
issm/trunk-jpl/src/m/qmu/dakota_moments.m
r3092 r13646 89 89 moments_calc(dresp(i).sample,alpha); 90 90 end 91 91 92 92 varargout{1}=dresp; 93 93 94 94 elseif exist('samp','var') && ~isempty(samp) 95 95 mean =zeros(1,size(samp,2)); … … 106 106 moments_calc(samp(:,i),alpha); 107 107 end 108 108 109 109 varargout{1}=mean; 110 110 varargout{2}=stddev; -
issm/trunk-jpl/src/m/qmu/dakota_out_parse.m
r6690 r13646 170 170 end 171 171 display(sprintf('Number of columns (Dakota V+R)=%d.',ntokens-1)); 172 172 173 173 % process rows of matrix 174 174 … … 301 301 end 302 302 [ntokens,tokens]=fltokens(fline); 303 303 304 304 % add new response function and moments 305 305 … … 336 336 end 337 337 [ntokens,tokens]=fltokens(fline); 338 338 339 339 % find response function associated with confidence intervals 340 340 … … 464 464 cmat.row =cell(1,1); 465 465 cmat.matrix=zeros(1,ntokens); 466 466 467 467 for i=1:ntokens 468 468 cmat.column(1,i)=cellstr(tokens{1}{i}); 469 469 end 470 470 471 471 % process rows of matrix, reading until blank line 472 472 … … 583 583 display(sprintf(' %s',dresp(idresp).descriptor)); 584 584 end 585 585 586 586 % skip column headings of cdf 587 587 -
issm/trunk-jpl/src/m/qmu/examples/direct.m
r9650 r13646 4 4 md.qmu.params.evaluation_concurrency=1; 5 5 6 7 8 6 %or for matlab direct driver 9 7 md.qmu.params.direct=true; -
issm/trunk-jpl/src/m/qmu/examples/lrel_mmf.m
r9650 r13646 93 93 %part_hist(md.qmu.partition,md.vertex_weight) 94 94 %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 4 4 5 5 for i=1:length(fnames) 6 6 7 7 % for linear constraints, just copy 8 8 -
issm/trunk-jpl/src/m/qmu/importancefactors.m
r9742 r13646 8 8 % Example: factors=importancefactors(md,'drag','max_vel'); 9 9 % 10 11 10 12 11 variablenamelength=length(variablename); -
issm/trunk-jpl/src/m/qmu/lclist_write.m
r12995 r13646 60 60 61 61 end 62 -
issm/trunk-jpl/src/m/qmu/plot/plot_boxplot.m
r7398 r13646 62 62 dresp=varargin{iarg}; 63 63 iarg=iarg+1; 64 64 65 65 % if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg})) 66 66 if iarg <= nargin && iscell(varargin{iarg}) … … 68 68 iarg=iarg+1; 69 69 end 70 70 71 71 descr=cell (1,length(dresp)); 72 72 lsamp=zeros(1,length(dresp)); … … 84 84 sampr=varargin{iarg}; 85 85 iarg=iarg+1; 86 86 87 87 if iarg <= nargin && iscell(varargin{iarg}) 88 88 descr=varargin{iarg}; … … 119 119 iarg=iarg+2; 120 120 end 121 121 122 122 %% draw the plot 123 123 -
issm/trunk-jpl/src/m/qmu/plot/plot_cdf.m
r7398 r13646 77 77 dresp=varargin{iarg}; 78 78 iarg=iarg+1; 79 79 80 80 % if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg})) 81 81 if iarg <= nargin && iscell(varargin{iarg}) … … 188 188 set(hl1(i),'Color',cmap(imap,:)) 189 189 end 190 190 191 191 xlim('auto') 192 192 [xlims]=xlim; … … 278 278 end 279 279 end 280 280 281 281 if strcmpi(pdfplt,'line') 282 282 xplot=xpdf; -
issm/trunk-jpl/src/m/qmu/plot/plot_hist_norm.m
r8732 r13646 89 89 dresp1=varargin{iarg}; 90 90 iarg=iarg+1; 91 91 92 92 % if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg})) 93 93 if iarg <= nargin && iscell(varargin{iarg}) … … 95 95 iarg=iarg+1; 96 96 end 97 97 98 98 descr=cell (1,length(dresp1)); 99 99 lsamp=zeros(1,length(dresp1)); … … 111 111 sampr=varargin{iarg}; 112 112 iarg=iarg+1; 113 113 114 114 lsamp(1:size(sampr,2))=size(sampr,1); 115 115 … … 142 142 iarg=iarg+1; 143 143 end 144 144 145 145 mu =zeros(1,length(dresp2)); 146 146 sigma=zeros(1,length(dresp2)); … … 298 298 end 299 299 end 300 300 301 301 xlim('auto') 302 302 [xlims]=xlim; -
issm/trunk-jpl/src/m/qmu/plot/plot_hist_norm_ci.m
r7398 r13646 78 78 dresp=varargin{iarg}; 79 79 iarg=iarg+1; 80 80 81 81 % if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg})) 82 82 if iarg <= nargin && iscell(varargin{iarg}) … … 84 84 iarg=iarg+1; 85 85 end 86 86 87 87 descr=cell (1,length(dresp)); 88 88 lsamp=zeros(1,length(dresp)); … … 92 92 sampr=zeros(max(lsamp),length(dresp)); 93 93 sampr(:,:)=NaN; 94 94 95 95 mu =zeros(1,length(dresp)); 96 96 sigma =zeros(1,length(dresp)); … … 109 109 sampr=varargin{iarg}; 110 110 iarg=iarg+1; 111 111 112 112 lsamp(1:size(sampr,2))=size(sampr,1); 113 113 … … 121 121 descr=cell(1,size(sampr,2)); 122 122 end 123 123 124 124 mu =zeros(1,size(sampr,2)); 125 125 sigma =zeros(1,size(sampr,2)); … … 325 325 end 326 326 end 327 327 328 328 xlim('auto') 329 329 [xlims]=xlim; -
issm/trunk-jpl/src/m/qmu/plot/plot_if_bars.m
r7398 r13646 66 66 dresp=varargin{iarg}; 67 67 iarg=iarg+1; 68 68 69 69 % if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg})) 70 70 if iarg <= nargin && iscell(varargin{iarg}) … … 72 72 iarg=iarg+1; 73 73 end 74 74 75 75 descr=cell (1,length(dresp)); 76 76 lifr =zeros(1,length(dresp)); … … 125 125 end 126 126 clear ifmean 127 127 128 128 dvar=dvar(index); 129 129 ifr =ifr (:,index); … … 136 136 dvar(nif+1,1)=cellstr(sprintf('others < %f',ifmin)); 137 137 ifr (:,nif+1)=0.; 138 138 139 139 nif2=0; 140 140 dvar2=cell (size(dvar)); 141 141 ifr2 =zeros(size(ifr )); 142 142 143 143 % sum filtered rows and copy unfiltered rows 144 144 … … 152 152 end 153 153 end 154 154 155 155 % copy sums 156 156 157 157 dvar2(nif2+1) =dvar(nif+1); 158 158 ifr2 (:,nif2+1)=ifr (:,nif+1); 159 159 160 160 % copy back and truncate filtered rows 161 161 -
issm/trunk-jpl/src/m/qmu/plot/plot_if_spec.m
r7398 r13646 72 72 dresp=varargin{iarg}; 73 73 iarg=iarg+1; 74 74 75 75 % if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg})) 76 76 if iarg <= nargin && iscell(varargin{iarg}) … … 78 78 iarg=iarg+1; 79 79 end 80 80 81 81 descr=cell (1,length(dresp)); 82 82 lifr =zeros(1,length(dresp)); … … 137 137 end 138 138 clear ifmean 139 139 140 140 dvar=dvar(index); 141 141 ifr =ifr (:,index); … … 148 148 dvar(nif+1,1)=cellstr(sprintf('others < %f',ifmin)); 149 149 ifr (:,nif+1)=0.; 150 150 151 151 nif2=0; 152 152 dvar2=cell (size(dvar)); 153 153 ifr2 =zeros(size(ifr )); 154 154 155 155 % sum filtered rows and copy unfiltered rows 156 156 … … 164 164 end 165 165 end 166 166 167 167 % copy sums 168 168 169 169 dvar2(nif2+1) =dvar(nif+1); 170 170 ifr2 (:,nif2+1)=ifr (:,nif+1); 171 171 172 172 % copy back and truncate filtered rows 173 173 -
issm/trunk-jpl/src/m/qmu/plot/plot_normdist_bars.m
r7398 r13646 73 73 dresp=varargin{iarg}; 74 74 iarg=iarg+1; 75 75 76 76 % if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg})) 77 77 if iarg <= nargin && iscell(varargin{iarg}) … … 82 82 sampr=varargin{iarg}; 83 83 iarg=iarg+1; 84 84 85 85 if iarg <= nargin && iscell(varargin{iarg}) 86 86 descr=varargin{iarg}; … … 92 92 descr=cell(1:size(sampr,2)); 93 93 end 94 94 95 95 dresp=struct([]); 96 96 for i=1:size(sampr,2) -
issm/trunk-jpl/src/m/qmu/plot/plot_normplot.m
r7398 r13646 62 62 dresp=varargin{iarg}; 63 63 iarg=iarg+1; 64 64 65 65 % if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg})) 66 66 if iarg <= nargin && iscell(varargin{iarg}) … … 68 68 iarg=iarg+1; 69 69 end 70 70 71 71 descr=cell (1,length(dresp)); 72 72 lsamp=zeros(1,length(dresp)); … … 84 84 sampr=varargin{iarg}; 85 85 iarg=iarg+1; 86 86 87 87 if iarg <= nargin && iscell(varargin{iarg}) 88 88 descr=varargin{iarg}; … … 119 119 iarg=iarg+2; 120 120 end 121 121 122 122 %% draw the plot 123 123 -
issm/trunk-jpl/src/m/qmu/plot/plot_prob_bars.m
r7398 r13646 57 57 %% assemble the data into a matrix and calculate the increments 58 58 59 60 59 %% process input data and assemble into matrices and increments 61 60 … … 66 65 dresp=varargin{iarg}; 67 66 iarg=iarg+1; 68 67 69 68 % if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg})) 70 69 if iarg <= nargin && iscell(varargin{iarg}) … … 72 71 iarg=iarg+1; 73 72 end 74 73 75 74 descr=cell (1,length(dresp)); 76 75 lcdfr=zeros(1,length(dresp)); -
issm/trunk-jpl/src/m/qmu/plot/plot_rlev_bars.m
r7398 r13646 62 62 dresp=varargin{iarg}; 63 63 iarg=iarg+1; 64 64 65 65 % if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg})) 66 66 if iarg <= nargin && iscell(varargin{iarg}) … … 68 68 iarg=iarg+1; 69 69 end 70 70 71 71 descr=cell (1,length(dresp)); 72 72 lcdfr=zeros(1,length(dresp)); -
issm/trunk-jpl/src/m/qmu/plot/plot_rlev_bars_ci.m
r7398 r13646 74 74 dresp=varargin{iarg}; 75 75 iarg=iarg+1; 76 76 77 77 % if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg})) 78 78 if iarg <= nargin && iscell(varargin{iarg}) … … 83 83 sampr=varargin{iarg}; 84 84 iarg=iarg+1; 85 85 86 86 if iarg <= nargin && iscell(varargin{iarg}) 87 87 descr=varargin{iarg}; … … 93 93 descr=cell(1:size(sampr,2)); 94 94 end 95 95 96 96 dresp=struct([]); 97 97 for i=1:size(sampr,2) … … 136 136 display('Using calculated normal fits from sample data.') 137 137 end 138 138 139 139 if ~isfield(dresp(i),'cdf') || isempty(dresp(i).cdf) 140 140 % use minus/plus integer standard deviations -
issm/trunk-jpl/src/m/qmu/plot/plot_rvsv_line.m
r7398 r13646 74 74 dvar=varargin{iarg}; 75 75 iarg=iarg+1; 76 76 77 77 % if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg})) 78 78 if iarg <= nargin && iscell(varargin{iarg}) … … 80 80 iarg=iarg+1; 81 81 end 82 82 83 83 descv=cell (1,length(dvar)); 84 84 lsamp=zeros(1,length(dvar)); … … 96 96 sampv=varargin{iarg}; 97 97 iarg=iarg+1; 98 98 99 99 if iarg <= nargin && iscell(varargin{iarg}) 100 100 descv=varargin{iarg}; … … 119 119 dresp=varargin{iarg}; 120 120 iarg=iarg+1; 121 121 122 122 % if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg})) 123 123 if iarg <= nargin && iscell(varargin{iarg}) … … 125 125 iarg=iarg+1; 126 126 end 127 127 128 128 descr=cell (1,length(dresp)); 129 129 lsamp=zeros(1,length(dresp)); … … 141 141 sampr=varargin{iarg}; 142 142 iarg=iarg+1; 143 143 144 144 if iarg <= nargin && iscell(varargin{iarg}) 145 145 descr=varargin{iarg}; … … 177 177 iarg=iarg+2; 178 178 end 179 179 180 180 if ~exist('nplotr','var') && ~exist('nplotc','var') 181 181 nplotr=1; … … 225 225 'IconDisplayStyle','off'); % Exclude line from legend 226 226 end 227 227 228 228 % add the annotation 229 229 -
issm/trunk-jpl/src/m/qmu/plot/plot_rvsv_scat3.m
r7398 r13646 79 79 dvar=varargin{iarg}; 80 80 iarg=iarg+1; 81 81 82 82 % if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg})) 83 83 if iarg <= nargin && iscell(varargin{iarg}) … … 85 85 iarg=iarg+1; 86 86 end 87 87 88 88 descv=cell (1,length(dvar)); 89 89 lsamp=zeros(1,length(dvar)); … … 101 101 sampv=varargin{iarg}; 102 102 iarg=iarg+1; 103 103 104 104 if iarg <= nargin && iscell(varargin{iarg}) 105 105 descv=varargin{iarg}; … … 128 128 dresp=varargin{iarg}; 129 129 iarg=iarg+1; 130 130 131 131 % if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg})) 132 132 if iarg <= nargin && iscell(varargin{iarg}) … … 134 134 iarg=iarg+1; 135 135 end 136 136 137 137 descr=cell (1,length(dresp)); 138 138 lsamp=zeros(1,length(dresp)); … … 150 150 sampr=varargin{iarg}; 151 151 iarg=iarg+1; 152 152 153 153 if iarg <= nargin && iscell(varargin{iarg}) 154 154 descr=varargin{iarg}; … … 187 187 iarg=iarg+2; 188 188 end 189 189 190 190 if ~exist('nplotr','var') && ~exist('nplotc','var') 191 191 nplotr=ceil(sqrt(size(sampr,2))); … … 208 208 209 209 for iresp=1:size(sampr,2) 210 210 211 211 % initialize the subplot 212 212 -
issm/trunk-jpl/src/m/qmu/plot/plot_rvsv_surf.m
r7398 r13646 76 76 dvar=varargin{iarg}; 77 77 iarg=iarg+1; 78 78 79 79 % if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg})) 80 80 if iarg <= nargin && iscell(varargin{iarg}) … … 82 82 iarg=iarg+1; 83 83 end 84 84 85 85 descv=cell (1,length(dvar)); 86 86 lsamp=zeros(1,length(dvar)); … … 98 98 sampv=varargin{iarg}; 99 99 iarg=iarg+1; 100 100 101 101 if iarg <= nargin && iscell(varargin{iarg}) 102 102 descv=varargin{iarg}; … … 125 125 dresp=varargin{iarg}; 126 126 iarg=iarg+1; 127 127 128 128 % if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg})) 129 129 if iarg <= nargin && iscell(varargin{iarg}) … … 131 131 iarg=iarg+1; 132 132 end 133 133 134 134 descr=cell (1,length(dresp)); 135 135 lsamp=zeros(1,length(dresp)); … … 147 147 sampr=varargin{iarg}; 148 148 iarg=iarg+1; 149 149 150 150 if iarg <= nargin && iscell(varargin{iarg}) 151 151 descr=varargin{iarg}; … … 184 184 iarg=iarg+2; 185 185 end 186 186 187 187 if ~exist('nplotr','var') && ~exist('nplotc','var') 188 188 nplotr=ceil(sqrt(size(sampr,2))); … … 208 208 z(ixi(i),iyi(i))=sampr(i,iresp); 209 209 end 210 210 211 211 % initialize the subplot 212 212 -
issm/trunk-jpl/src/m/qmu/plot/plot_sampdist_bars.m
r7398 r13646 72 72 dresp=varargin{iarg}; 73 73 iarg=iarg+1; 74 74 75 75 % if iarg <= nargin && (iscell(varargin{iarg}) || ischar(varargin{iarg})) 76 76 if iarg <= nargin && iscell(varargin{iarg}) … … 81 81 sampr=varargin{iarg}; 82 82 iarg=iarg+1; 83 83 84 84 if iarg <= nargin && iscell(varargin{iarg}) 85 85 descr=varargin{iarg}; … … 91 91 descr=cell(1:size(sampr,2)); 92 92 end 93 93 94 94 dresp=struct([]); 95 95 for i=1:size(sampr,2) -
issm/trunk-jpl/src/m/qmu/process_qmu_options.m
r8987 r13646 99 99 outoptions.iparams=iparams; 100 100 outoptions.runmpi=runmpi; 101 -
issm/trunk-jpl/src/m/qmu/process_qmu_response_data.m
r9742 r13646 5 5 % 6 6 % See also PREQMU, PRESOLVE 7 8 7 9 8 %preliminary data … … 22 21 end 23 22 24 25 23 %deal with mass flux profiles 26 24 if process_mass_flux_profiles, … … 30 28 error('process_qmu_response_data error message: could not find a mass_flux exp profile!'); 31 29 end 32 30 33 31 if ~iscell(md.qmu.mass_flux_profiles), 34 32 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 12 12 error('qmu_correlation error message: could not find dresp_dat field in dakota results. you need to run montecarlo before computing correlations'); 13 13 end 14 14 15 15 data=md.qmu.results.dresp_dat; 16 16 -
issm/trunk-jpl/src/m/qmu/qmuisdistributed.m
r5200 r13646 1 1 function found=qmuisdistribted(string) 2 2 %QMUISDISTRIBTED - figure out if a string is a decriptor with a numerical postfix. Like thickness1, or drag10 3 4 3 5 4 %just take last string element, and see if it is numeric. -
issm/trunk-jpl/src/m/qmu/qmumarshall.m
r9650 r13646 47 47 end 48 48 end 49 49 50 50 if qmu_segments, 51 51 WriteData(fid,md.qmu.mass_flux_num_profiles,'Integer','qmu_mass_flux_num_profiles'); … … 57 57 WriteData(fid,md.qmu.mass_flux_num_profiles,'Integer','qmu_mass_flux_num_profiles'); 58 58 end 59 60 59 61 60 %write part and npart to disk -
issm/trunk-jpl/src/m/qmu/qmuresponse.m
r4431 r13646 114 114 error(['qmuresponse error message: unknown descriptor ' descriptor]); 115 115 end 116 -
issm/trunk-jpl/src/m/qmu/qmuroot.m
r2157 r13646 11 11 end 12 12 end 13 -
issm/trunk-jpl/src/m/qmu/rlist_write.m
r12995 r13646 68 68 69 69 end 70 -
issm/trunk-jpl/src/m/qmu/sensitivities.m
r13241 r13646 8 8 % Example: sens=sensitivities(md,'DragCoefficient','MaxVel'); 9 9 % 10 11 10 12 11 variablenamelength=length(variablename); -
issm/trunk-jpl/src/m/qmu/setupdesign/IsScaled.m
r9742 r13646 12 12 13 13 case {'RiftsFriction'}, 14 14 15 15 status=2; %special treatment 16 16 -
issm/trunk-jpl/src/m/qmu/setupdesign/QmuSetupVariables.m
r9650 r13646 6 6 %decide whether this is a distributed variable, which will drive whether we expand it into npart values, 7 7 %or if we just carry it forward as is. 8 9 8 10 9 %ok, key off according to type of descriptor: -
issm/trunk-jpl/src/m/qmu/vector_write.m
r12995 r13646 31 31 nitem=nitem+1; 32 32 lsvec=lsvec+1+length(sitem); 33 33 34 34 if (nitem <= nmax) && (lsvec <= cmax) 35 35 svec=[svec ' ' sitem]; -
issm/trunk-jpl/src/m/regional/basinzoom.m
r13010 r13646 39 39 %Ok, find basin we are talking about: 40 40 load([jplsvn() '/projects/ModelData/Names/Names.mat']); 41 41 42 42 %Go through names: 43 43 found=0; -
issm/trunk-jpl/src/m/regional/regionaltransient2d.m
r13418 r13646 156 156 md2.results=[]; 157 157 end 158 -
issm/trunk-jpl/src/m/regional/showbasins.m
r13010 r13646 21 21 options=pairoptions(varargin{:}); 22 22 end 23 24 23 25 24 %recover some options, and set defaults -
issm/trunk-jpl/src/m/solve/loadresultsfromdisk.m
r13004 r13646 50 50 end 51 51 52 53 52 %post processes qmu results if necessary 54 53 else -
issm/trunk-jpl/src/m/solve/parseresultsfromdisk.m
r13006 r13646 19 19 % Usage: 20 20 % results=parseresultsfromdiskioserial(filename) 21 22 21 23 22 %Open file … … 54 53 % Usage: 55 54 % results=parseresultsfromdiskiosplit(filename) 56 57 55 58 56 %Open file … … 177 175 % field=ReadDataDimensions(fid) 178 176 179 180 177 %read field 181 178 [length,count]=fread(fid,1,'int'); -
issm/trunk-jpl/src/m/solve/solve.m
r13383 r13646 74 74 end 75 75 76 77 76 %Write all input files 78 77 marshall(md); % bin file 79 78 PetscFile(md.solver,[md.miscellaneous.name '.petsc']); % petsc file 80 79 BuildQueueScript(cluster,md.private.runtimename,md.miscellaneous.name,md.private.solution,md.settings.io_gather,md.debug.valgrind,md.debug.gprof); % queue file 81 82 80 83 81 %Stop here if batch mode -
issm/trunk-jpl/src/m/solvers/asmoptions.m
r11871 r13646 4 4 % Usage: 5 5 % options=asmoptions; 6 6 7 7 %retrieve options provided in varargin 8 8 options=pairoptions(varargin{:}); -
issm/trunk-jpl/src/m/solvers/iluasmoptions.m
r12932 r13646 4 4 % Usage: 5 5 % options=iluasmoptions; 6 6 7 7 %retrieve options provided in varargin 8 8 options=pairoptions(varargin{:}); -
issm/trunk-jpl/src/m/solvers/jacobiasmoptions.m
r11871 r13646 4 4 % Usage: 5 5 % options=jacobiasmoptions; 6 6 7 7 %retrieve options provided in varargin 8 8 options=pairoptions(varargin{:}); -
issm/trunk-jpl/src/m/solvers/jacobicgoptions.m
r11871 r13646 4 4 % Usage: 5 5 % options=jacobiasmoptions; 6 6 7 7 %retrieve options provided in varargin 8 8 options=pairoptions(varargin{:}); -
issm/trunk-jpl/src/m/solvers/matlaboptions.m
r11871 r13646 4 4 % Usage: 5 5 % options=matlaboptions; 6 6 7 7 %retrieve options provided in varargin 8 8 options=pairoptions(varargin{:}); -
issm/trunk-jpl/src/m/solvers/soroptions.m
r11871 r13646 4 4 % Usage: 5 5 % options=soroptions; 6 6 7 7 %retrieve options provided in varargin 8 8 options=pairoptions(varargin{:}); -
issm/trunk-jpl/src/m/string/issmprintf.m
r6321 r13646 8 8 % Example: 9 9 % issmprintf(1,'%s\n','string to display'); 10 10 11 11 if flag, 12 12 disp(sprintf(format,varargin{:})); -
issm/trunk-jpl/src/m/string/strsplit.m
r1 r13646 16 16 17 17 % mailto: gie.spaepen@ua.ac.be 18 19 20 18 21 19 %Check input arguments … … 87 85 splittedstring = tempsplit; 88 86 end 89 90 87 91 88 end -
issm/trunk-jpl/src/m/string/strsplit_strict.m
r2467 r13646 4 4 % Usage: 5 5 % output = strsplit_strict(inpstr,delimiter) 6 7 6 8 7 %Check input arguments
Note:
See TracChangeset
for help on using the changeset viewer.