Changeset 26305
- Timestamp:
- 06/08/21 12:01:35 (4 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 3 added
- 10 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/flowequation.js
r26300 r26305 142 142 this.isFS = 0; 143 143 this.isNitscheBC = 0; 144 this.FSNitscheGamma = 0;144 this.FSNitscheGamma = 1e6; 145 145 this.fe_SSA = ''; 146 146 this.fe_HO = ''; -
issm/trunk-jpl/src/m/classes/fourierlove.js
r26300 r26305 18 18 this.g0=9.81; // m/s^2; 19 19 this.r0=6371*1e3; //m; 20 this.mu0=1 0^11; // Pa20 this.mu0=1e11; // Pa 21 21 this.Gravitational_Constant=6.67259e-11; // m^3 kg^-1 s^-2 22 22 this.allow_layer_deletion=1; … … 86 86 /* 87 87 if ~isa(md.materials,'materials') | ~sum(strcmpi(md.materials.nature,'litho')) 88 error('Need a ''litho''material to run a Fourier Love number analysis');88 error('Need a "litho" material to run a Fourier Love number analysis'); 89 89 end 90 90 -
issm/trunk-jpl/src/m/classes/friction.js
r26300 r26305 67 67 WriteData(fid,prefix,'name','md.friction.law','data',1,'format','Integer'); 68 68 let mattype,tsl; 69 if ((size(this.coefficient, 1)==md.mesh.numberofvertices | size(this.coefficient,1)==md.mesh.numberofvertices+1)) {69 if ((size(this.coefficient,0)==md.mesh.numberofvertices | size(this.coefficient,1)==md.mesh.numberofvertices+1)) { 70 70 mattype=1; 71 71 tsl = md.mesh.numberofvertices; … … 81 81 switch (this.coupling) { 82 82 case 0: 83 break; 83 84 case 1: 84 85 WriteData(fid,prefix,'class','friction','object',this,'fieldname','effective_pressure','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts); -
issm/trunk-jpl/src/m/classes/geometry.js
r26300 r26305 48 48 } // }}} 49 49 this.marshall=function(md,prefix,fid) { //{{{ 50 let length_thickness=size(this.thickness, 1);50 let length_thickness=size(this.thickness,0); 51 51 if (length_thickness==md.mesh.numberofvertices || length_thickness==md.mesh.numberofvertices+1) { 52 52 WriteData(fid,prefix,'object',this,'fieldname','thickness','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts); -
issm/trunk-jpl/src/m/classes/groundingline.js
r26300 r26305 47 47 this.marshall=function(md,prefix,fid) { //{{{ 48 48 WriteData(fid,prefix,'data',this.migration,'name','md.groundingline.migration','format','String'); 49 WriteData(fid,prefix,'data',this. migration,'name','md.groundingline.friction_interpolation','format','String');50 WriteData(fid,prefix,'data',this.m igration,'name','md.groundingline.melt_interpolation','format','String');49 WriteData(fid,prefix,'data',this.friction_interpolation,'name','md.groundingline.friction_interpolation','format','String'); 50 WriteData(fid,prefix,'data',this.melt_interpolation,'name','md.groundingline.melt_interpolation','format','String'); 51 51 }//}}} 52 52 this.fix=function() { //{{{ -
issm/trunk-jpl/src/m/classes/levelset.js
r26300 r26305 8 8 this.setdefaultparameters = function(){// {{{ 9 9 10 //stabilization = 2by default11 this.stabilization = 2;10 //stabilization = 1 by default 11 this.stabilization = 1; 12 12 this.reinit_frequency = 5; 13 13 this.kill_icebergs = 1; -
issm/trunk-jpl/src/m/classes/mesh3dsurface.js
r22879 r26305 87 87 WriteData(fid,prefix,'object',this,'fieldname','long','format','DoubleMat','mattype',1); 88 88 WriteData(fid,prefix,'object',this,'fieldname','r','format','DoubleMat','mattype',1); 89 //WriteData(fid,prefix,'object',this,'fieldname','z','format','DoubleMat','mattype',1); 89 90 WriteData(fid,prefix,'object',this,'fieldname','elements','format','DoubleMat','mattype',2); 90 91 WriteData(fid,prefix,'object',this,'fieldname','numberofelements','format','Integer'); … … 92 93 WriteData(fid,prefix,'object',this,'fieldname','average_vertex_connectivity','format','Integer'); 93 94 WriteData(fid,prefix,'object',this,'fieldname','vertexonboundary','format','DoubleMat','mattype',1); 94 WriteData(fid,prefix,'object',this,'fieldname','segments','format','DoubleMat','mattype',3);95 //WriteData(fid,prefix,'object',this,'fieldname','segments','format','DoubleMat','mattype',3); 95 96 }//}}} 96 97 this.fix=function() { //{{{ -
issm/trunk-jpl/src/m/classes/model.js
r25988 r26305 86 86 this.calving = new calving(); 87 87 this.gia = new giaivins(); 88 this.frontforcings = new frontforcings(); 88 89 this.love = new fourierlove(); 89 90 this.esa = new esa(); … … 759 760 this.levelset = 0; 760 761 this.calving = 0; 762 this.frontforcings = 0; 761 763 this.love = 0; 762 764 this.gia = 0; -
issm/trunk-jpl/src/m/classes/transient.js
r26304 r26305 1 //TRANS class definition1 //TRANSIENT class definition 2 2 // 3 3 // Usage: 4 // trans =new trans();4 // transient =new transient(); 5 5 6 function trans (){6 function transient (){ 7 7 //methods 8 8 this.setdefaultparameters = function(){// {{{ … … 58 58 if (solution!='TransientSolution') return; 59 59 60 checkfield(md,'fieldname','trans .issmb','numel',[1],'values',[0, 1]);61 checkfield(md,'fieldname','trans .ismasstransport','numel',[1],'values',[0, 1]);62 checkfield(md,'fieldname','trans .isstressbalance','numel',[1],'values',[0, 1]);63 checkfield(md,'fieldname','trans .isthermal','numel',[1],'values',[0, 1]);64 checkfield(md,'fieldname','trans .isgroundingline','numel',[1],'values',[0, 1]);65 checkfield(md,'fieldname','trans .isgia','numel',[1],'values',[0, 1]);66 checkfield(md,'fieldname','trans .isesa','numel',[1],'values',[0, 1]);67 checkfield(md,'fieldname','trans .isdamageevolution','numel',[1],'values',[0, 1]);68 checkfield(md,'fieldname','trans .ismovingfront','numel',[1],'values',[0, 1]);69 checkfield(md,'fieldname','trans .ishydrology','numel',[1],'values',[0, 1]);70 checkfield(md,'fieldname','trans .isslr','numel',[1],'values',[0, 1]);71 checkfield(md,'fieldname','trans .isoceancoupling','numel',[1],'values',[0, 1]);72 checkfield(md,'fieldname','trans .iscoupler','numel',[1],'values',[0, 1]);73 checkfield(md,'fieldname','trans .amr_frequency','numel',[1],'>=',0,'NaN',1,'Inf',1);74 checkfield(md,'fieldname','trans .requested_outputs','stringrow',1);60 checkfield(md,'fieldname','transient.issmb','numel',[1],'values',[0, 1]); 61 checkfield(md,'fieldname','transient.ismasstransport','numel',[1],'values',[0, 1]); 62 checkfield(md,'fieldname','transient.isstressbalance','numel',[1],'values',[0, 1]); 63 checkfield(md,'fieldname','transient.isthermal','numel',[1],'values',[0, 1]); 64 checkfield(md,'fieldname','transient.isgroundingline','numel',[1],'values',[0, 1]); 65 checkfield(md,'fieldname','transient.isgia','numel',[1],'values',[0, 1]); 66 checkfield(md,'fieldname','transient.isesa','numel',[1],'values',[0, 1]); 67 checkfield(md,'fieldname','transient.isdamageevolution','numel',[1],'values',[0, 1]); 68 checkfield(md,'fieldname','transient.ismovingfront','numel',[1],'values',[0, 1]); 69 checkfield(md,'fieldname','transient.ishydrology','numel',[1],'values',[0, 1]); 70 checkfield(md,'fieldname','transient.isslr','numel',[1],'values',[0, 1]); 71 checkfield(md,'fieldname','transient.isoceancoupling','numel',[1],'values',[0, 1]); 72 checkfield(md,'fieldname','transient.iscoupler','numel',[1],'values',[0, 1]); 73 checkfield(md,'fieldname','transient.amr_frequency','numel',[1],'>=',0,'NaN',1,'Inf',1); 74 checkfield(md,'fieldname','transient.requested_outputs','stringrow',1); 75 75 } // }}} 76 76 this.marshall=function(md,prefix,fid) { //{{{ -
issm/trunk-jpl/src/m/classes/verbose.js
r20777 r26305 25 25 //methods 26 26 this.setdefaultparameters = function(){// {{{ 27 //switch(nargin), 28 //case 0, 29 this.verbose.solution=true; 30 this.verbose.qmu=true; 31 this.verbose.control=true; 27 32 }// }}} 28 33 this.disp= function(){// {{{ … … 67 72 //properties 68 73 // {{{ 69 //BEGINFIELDS70 74 this.mprocessor=false; 71 75 this.module=false; … … 77 81 this.autodiff=false; 78 82 this.smb=false; 79 //ENDFIELDS 83 84 this.setdefaultparameters(); 80 85 // }}} 81 this.setdefaultparameters();82 //}}}83 86 } -
issm/trunk-jpl/src/m/solve/WriteData.js
r26300 r26305 133 133 else if (format == 'BooleanMat'){ // {{{ 134 134 135 //Get size 136 var s=[data.length,1]; 137 if(IsArray(data[0]))s[1]=data[0].length; 135 //Get size (TODO: use into matlab.js::size) 136 var s=[data.length,1]; //vector 137 if (IsArray(data[0])) { //matrix 138 s[1]=data[0].length; 139 } else if (typeof data == 'number') { //scalar 140 s[0]=1; s[1]=1 141 } else if (data.length == 0) { //empty matrix/vector 142 s[1]=0; 143 } 138 144 139 145 //if matrix = NaN, then do not write anything 140 if (s[0]==1 & s[1]==1& isNaN(data)){141 s[0]=0; s[1]=0; 142 } 143 if ( s[0]==1 & s[1]==1& isNaN(data[0])){146 if (s[0]==1 && s[1]==1 && isNaN(data)){ 147 s[0]=0; s[1]=0; 148 } 149 if (typeof data != 'number' && s[0]==1 && s[1]==1 && isNaN(data[0])){ 144 150 s[0]=0; s[1]=0; 145 151 } … … 159 165 else if (format == 'IntMat'){ // {{{ 160 166 161 //Get size 162 var s=[data.length,1]; 163 if(IsArray(data[0]))s[1]=data[0].length; 167 //Get size (TODO: use into matlab.js::size) 168 var s=[data.length,1]; //vector 169 if (IsArray(data[0])) { //matrix 170 s[1]=data[0].length; 171 } else if (typeof data == 'number') { //scalar 172 s[0]=1; s[1]=1 173 } else if (data.length == 0) { //empty matrix/vector 174 s[1]=0; 175 } 164 176 165 177 //if matrix = NaN, then do not write anything 166 if (s[0]==1 & s[1]==1& isNaN(data)){167 s[0]=0; s[1]=0; 168 } 169 if ( s[0]==1 & s[1]==1& isNaN(data[0])){178 if (s[0]==1 && s[1]==1 && isNaN(data)){ 179 s[0]=0; s[1]=0; 180 } 181 if (typeof data != 'number' && s[0]==1 && s[1]==1 && isNaN(data[0])){ 170 182 s[0]=0; s[1]=0; 171 183 } … … 186 198 else if (format == 'DoubleMat'){ // {{{ 187 199 188 //Get size 189 var s=[data.length,1]; 190 if(IsArray(data[0]))s[1]=data[0].length; 191 if(typeof data == 'number'){s[0]=1; s[1]=1} 192 200 //Get size (TODO: use into matlab.js::size) 201 var s=[data.length,1]; //vector 202 if (IsArray(data[0])) { //matrix 203 s[1]=data[0].length; 204 } else if (typeof data == 'number') { //scalar 205 s[0]=1; s[1]=1 206 } else if (data.length == 0) { //empty matrix/vector 207 s[1]=0; 208 } 209 193 210 //if matrix = NaN, then do not write anything 194 if (s[0]==1 & s[1]==1& isNaN(data)){195 s[0]=0; s[1]=0; 196 } 197 if ( s[0]==1 & s[1]==1& isNaN(data[0])){211 if (s[0]==1 && s[1]==1 && isNaN(data)){ 212 s[0]=0; s[1]=0; 213 } 214 if (typeof data != 'number' && s[0]==1 && s[1]==1 && isNaN(data[0])){ 198 215 s[0]=0; s[1]=0; 199 216 } … … 252 269 //first get length of string array: 253 270 num=data.length; 254 if ((typeof data[0] == 'num eric') & num==1 & isNaN(data[0])){271 if ((typeof data[0] == 'number') & num==1 & isNaN(data[0])){ 255 272 num = 0; 256 273 }
Note:
See TracChangeset
for help on using the changeset viewer.