Changeset 26744 for issm/trunk/src/m/classes/timestepping.js
- Timestamp:
- 12/22/21 10:39:44 (3 years ago)
- Location:
- issm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
- Property svn:mergeinfo changed
/issm/trunk-jpl merged: 25837-25866,25868-25993,25995-26330,26332-26733,26736-26739,26741
- Property svn:mergeinfo changed
-
issm/trunk/src
- Property svn:mergeinfo changed
-
issm/trunk/src/m/classes/timestepping.js
r22758 r26744 6 6 function timestepping (){ 7 7 //methods 8 this.setdefaultparameters = function(){ //{{{8 this.setdefaultparameters = function(){ //{{{ 9 9 //time between 2 time steps 10 10 this.time_step=1./2.; … … 14 14 15 15 //should we interpolate forcings between timesteps? 16 this.interp_forcings=1; 17 }// }}} 18 this.disp= function(){// {{{ 16 this.interp_forcing=1; 17 this.cycle_forcing=0; 18 } //}}} 19 this.disp= function(){ //{{{ 19 20 20 21 var unit; … … 24 25 fielddisplay(this,'final_time','final time to stop the simulation ['+ unit + ']'); 25 26 fielddisplay(this,'time_step','length of time steps [' +unit+ ']'); 26 fielddisplay(this,'interp_forcings','interpolate in time between requested forcing values ? (0 or 1)'); 27 fielddisplay(this,'interp_forcing','interpolate in time between requested forcing values ? (0 or 1)'); 28 fielddisplay(this,'cycle_forcing','cycle through forcing ? (0 or 1)'); 27 29 fielddisplay(this,'coupling_time','length of coupling time steps with ocean model [' +unit+ ']'); 28 30 29 } //}}}30 this.classname= function(){ //{{{31 } //}}} 32 this.classname= function(){ //{{{ 31 33 return "timestepping"; 32 34 33 } //}}}35 } //}}} 34 36 this.checkconsistency = function(md,solution,analyses) { //{{{ 35 37 … … 37 39 checkfield(md,'fieldname','timestepping.final_time','numel',[1],'NaN',1,'Inf',1); 38 40 checkfield(md,'fieldname','timestepping.time_step','numel',[1],'>=',0,'NaN',1,'Inf',1); 39 checkfield(md,'fieldname','timestepping.interp_forcings','numel',[1],'values',[0,1]); 41 checkfield(md,'fieldname','timestepping.interp_forcing','numel',[1],'values',[0,1]); 42 checkfield(md,'fieldname','timestepping.cycle_forcing','numel',[1],'values',[0,1]); 40 43 checkfield(md,'fieldname','timestepping.coupling_time','numel',[1],'>=',0,'NaN',1,'Inf',1); 41 44 if (this.final_time-this.start_time<0){ 42 45 md.checkmessage('timestepping.final_time should be larger than timestepping.start_time'); 46 } 47 if (solution=='TransientSolution'){ 48 checkfield(md,'fieldname','timestepping.time_step','numel',[1],'>',0,'NaN',1,'Inf',1); 43 49 } 44 50 } // }}} … … 52 58 WriteData(fid,prefix,'object',this,'fieldname','final_time','format','Double','scale',scale); 53 59 WriteData(fid,prefix,'object',this,'fieldname','time_step','format','Double','scale',scale); 54 WriteData(fid,prefix,'object',this,'fieldname','interp_forcings','format','Boolean'); 60 WriteData(fid,prefix,'object',this,'fieldname','interp_forcing','format','Boolean'); 61 WriteData(fid,prefix,'object',this,'fieldname','cycle_forcing','format','Boolean'); 55 62 WriteData(fid,prefix,'object',this,'fieldname','coupling_time','format','Double','scale',scale); 56 63 … … 63 70 this.final_time = 0.; 64 71 this.time_step = 0.; 65 this.interp_forcings = 1; 72 this.interp_forcing = 1; 73 this.cycle_forcing = 1; 66 74 this.coupling_time = 0.; 67 75
Note:
See TracChangeset
for help on using the changeset viewer.