from model import *
from triangle import *
from setmask import *
from parameterize import *
from setflowequation import *
from EnumDefinitions import *
from solve import *
from MatlabFuncs import *

md=triangle(model(),'../Exp/Pig.exp',30000.)
md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp')
md=parameterize(md,'../Par/Pig.py')
md.extrude(3,1.)
md=setflowequation(md,'HO','all')
md.cluster=generic('name',oshostname(),'np',3)
md.timestepping.time_step=0.
md.thermal.penalty_threshold=7
md=solve(md,SteadystateSolutionEnum())

# Fields and tolerances to track changes
field_names     =['Vx','Vy','Vz','Vel','Pressure','Temperature','BasalforcingsMeltingRate']
field_tolerances=[1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-06]
field_values=[\
	md.results.SteadystateSolution.Vx,\
	md.results.SteadystateSolution.Vy,\
	md.results.SteadystateSolution.Vz,\
	md.results.SteadystateSolution.Vel,\
	md.results.SteadystateSolution.Pressure,\
	md.results.SteadystateSolution.Temperature,\
	md.results.SteadystateSolution.BasalforcingsMeltingRate,\
	]
