Changeset 26744 for issm/trunk/src/m/classes/calvingvonmises.py
- 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/calvingvonmises.py
r24313 r26744 1 from checkfield import checkfield 1 2 from fielddisplay import fielddisplay 2 from checkfield import checkfield3 3 from WriteData import WriteData 4 4 5 5 6 6 class calvingvonmises(object): 7 """ 8 CALVINGVONMISES class definition 7 """CALVINGVONMISES class definition 9 8 10 11 9 Usage: 10 calvingvonmises = calvingvonmises() 12 11 """ 13 12 14 13 def __init__(self): # {{{ 15 16 self.stress_threshold_groundedice = 0. 17 self.stress_threshold_floatingice = 0. 18 self.min_thickness = 0. 14 self.stress_threshold_groundedice = 0 15 self.stress_threshold_floatingice = 0 16 self.min_thickness = 0 19 17 20 18 #set defaults … … 24 22 25 23 def __repr__(self): # {{{ 26 string = ' Calving VonMises parameters:' 27 string = "%s\n%s" % (string, fielddisplay(self, 'stress_threshold_groundedice', 'sigma_max applied to grounded ice only [Pa]')) 28 string = "%s\n%s" % (string, fielddisplay(self, 'stress_threshold_floatingice', 'sigma_max applied to floating ice only [Pa]')) 29 string = "%s\n%s" % (string, fielddisplay(self, 'min_thickness', 'minimum thickness below which no ice is allowed [m]')) 30 31 return string 24 s = ' Calving VonMises parameters:\n' 25 s += '{}\n'.format(fielddisplay(self, 'stress_threshold_groundedice', 'sigma_max applied to grounded ice only [Pa]')) 26 s += '{}\n'.format(fielddisplay(self, 'stress_threshold_floatingice', 'sigma_max applied to floating ice only [Pa]')) 27 s += '{}\n'.format(fielddisplay(self, 'min_thickness', 'minimum thickness below which no ice is allowed [m]')) 28 return s 32 29 #}}} 33 30 … … 37 34 38 35 def setdefaultparameters(self): # {{{ 39 # Default sigma max36 # Default sigma max 40 37 self.stress_threshold_groundedice = 1e6 41 38 self.stress_threshold_floatingice = 150e3 42 39 43 # turn off min_thickness by default.40 # Turn off min_thickness by default 44 41 self.min_thickness = 0. 45 42 return self … … 47 44 48 45 def checkconsistency(self, md, solution, analyses): # {{{ 49 # Early return50 if solution == 'TransientSolution' or md.transient.ismovingfront == 0:46 # Early return 47 if solution == 'TransientSolution' or not md.transient.ismovingfront: 51 48 return 52 49
Note:
See TracChangeset
for help on using the changeset viewer.