Changeset 18554
- Timestamp:
- 10/01/14 06:10:21 (10 years ago)
- Location:
- issm/trunk-jpl/src/m/classes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/thermal.m
r18553 r18554 99 99 md = checkfield(md,'fieldname','thermal.isdynamicbasalspc','numel', [1],'values',[0 1]); 100 100 if(md.thermal.isenthalpy) 101 md = checkfield(md,'fieldname','thermal.reltol','>',0.,'message','reltol must be larger than zero');102 101 if isnan(md.stressbalance.reltol), 103 102 md = checkmessage(md,['for a steadystate computation, stressbalance.reltol (relative convergence criterion) must be defined!']); 104 103 end 104 md = checkfield(md,'fieldname','thermal.reltol','>',0.,'message','reltol must be larger than zero'); 105 105 md = checkfield(md,'fieldname','thermal.isdynamicbasalspc','numel', [1],'values',[1], 'message',['for enthalpy run thermal.isdynamicbasalspc should be 1']); 106 106 end -
issm/trunk-jpl/src/m/classes/thermal.py
r18068 r18554 18 18 self.penalty_threshold = 0 19 19 self.stabilization = 0 20 self.reltol = 0 20 21 self.maxiter = 0 21 22 self.penalty_lock = 0 … … 34 35 string="%s\n%s"%(string,fielddisplay(self,'stabilization','0: no, 1: artificial_diffusivity, 2: SUPG')) 35 36 string="%s\n%s"%(string,fielddisplay(self,'maxiter','maximum number of non linear iterations')) 37 string="%s\n%s"%(string,fielddisplay(self,'reltol','relative tolerance criterion')) 36 38 string="%s\n%s"%(string,fielddisplay(self,'penalty_lock','stabilize unstable thermal constraints that keep zigzagging after n iteration (default is 0, no stabilization)')) 37 39 string="%s\n%s"%(string,fielddisplay(self,'penalty_threshold','threshold to declare convergence of thermal solution (default is 0)')) … … 56 58 #Type of stabilization used 57 59 self.stabilization=1 60 61 #Relative tolerance for the enthalpy convergence 62 self.reltol=0.01 58 63 59 64 #Maximum number of iterations … … 89 94 md = checkfield(md,'fieldname','thermal.isdynamicbasalspc','numel',[1],'values',[0,1]); 90 95 if(md.thermal.isenthalpy): 96 if numpy.isnan(md.stressbalance.reltol): 97 md.checkmessage("for a steadystate computation, stressbalance.reltol (relative convergence criterion) must be defined!") 98 md = checkfield(md,'fieldname','thermal.reltol','>',0.,'message',"reltol must be larger than zero"); 91 99 md = checkfield(md,'fieldname','thermal.isdynamicbasalspc','numel', [1],'values',[1], 'message',"for enthalpy run thermal.isdynamicbasalspc should be true") 92 100 md = checkfield(md,'fieldname','thermal.requested_outputs','stringrow',1) … … 98 106 WriteData(fid,'object',self,'fieldname','penalty_threshold','format','Integer') 99 107 WriteData(fid,'object',self,'fieldname','stabilization','format','Integer') 108 WriteData(fid,'object',self,'fieldname','reltol','format','Double'); 100 109 WriteData(fid,'object',self,'fieldname','maxiter','format','Integer') 101 110 WriteData(fid,'object',self,'fieldname','penalty_lock','format','Integer')
Note:
See TracChangeset
for help on using the changeset viewer.