Changeset 16274
- Timestamp:
- 09/30/13 16:44:13 (11 years ago)
- Location:
- issm/trunk-jpl/src/m/classes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/thermal.m
r16273 r16274 13 13 penalty_factor = 0; 14 14 isenthalpy = 0; 15 15 isdynamicbasalspc = 0; 16 16 end 17 17 methods … … 41 41 obj.isenthalpy=0; 42 42 43 44 43 %will basal boundary conditions be set dynamically 44 obj.isdynamicbasalspc=0; 45 45 end % }}} 46 46 function md = checkconsistency(obj,md,solution,analyses) % {{{ … … 56 56 md = checkfield(md,'thermal.spctemperature(find(md.thermal.spctemperature(1:md.mesh.numberofvertices,:)~=NaN))','<',md.materials.meltingpoint-md.materials.beta*md.materials.rho_ice*md.constants.g*replicate(pos),'message','spctemperature should be below the adjusted melting point'); 57 57 md = checkfield(md,'thermal.isenthalpy','numel',[1],'values',[0 1]); 58 58 md = checkfield(md,'thermal.isdynamicbasalspc','numel',[1],'values',[0 1]); 59 59 end 60 60 end % }}} … … 69 69 fielddisplay(obj,'penalty_factor','scaling exponent (default is 3)'); 70 70 fielddisplay(obj,'isenthalpy','use an enthalpy formulation to include temperate ice (default is 0)'); 71 71 fielddisplay(obj,'isdynamicbasalspc',['enable dynamic setting of basal forcing. required for enthalpy formulation (default is 0)']); 72 72 73 73 end % }}} -
issm/trunk-jpl/src/m/classes/thermal.py
r16273 r16274 21 21 self.penalty_factor = 0 22 22 self.isenthalpy = 0 23 self.isdynamicbasalspc = 0; 23 24 24 25 #set defaults … … 34 35 string="%s\n%s"%(string,fielddisplay(self,'penalty_threshold','threshold to declare convergence of thermal solution (default is 0)')) 35 36 string="%s\n%s"%(string,fielddisplay(self,'isenthalpy','use an enthalpy formulation to include temperate ice (default is 0)')) 37 string="%s\n%s"%(string,fielddisplay(self,'isdynamicbasalspc','enable dynamic setting of basal forcing. required for enthalpy formulation (default is 0)')) 36 38 return string 37 39 #}}} … … 53 55 self.isenthalpy=0 54 56 57 #will basal boundary conditions be set dynamically 58 self.isdynamicbasalspc=0; 55 59 return self 60 56 61 #}}} 57 62 def checkconsistency(self,md,solution,analyses): # {{{ … … 68 73 md = checkfield(md,'thermal.spctemperature[numpy.nonzero(numpy.logical_not(numpy.isnan(md.thermal.spctemperature[0:md.mesh.numberofvertices,:])))]','<',md.materials.meltingpoint-md.materials.beta*md.materials.rho_ice*md.constants.g*replicate[pos],'message',"spctemperature should be below the adjusted melting point") 69 74 md = checkfield(md,'thermal.isenthalpy','numel',[1],'values',[0,1]) 75 md = checkfield(md,'thermal.isdynamicbasalspc','numel',[1],'values',[0,1]); 70 76 71 77 return md
Note:
See TracChangeset
for help on using the changeset viewer.