#module imports
from fielddisplay import fielddisplay

class groundingline:
	#properties
	def __init__(self):
		# {{{ Properties
		self.migration=''
		self.melting_rate=float('NaN')

		#set defaults
		self.setdefaultparameters()

		#}}}
	def __repr__(obj):
		# {{{ Display
		string='   grounding line solution parameters:'

		string="%s\n\n%s"%(string,fielddisplay(obj,'migration','type of grounding line migration: ''SoftMigration'',''AgressiveMigration'' or ''None'''))
		string="%s\n%s"%(string,fielddisplay(obj,'melting_rate','melting rate applied when previously grounded parts start floating'))
		return string
		#}}}	
	def setdefaultparameters(obj):
		# {{{setdefaultparameters

		#Type of migration
		obj.migration='None'

		#basal melting rate correction: 
		obj.melting_rate=0;

		return obj
	#}}}

