Index: /issm/trunk-jpl/test/NightlyRun/IdToName.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/IdToName.m	(revision 16193)
+++ /issm/trunk-jpl/test/NightlyRun/IdToName.m	(revision 16194)
@@ -223,4 +223,19 @@
 	case 3015, name='SquareShelfConstrainedMasstransp2dAdolcForwardDifference';
 	case 3019, name='SquareShelfConstrainedTherTranAdolcReverseVsForward';
+	case 3020, name='SquareShelfConstrainedTranAdolcReverseVsForward';
+	case 3101, name='SquareShelfConstrainedStressSSA2dAdolcMumps';
+	case 3102, name='SquareShelfConstrainedStressSSA3dAdolcMumps';
+	case 3103, name='SquareShelfConstrainedStressHOAdolcMumps';
+	case 3104, name='SquareShelfConstrainedStressFSAdolcMumps';
+	case 3105, name='SquareShelfConstrainedMasstransp2dAdolcMumps';
+	case 3106, name='SquareShelfConstrainedMasstransp2dDGAdolcMumps';
+	case 3107, name='SquareShelfConstrainedMasstransp3dAdolcMumps';
+	case 3108, name='SquareShelfConstrainedTherSteaAdolcMumps';
+	case 3109, name='SquareShelfConstrainedTherTranAdolcMumps';
+	case 3110, name='SquareShelfConstrainedTranSSA2dAdolcMumps';
+	case 3115, name='SquareShelfConstrainedMasstransp2dAdolcForwardDifferenceMumps';
+	case 3019, name='SquareShelfConstrainedTherTranAdolcReverseVsForward';
+	case 3120, name='SquareShelfConstrainedTranAdolcReverseVsForwardMumps';
+
 
 	otherwise, name='N/A';
Index: /issm/trunk-jpl/test/NightlyRun/IdToName.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/IdToName.py	(revision 16193)
+++ /issm/trunk-jpl/test/NightlyRun/IdToName.py	(revision 16194)
@@ -226,4 +226,18 @@
 	3015 : 'SquareShelfConstrainedMasstransp2dAdolcForwardDifference',
 	3019 : 'SquareShelfConstrainedTherTranAdolcReverseVsForward',
+	3020 : 'SquareShelfConstrainedTranAdolcReverseVsForward',
+	3101 : 'SquareShelfConstrainedStressSSA2dAdolcMumps',
+	3102 : 'SquareShelfConstrainedStressSSA3dAdolcMumps',
+	3103 : 'SquareShelfConstrainedStressHOAdolcMumps',
+	3104 : 'SquareShelfConstrainedStressFSAdolcMumps',
+	3105 : 'SquareShelfConstrainedMasstransp2dAdolcMumps',
+	3106 : 'SquareShelfConstrainedMasstransp2dDGAdolcMumps',
+	3107 : 'SquareShelfConstrainedMasstransp3dAdolcMumps',
+	3108 : 'SquareShelfConstrainedTherSteaAdolcMumps',
+	3109 : 'SquareShelfConstrainedTherTranAdolcMumps',
+	3110 : 'SquareShelfConstrainedTranSSA2dAdolcMumps',
+	3115 : 'SquareShelfConstrainedMasstransp2dAdolcForwardDifferenceMumps',
+	3119 : 'SquareShelfConstrainedTherTranAdolcReverseVsForwardMumps',
+	3120 : 'SquareShelfConstrainedTranAdolcReverseVsForwardMumps',
 	}
 
Index: /issm/trunk-jpl/test/NightlyRun/runme.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/runme.m	(revision 16193)
+++ /issm/trunk-jpl/test/NightlyRun/runme.m	(revision 16194)
@@ -121,5 +121,5 @@
 	test_ids=intersect(test_ids,[2001:2100]);
 elseif strcmpi(benchmark,'adolc'),
-	test_ids=intersect(test_ids,[3001:3020]);
+	test_ids=intersect(test_ids,[3001:3200]);
 end
 % }}}
Index: /issm/trunk-jpl/test/NightlyRun/runme.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/runme.py	(revision 16193)
+++ /issm/trunk-jpl/test/NightlyRun/runme.py	(revision 16194)
@@ -120,5 +120,5 @@
 		test_ids=test_ids.intersection(set(range(2001,2100)))
 	elif strcmpi(benchmark,'adolc'):
-		test_ids=test_ids.intersection(set(range(3001,3020)))
+		test_ids=test_ids.intersection(set(range(3001,3200)))
 	#print 'test_ids after benchmark =',test_ids
 	test_ids=list(test_ids)
Index: /issm/trunk-jpl/test/NightlyRun/test3101.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3101.m	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3101.m	(revision 16194)
@@ -0,0 +1,25 @@
+md=triangle(model(),'../Exp/Square.exp',50000.);
+md=setmask(md,'all','');
+md=parameterize(md,'../Par/SquareShelfConstrained.par');
+md=setflowequation(md,'SSA','all');
+md.cluster=generic('name',oshostname(),'np',3);
+md.stressbalance.requested_outputs=StressTensorEnum();
+md.autodiff.isautodiff=true;
+md.toolkits.DefaultAnalysis=issmmumpssolver();
+
+md=solve(md,StressbalanceSolutionEnum());
+
+%Fields and tolerances to track changes
+field_names     ={'Vx','Vy','Vel','Pressure',...
+	'StressTensorxx','StressTensoryy','StressTensorxy'};
+field_tolerances={1e-13,1e-13,1e-13,1e-13,...
+	1e-13,1e-13,1e-13};
+field_values={...
+	(md.results.StressbalanceSolution.Vx),...
+	(md.results.StressbalanceSolution.Vy),...
+	(md.results.StressbalanceSolution.Vel),...
+	(md.results.StressbalanceSolution.Pressure),...
+	(md.results.StressbalanceSolution.StressTensorxx),...
+	(md.results.StressbalanceSolution.StressTensoryy),...
+	(md.results.StressbalanceSolution.StressTensorxy),...
+	};
Index: /issm/trunk-jpl/test/NightlyRun/test3101.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3101.py	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3101.py	(revision 16194)
@@ -0,0 +1,33 @@
+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/Square.exp',50000.)
+md=setmask(md,'all','')
+md=parameterize(md,'../Par/SquareShelfConstrained.py')
+md=setflowequation(md,'SSA','all')
+md.cluster=generic('name',oshostname(),'np',3)
+md.stressbalance.requested_outputs=StressTensorEnum()
+md.toolkits.DefaultAnalysis=issmmumpssolver()
+md.autodiff.isautodiff=True
+md=solve(md,StressbalanceSolutionEnum())
+
+#Fields and tolerances to track changes
+field_names     =['Vx','Vy','Vel','Pressure',\
+	'StressTensorxx','StressTensoryy','StressTensorxy']
+field_tolerances=[1e-13,1e-13,1e-13,1e-13,\
+	1e-13,1e-13,1e-13]
+field_values=[\
+	md.results.StressbalanceSolution.Vx,\
+	md.results.StressbalanceSolution.Vy,\
+	md.results.StressbalanceSolution.Vel,\
+	md.results.StressbalanceSolution.Pressure,\
+	md.results.StressbalanceSolution.StressTensorxx,\
+	md.results.StressbalanceSolution.StressTensoryy,\
+	md.results.StressbalanceSolution.StressTensorxy,\
+	]
Index: /issm/trunk-jpl/test/NightlyRun/test3102.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3102.m	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3102.m	(revision 16194)
@@ -0,0 +1,21 @@
+md=triangle(model(),'../Exp/Square.exp',180000.);
+md=setmask(md,'all','');
+md=parameterize(md,'../Par/SquareShelfConstrained.par');
+md=extrude(md,3,2.);
+md=setflowequation(md,'SSA','all');
+md.cluster=generic('name',oshostname(),'np',3);
+md.autodiff.isautodiff=true;
+md.toolkits.DefaultAnalysis=issmmumpssolver();
+md.verbose=verbose('autodiff',true);
+md=solve(md,StressbalanceSolutionEnum());
+
+%Fields and tolerances to track changes
+field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13};
+field_values={...
+	(md.results.StressbalanceSolution.Vx),...
+	(md.results.StressbalanceSolution.Vy),...
+	(md.results.StressbalanceSolution.Vz),...
+	(md.results.StressbalanceSolution.Vel),...
+	(md.results.StressbalanceSolution.Pressure),...
+	};
Index: /issm/trunk-jpl/test/NightlyRun/test3102.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3102.py	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3102.py	(revision 16194)
@@ -0,0 +1,29 @@
+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/Square.exp',180000.)
+md=setmask(md,'all','')
+md=parameterize(md,'../Par/SquareShelfConstrained.py')
+md.extrude(3,2.)
+md=setflowequation(md,'SSA','all')
+md.cluster=generic('name',oshostname(),'np',3)
+md.autodiff.isautodiff=True
+md.toolkits.DefaultAnalysis=issmmumpssolver()
+md=solve(md,StressbalanceSolutionEnum())
+
+#Fields and tolerances to track changes
+field_names     =['Vx','Vy','Vz','Vel','Pressure']
+field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13]
+field_values=[\
+	md.results.StressbalanceSolution.Vx,\
+	md.results.StressbalanceSolution.Vy,\
+	md.results.StressbalanceSolution.Vz,\
+	md.results.StressbalanceSolution.Vel,\
+	md.results.StressbalanceSolution.Pressure,\
+	]
Index: /issm/trunk-jpl/test/NightlyRun/test3103.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3103.m	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3103.m	(revision 16194)
@@ -0,0 +1,30 @@
+md=triangle(model(),'../Exp/Square.exp',180000.);
+md=setmask(md,'all','');
+md=parameterize(md,'../Par/SquareShelfConstrained.par');
+md=extrude(md,3,2.);
+md=setflowequation(md,'HO','all');
+md.cluster=generic('name',oshostname(),'np',3);
+md.stressbalance.requested_outputs=StressTensorEnum();
+md.autodiff.isautodiff=true;
+md.toolkits.DefaultAnalysis=issmmumpssolver();
+md.verbose=verbose('autodiff',true);
+md=solve(md,StressbalanceSolutionEnum());
+
+%Fields and tolerances to track changes
+field_names     ={'Vx','Vy','Vz','Vel','Pressure',...
+	'StressTensorxx','StressTensoryy','StressTensorzz','StressTensorxy','StressTensorxz','StressTensoryz'};
+field_tolerances={1e-09,1e-09,1e-09,1e-09,1e-09,...
+	1e-09,1e-09,1e-09,1e-09,1e-09,1e-09};
+field_values={...
+	(md.results.StressbalanceSolution.Vx),...
+	(md.results.StressbalanceSolution.Vy),...
+	(md.results.StressbalanceSolution.Vz),...
+	(md.results.StressbalanceSolution.Vel),...
+	(md.results.StressbalanceSolution.Pressure),...
+	(md.results.StressbalanceSolution.StressTensorxx),...
+	(md.results.StressbalanceSolution.StressTensoryy),...
+	(md.results.StressbalanceSolution.StressTensorzz),...
+	(md.results.StressbalanceSolution.StressTensorxy),...
+	(md.results.StressbalanceSolution.StressTensorxz),...
+	(md.results.StressbalanceSolution.StressTensoryz),...
+	};
Index: /issm/trunk-jpl/test/NightlyRun/test3103.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3103.py	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3103.py	(revision 16194)
@@ -0,0 +1,38 @@
+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/Square.exp',180000.)
+md=setmask(md,'all','')
+md=parameterize(md,'../Par/SquareShelfConstrained.py')
+md.extrude(3,2.)
+md=setflowequation(md,'HO','all')
+md.cluster=generic('name',oshostname(),'np',3)
+md.stressbalance.requested_outputs=StressTensorEnum()
+md.toolkits.DefaultAnalysis=issmmumpssolver()
+md.autodiff.isautodiff=True
+md=solve(md,StressbalanceSolutionEnum())
+
+#Fields and tolerances to track changes
+field_names     =['Vx','Vy','Vz','Vel','Pressure',\
+	'StressTensorxx','StressTensoryy','StressTensorzz','StressTensorxy','StressTensorxz','StressTensoryz']
+field_tolerances=[1e-09,1e-09,1e-09,1e-09,1e-09,\
+	1e-09,1e-09,1e-09,1e-09,1e-09,1e-09]
+field_values=[\
+	md.results.StressbalanceSolution.Vx,\
+	md.results.StressbalanceSolution.Vy,\
+	md.results.StressbalanceSolution.Vz,\
+	md.results.StressbalanceSolution.Vel,\
+	md.results.StressbalanceSolution.Pressure,\
+	md.results.StressbalanceSolution.StressTensorxx,\
+	md.results.StressbalanceSolution.StressTensoryy,\
+	md.results.StressbalanceSolution.StressTensorzz,\
+	md.results.StressbalanceSolution.StressTensorxy,\
+	md.results.StressbalanceSolution.StressTensorxz,\
+	md.results.StressbalanceSolution.StressTensoryz,\
+	]
Index: /issm/trunk-jpl/test/NightlyRun/test3104.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3104.m	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3104.m	(revision 16194)
@@ -0,0 +1,21 @@
+md=triangle(model(),'../Exp/Square.exp',180000.);
+md=setmask(md,'all','');
+md=parameterize(md,'../Par/SquareShelfConstrained.par');
+md=extrude(md,3,2.);
+md=setflowequation(md,'FS','all');
+md.cluster=generic('name',oshostname(),'np',3);
+md.autodiff.isautodiff=true;
+md.toolkits.DefaultAnalysis=issmmumpssolver();
+md.verbose=verbose('autodiff',true);
+md=solve(md,StressbalanceSolutionEnum());
+
+%Fields and tolerances to track changes
+field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+field_tolerances={1e-08,1e-08,1e-07,1e-08,1e-08};
+field_values={...
+	(md.results.StressbalanceSolution.Vx),...
+	(md.results.StressbalanceSolution.Vy),...
+	(md.results.StressbalanceSolution.Vz),...
+	(md.results.StressbalanceSolution.Vel),...
+	(md.results.StressbalanceSolution.Pressure),...
+	};
Index: /issm/trunk-jpl/test/NightlyRun/test3104.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3104.py	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3104.py	(revision 16194)
@@ -0,0 +1,29 @@
+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/Square.exp',180000.)
+md=setmask(md,'all','')
+md=parameterize(md,'../Par/SquareShelfConstrained.py')
+md.extrude(3,2.)
+md=setflowequation(md,'FS','all')
+md.cluster=generic('name',oshostname(),'np',3)
+md.toolkits.DefaultAnalysis=issmmumpssolver()
+md.autodiff.isautodiff=True
+md=solve(md,StressbalanceSolutionEnum())
+
+#Fields and tolerances to track changes
+field_names     =['Vx','Vy','Vz','Vel','Pressure']
+field_tolerances=[1e-08,1e-08,1e-07,1e-08,1e-08]
+field_values=[\
+	md.results.StressbalanceSolution.Vx,\
+	md.results.StressbalanceSolution.Vy,\
+	md.results.StressbalanceSolution.Vz,\
+	md.results.StressbalanceSolution.Vel,\
+	md.results.StressbalanceSolution.Pressure,\
+	]
Index: /issm/trunk-jpl/test/NightlyRun/test3105.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3105.m	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3105.m	(revision 16194)
@@ -0,0 +1,16 @@
+md=triangle(model(),'../Exp/Square.exp',150000.);
+md=setmask(md,'all','');
+md=parameterize(md,'../Par/SquareShelfConstrained.par');
+md=setflowequation(md,'SSA','all');
+md.cluster=generic('name',oshostname(),'np',3);
+md.autodiff.isautodiff=true;
+md.toolkits.DefaultAnalysis=issmmumpssolver();
+md.verbose=verbose('autodiff',true);
+md=solve(md,MasstransportSolutionEnum());
+
+%Fields and tolerances to track changes
+field_names     ={'Thickness'};
+field_tolerances={1e-13};
+field_values={...
+	(md.results.MasstransportSolution.Thickness),...
+	};
Index: /issm/trunk-jpl/test/NightlyRun/test3105.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3105.py	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3105.py	(revision 16194)
@@ -0,0 +1,24 @@
+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/Square.exp',150000.)
+md=setmask(md,'all','')
+md=parameterize(md,'../Par/SquareShelfConstrained.py')
+md=setflowequation(md,'SSA','all')
+md.cluster=generic('name',oshostname(),'np',3)
+md.toolkits.DefaultAnalysis=issmmumpssolver()
+md.autodiff.isautodiff=True
+md=solve(md,MasstransportSolutionEnum())
+
+#Fields and tolerances to track changes
+field_names     =['Thickness']
+field_tolerances=[1e-13]
+field_values=[\
+	md.results.MasstransportSolution.Thickness,\
+	]
Index: /issm/trunk-jpl/test/NightlyRun/test3106.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3106.m	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3106.m	(revision 16194)
@@ -0,0 +1,19 @@
+md=triangle(model(),'../Exp/Square.exp',150000.);
+md=meshconvert(md);
+md=setmask(md,'all','');
+md=parameterize(md,'../Par/SquareShelfConstrained.par');
+md=setflowequation(md,'SSA','all');
+md.cluster=generic('name',oshostname(),'np',3);
+md.masstransport.stabilization=3;
+md.masstransport.spcthickness=md.geometry.thickness;
+md.autodiff.isautodiff=true;
+md.toolkits.DefaultAnalysis=issmmumpssolver();
+md.verbose=verbose('autodiff',true);
+md=solve(md,MasstransportSolutionEnum());
+
+%Fields and tolerances to track changes
+field_names     ={'Thickness'};
+field_tolerances={1e-13};
+field_values={...
+	(md.results.MasstransportSolution.Thickness),...
+	};
Index: /issm/trunk-jpl/test/NightlyRun/test3106.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3106.py	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3106.py	(revision 16194)
@@ -0,0 +1,28 @@
+from model import *
+from triangle import *
+from meshconvert import *
+from setmask import *
+from parameterize import *
+from setflowequation import *
+from EnumDefinitions import *
+from solve import *
+from MatlabFuncs import *
+
+md=triangle(model(),'../Exp/Square.exp',150000.)
+md=meshconvert(md)
+md=setmask(md,'all','')
+md=parameterize(md,'../Par/SquareShelfConstrained.py')
+md=setflowequation(md,'SSA','all')
+md.cluster=generic('name',oshostname(),'np',3)
+md.masstransport.stabilization=3
+md.masstransport.spcthickness=md.geometry.thickness
+md.toolkits.DefaultAnalysis=issmmumpssolver()
+md.autodiff.isautodiff=True
+md=solve(md,MasstransportSolutionEnum())
+
+#Fields and tolerances to track changes
+field_names     =['Thickness']
+field_tolerances=[1e-13]
+field_values=[\
+	md.results.MasstransportSolution.Thickness,\
+	]
Index: /issm/trunk-jpl/test/NightlyRun/test3107.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3107.m	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3107.m	(revision 16194)
@@ -0,0 +1,17 @@
+md=triangle(model(),'../Exp/Square.exp',150000.);
+md=setmask(md,'all','');
+md=parameterize(md,'../Par/SquareShelfConstrained.par');
+md=setflowequation(md,'SSA','all');
+md=extrude(md,5,3.);
+md.cluster=generic('name',oshostname(),'np',3);
+md.autodiff.isautodiff=true;
+md.verbose=verbose('autodiff',true);
+md.toolkits.DefaultAnalysis=issmmumpssolver();
+md=solve(md,MasstransportSolutionEnum());
+
+%Fields and tolerances to track changes
+field_names     ={'Thickness'};
+field_tolerances={1e-13};
+field_values={...
+	(md.results.MasstransportSolution.Thickness),...
+	};
Index: /issm/trunk-jpl/test/NightlyRun/test3107.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3107.py	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3107.py	(revision 16194)
@@ -0,0 +1,25 @@
+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/Square.exp',150000.)
+md=setmask(md,'all','')
+md=parameterize(md,'../Par/SquareShelfConstrained.py')
+md=setflowequation(md,'SSA','all')
+md.extrude(5,3.)
+md.cluster=generic('name',oshostname(),'np',3)
+md.toolkits.DefaultAnalysis=issmmumpssolver()
+md.autodiff.isautodiff=True
+md=solve(md,MasstransportSolutionEnum())
+
+#Fields and tolerances to track changes
+field_names     =['Thickness']
+field_tolerances=[1e-13]
+field_values=[\
+	md.results.MasstransportSolution.Thickness,\
+	]
Index: /issm/trunk-jpl/test/NightlyRun/test3108.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3108.m	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3108.m	(revision 16194)
@@ -0,0 +1,19 @@
+md=triangle(model(),'../Exp/Square.exp',180000.);
+md=setmask(md,'all','');
+md=parameterize(md,'../Par/SquareShelfConstrained.par');
+md=extrude(md,3,1.);
+md=setflowequation(md,'SSA','all');
+md.timestepping.time_step=0;
+md.cluster=generic('name',oshostname(),'np',3);
+md.autodiff.isautodiff=true;
+md.verbose=verbose('autodiff',true);
+md.toolkits.DefaultAnalysis=issmmumpssolver();
+md=solve(md,ThermalSolutionEnum());
+
+%Fields and tolerances to track changes
+field_names     ={'Temperature','BasalforcingsMeltingRate'};
+field_tolerances={1e-13,1e-13};
+field_values={...
+	(md.results.ThermalSolution.Temperature),...
+	(md.results.ThermalSolution.BasalforcingsMeltingRate),...
+	};
Index: /issm/trunk-jpl/test/NightlyRun/test3108.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3108.py	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3108.py	(revision 16194)
@@ -0,0 +1,27 @@
+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/Square.exp',180000.)
+md=setmask(md,'all','')
+md=parameterize(md,'../Par/SquareShelfConstrained.py')
+md.extrude(3,1.)
+md=setflowequation(md,'SSA','all')
+md.timestepping.time_step=0
+md.cluster=generic('name',oshostname(),'np',3)
+md.toolkits.DefaultAnalysis=issmmumpssolver()
+md.autodiff.isautodiff=True
+md=solve(md,ThermalSolutionEnum())
+
+#Fields and tolerances to track changes
+field_names     =['Temperature','BasalforcingsMeltingRate']
+field_tolerances=[1e-13,1e-13]
+field_values=[\
+	md.results.ThermalSolution.Temperature,\
+	md.results.ThermalSolution.BasalforcingsMeltingRate,\
+	]
Index: /issm/trunk-jpl/test/NightlyRun/test3109.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3109.m	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3109.m	(revision 16194)
@@ -0,0 +1,22 @@
+md=triangle(model(),'../Exp/Square.exp',180000.);
+md=setmask(md,'all','');
+md=parameterize(md,'../Par/SquareShelfConstrained.par');
+md=extrude(md,3,1.);
+md=setflowequation(md,'SSA','all');
+md.cluster=generic('name',oshostname(),'np',3);
+md.transient.isstressbalance=0;
+md.transient.ismasstransport=0;
+md.transient.isthermal=1;
+md.transient.isgroundingline=0;
+md.autodiff.isautodiff=true;
+md.verbose=verbose('autodiff',true);
+md.toolkits.DefaultAnalysis=issmmumpssolver();
+md=solve(md,TransientSolutionEnum());
+
+%Fields and tolerances to track changes
+field_names     ={'Temperature','BasalforcingsMeltingRate'};
+field_tolerances={1e-13,1e-13};
+field_values={...
+	(md.results.TransientSolution(1).Temperature),...
+	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+	};
Index: /issm/trunk-jpl/test/NightlyRun/test3109.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3109.py	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3109.py	(revision 16194)
@@ -0,0 +1,30 @@
+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/Square.exp',180000.)
+md=setmask(md,'all','')
+md=parameterize(md,'../Par/SquareShelfConstrained.py')
+md.extrude(3,1.)
+md=setflowequation(md,'SSA','all')
+md.cluster=generic('name',oshostname(),'np',3)
+md.transient.isstressbalance=False
+md.transient.ismasstransport=False
+md.transient.isthermal=True
+md.transient.isgroundingline=False
+md.toolkits.DefaultAnalysis=issmmumpssolver()
+md.autodiff.isautodiff=True
+md=solve(md,TransientSolutionEnum())
+
+#Fields and tolerances to track changes
+field_names     =['Temperature','BasalforcingsMeltingRate']
+field_tolerances=[1e-13,1e-13]
+field_values=[\
+	md.results.TransientSolution[0].Temperature,\
+	md.results.TransientSolution[0].BasalforcingsMeltingRate,\
+	]
Index: /issm/trunk-jpl/test/NightlyRun/test3110.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3110.m	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3110.m	(revision 16194)
@@ -0,0 +1,43 @@
+md=triangle(model(),'../Exp/Square.exp',150000.);
+md=setmask(md,'all','');
+md=parameterize(md,'../Par/SquareShelfConstrained.par');
+md=setflowequation(md,'SSA','all');
+md.cluster=generic('name',oshostname(),'np',3);
+md.transient.requested_outputs=IceVolumeEnum();
+
+md.autodiff.isautodiff=true;
+md.verbose=verbose('autodiff',true);
+md.toolkits.DefaultAnalysis=issmmumpssolver();
+md=solve(md,TransientSolutionEnum());
+
+%Fields and tolerances to track changes
+field_names     ={'Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Volume1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Volume2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Volume3'};
+field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
+						1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
+						1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+field_values={...
+	(md.results.TransientSolution(1).Vx),...
+	(md.results.TransientSolution(1).Vy),...
+	(md.results.TransientSolution(1).Vel),...
+	(md.results.TransientSolution(1).Pressure),...
+	(md.results.TransientSolution(1).Bed),...
+	(md.results.TransientSolution(1).Surface),...
+	(md.results.TransientSolution(1).Thickness),...
+	(md.results.TransientSolution(1).IceVolume),...
+	(md.results.TransientSolution(2).Vx),...
+	(md.results.TransientSolution(2).Vy),...
+	(md.results.TransientSolution(2).Vel),...
+	(md.results.TransientSolution(2).Pressure),...
+	(md.results.TransientSolution(2).Bed),...
+	(md.results.TransientSolution(2).Surface),...
+	(md.results.TransientSolution(2).Thickness),...
+	(md.results.TransientSolution(2).IceVolume),...
+	(md.results.TransientSolution(3).Vx),...
+	(md.results.TransientSolution(3).Vy),...
+	(md.results.TransientSolution(3).Vel),...
+	(md.results.TransientSolution(3).Pressure),...
+	(md.results.TransientSolution(3).Bed),...
+	(md.results.TransientSolution(3).Surface),...
+	(md.results.TransientSolution(3).Thickness),...
+	(md.results.TransientSolution(3).IceVolume),...
+	};
Index: /issm/trunk-jpl/test/NightlyRun/test3110.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3110.py	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3110.py	(revision 16194)
@@ -0,0 +1,51 @@
+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/Square.exp',150000.)
+md=setmask(md,'all','')
+md=parameterize(md,'../Par/SquareShelfConstrained.py')
+md=setflowequation(md,'SSA','all')
+md.cluster=generic('name',oshostname(),'np',3)
+md.toolkits.DefaultAnalysis=issmmumpssolver()
+md.transient.requested_outputs=IceVolumeEnum()
+
+md.autodiff.isautodiff=True
+md=solve(md,TransientSolutionEnum())
+
+#Fields and tolerances to track changes
+field_names     =['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Volume1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Volume2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Volume3']
+field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
+						1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
+						1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
+field_values=[\
+	md.results.TransientSolution[0].Vx,\
+	md.results.TransientSolution[0].Vy,\
+	md.results.TransientSolution[0].Vel,\
+	md.results.TransientSolution[0].Pressure,\
+	md.results.TransientSolution[0].Bed,\
+	md.results.TransientSolution[0].Surface,\
+	md.results.TransientSolution[0].Thickness,\
+	md.results.TransientSolution[0].IceVolume,\
+	md.results.TransientSolution[1].Vx,\
+	md.results.TransientSolution[1].Vy,\
+	md.results.TransientSolution[1].Vel,\
+	md.results.TransientSolution[1].Pressure,\
+	md.results.TransientSolution[1].Bed,\
+	md.results.TransientSolution[1].Surface,\
+	md.results.TransientSolution[1].Thickness,\
+	md.results.TransientSolution[1].IceVolume,\
+	md.results.TransientSolution[2].Vx,\
+	md.results.TransientSolution[2].Vy,\
+	md.results.TransientSolution[2].Vel,\
+	md.results.TransientSolution[2].Pressure,\
+	md.results.TransientSolution[2].Bed,\
+	md.results.TransientSolution[2].Surface,\
+	md.results.TransientSolution[2].Thickness,\
+	md.results.TransientSolution[2].IceVolume,\
+	]
Index: /issm/trunk-jpl/test/NightlyRun/test3115.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3115.m	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3115.m	(revision 16194)
@@ -0,0 +1,78 @@
+%This test runs test3005 with autodiff on, and checks that 
+%the value of the scalar forward difference match a step-wise differential
+
+%First configure
+md=triangle(model(),'../Exp/Square.exp',50000.);
+md=setmask(md,'all','');
+md=parameterize(md,'../Par/SquareShelfConstrained.par');
+md=setflowequation(md,'SSA','all');
+md.cluster=generic('name',oshostname(),'np',3);
+md.masstransport.requested_outputs=IceVolumeEnum();
+md.verbose=verbose('autodiff',true);
+md.toolkits.DefaultAnalysis=issmmumpssolver();
+
+%setup autodiff parameters
+index=1; %this is the scalar component we are checking against
+md.autodiff.independents={...
+	independent('name','Thickness','type','vertex','nods',md.mesh.numberofvertices,'fos_forward_index',index)
+	};
+
+md.autodiff.dependents={...
+	dependent('name','IceVolume','type','scalar')...
+	};
+md.autodiff.driver='fos_forward';
+
+%parameters for the step-wise derivative
+delta=0.001;
+h1=md.geometry.thickness(index);
+h0=h1*(1.-delta);
+h2=h1*(1.+delta);
+deltaH=(h2-h0);
+
+%save model:
+md2=md;
+
+%evaluate derivative by forward and backward stepping 
+%forward
+md=md2;
+md.autodiff.isautodiff=false;
+md.geometry.thickness(index)=h0;
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
+md=SetIceShelfBC(md);
+
+md=solve(md,MasstransportSolutionEnum());
+V0=md.results.MasstransportSolution.IceVolume;
+
+%backward
+md=md2;
+md.autodiff.isautodiff=false;
+md.geometry.thickness(index)=h2;
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
+md=SetIceShelfBC(md);
+
+md=solve(md,MasstransportSolutionEnum());
+V2=md.results.MasstransportSolution.IceVolume;
+
+%compute resulting derivative
+dVdh_an=(V2-V0)/deltaH;
+
+%evaluate derivative using ADOLC 
+md=md2;
+md.autodiff.isautodiff=true;
+md.geometry.thickness(index)=h1;
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
+md=SetIceShelfBC(md);
+
+md=solve(md,MasstransportSolutionEnum());
+%retrieve directly
+dVdh_ad=md.results.MasstransportSolution.AutodiffJacobian;
+
+disp(sprintf('dV/dh: analytical:  %16.16g\n       using adolc:  %16.16g\n',dVdh_an,dVdh_ad));
+
+%Fields and tolerances to track changes
+field_names     ={'dV/dh-dV/dh0'};
+field_tolerances={1e-13};
+field_values={dVdh_ad-dVdh_an};
Index: /issm/trunk-jpl/test/NightlyRun/test3115.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3115.py	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3115.py	(revision 16194)
@@ -0,0 +1,92 @@
+import numpy
+import copy
+from model import *
+from triangle import *
+from setmask import *
+from parameterize import *
+from setflowequation import *
+from independent import *
+from dependent import *
+from SetIceShelfBC import *
+from EnumDefinitions import *
+from solve import *
+from MatlabFuncs import *
+
+#This test runs test3005 with autodiff on, and checks that 
+#the value of the scalar forward difference match a step-wise differential
+
+#First configure
+md=triangle(model(),'../Exp/Square.exp',50000.)
+md=setmask(md,'all','')
+md=parameterize(md,'../Par/SquareShelfConstrained.py')
+md=setflowequation(md,'SSA','all')
+md.cluster=generic('name',oshostname(),'np',3)
+md.masstransport.requested_outputs=IceVolumeEnum()
+md.verbose=verbose('autodiff',True)
+md.toolkits.DefaultAnalysis=issmmumpssolver()
+
+#setup autodiff parameters
+index=1 #this is the scalar component we are checking against
+md.autodiff.independents=[\
+	independent('name','Thickness','type','vertex','nods',md.mesh.numberofvertices,'fos_forward_index',index)
+	]
+
+md.autodiff.dependents=[\
+	dependent('name','IceVolume','type','scalar')\
+	]
+md.autodiff.driver='fos_forward'
+
+#parameters for the step-wise derivative
+delta=0.001
+h1=md.geometry.thickness[index]
+h0=h1*(1.-delta)
+h2=h1*(1.+delta)
+deltaH=(h2-h0)
+
+#save model
+md2=copy.deepcopy(md)
+
+#evaluate derivative by forward and backward stepping 
+#forward
+md=copy.deepcopy(md2)
+md.autodiff.isautodiff=False
+md.geometry.thickness[index]=h0
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness
+md.geometry.surface=md.geometry.bed+md.geometry.thickness
+md=SetIceShelfBC(md)
+
+md=solve(md,MasstransportSolutionEnum())
+V0=md.results.MasstransportSolution.IceVolume
+
+#backward
+md=copy.deepcopy(md2)
+md.autodiff.isautodiff=False
+md.geometry.thickness[index]=h2
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness
+md.geometry.surface=md.geometry.bed+md.geometry.thickness
+md=SetIceShelfBC(md)
+
+md=solve(md,MasstransportSolutionEnum())
+V2=md.results.MasstransportSolution.IceVolume
+
+#compute resulting derivative
+dVdh_an=(V2-V0)/deltaH
+
+#evaluate derivative using ADOLC 
+md=md2
+md.autodiff.isautodiff=True
+md.geometry.thickness[index]=h1
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness
+md.geometry.surface=md.geometry.bed+md.geometry.thickness
+md=SetIceShelfBC(md)
+
+md=solve(md,MasstransportSolutionEnum())
+#retrieve directly
+dVdh_ad=md.results.MasstransportSolution.AutodiffJacobian
+
+print "dV/dh: analytical:  #16.16g\n       using adolc:  #16.16g\n" % (dVdh_an,dVdh_ad)
+
+#Fields and tolerances to track changes
+field_names     =['dV/dh-dV/dh0']
+field_tolerances=[1e-13]
+field_values=[dVdh_ad-dVdh_an]
Index: /issm/trunk-jpl/test/NightlyRun/test3119.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3119.m	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3119.m	(revision 16194)
@@ -0,0 +1,35 @@
+%test reverse scalar vs forward vectorial drivers in ADOLC, using the test3009 setup, equivalent to test109 setup.
+md=triangle(model(),'../Exp/Square.exp',100000.);
+md=setmask(md,'all','');
+md=parameterize(md,'../Par/SquareShelfConstrained.par');
+md=setflowequation(md,'SSA','all');
+md.cluster=generic('name',oshostname(),'np',1);
+md.toolkits.DefaultAnalysis=issmgslsolver();
+
+md.autodiff.isautodiff=true;
+md.verbose.autodiff=true;
+
+%first run scalar reverse mode: 
+md.autodiff.independents={independent('name','Thickness','type','vertex','nods',md.mesh.numberofvertices)};
+md.autodiff.dependents={dependent('name','MaxVel','type','scalar','fos_reverse_index',1)};
+md.autodiff.driver='fos_reverse';
+
+md=solve(md,TransientSolutionEnum());
+
+%recover jacobian: 
+jac_reverse=md.results.TransientSolution(1).AutodiffJacobian;
+
+%now run vectorial forward mode
+md.autodiff.independents={independent('name','Thickness','type','vertex','nods',md.mesh.numberofvertices,'fov_forward_indices',(1:md.mesh.numberofvertices)')};
+md.autodiff.dependents={dependent('name','MaxVel','type','scalar')};
+md.autodiff.driver='fov_forward';
+
+md=solve(md,TransientSolutionEnum());
+
+%recover jacobian: 
+jac_forward=md.results.TransientSolution(1).AutodiffJacobian;
+
+%Fields and tolerances to track changes
+field_names     ={'Jac Forward','Jac Reverse','Jac Forward - Reverse'};
+field_tolerances={1e-8,1e-8,1e-6};
+field_values={jac_forward,jac_reverse,jac_forward-jac_reverse};
Index: /issm/trunk-jpl/test/NightlyRun/test3119.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3119.py	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3119.py	(revision 16194)
@@ -0,0 +1,47 @@
+import numpy
+from model import *
+from triangle import *
+from setmask import *
+from parameterize import *
+from setflowequation import *
+from independent import *
+from dependent import *
+from EnumDefinitions import *
+from solve import *
+from MatlabFuncs import *
+
+#test reverse scalar vs forward vectorial drivers in ADOLC, using the test3009 setup, equivalent to test109 setup.
+md=triangle(model(),'../Exp/Square.exp',100000.)
+md=setmask(md,'all','')
+md=parameterize(md,'../Par/SquareShelfConstrained.py')
+md=setflowequation(md,'SSA','all')
+md.cluster=generic('name',oshostname(),'np',3)
+md.toolkits.DefaultAnalysis=issmgslsolver()
+
+md.autodiff.isautodiff=True
+md.verbose.autodiff=True
+
+#first run scalar reverse mode: 
+md.autodiff.independents=[independent('name','Thickness','type','vertex','nods',md.mesh.numberofvertices)]
+md.autodiff.dependents=[dependent('name','MaxVel','type','scalar','fos_reverse_index',1)]
+md.autodiff.driver='fos_reverse'
+
+md=solve(md,TransientSolutionEnum())
+
+#recover jacobian: 
+jac_reverse=md.results.TransientSolution[0].AutodiffJacobian
+
+#now run vectorial forward mode
+md.autodiff.independents=[independent('name','Thickness','type','vertex','nods',md.mesh.numberofvertices,'fov_forward_indices',numpy.arange(0,md.mesh.numberofvertices))]
+md.autodiff.dependents=[dependent('name','MaxVel','type','scalar')]
+md.autodiff.driver='fov_forward'
+
+md=solve(md,TransientSolutionEnum())
+
+#recover jacobian: 
+jac_forward=md.results.TransientSolution[0].AutodiffJacobian
+
+#Fields and tolerances to track changes
+field_names     =['Jac Forward','Jac Reverse','Jac Forward - Reverse']
+field_tolerances=[1e-13,1e-13,1e-13]
+field_values=[jac_forward,jac_reverse,jac_forward-jac_reverse]
Index: /issm/trunk-jpl/test/NightlyRun/test3120.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3120.m	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3120.m	(revision 16194)
@@ -0,0 +1,85 @@
+%This test runs test3020 with autodiff on, and checks that 
+%the value of the scalar forward difference match a step-wise differential
+
+%First configure
+md=triangle(model(),'../Exp/Square.exp',150000.);
+md=setmask(md,'all','');
+md=parameterize(md,'../Par/SquareShelfConstrained.par');
+md=setflowequation(md,'SSA','all');
+md.cluster=generic('name',oshostname(),'np',3);
+md.transient.requested_outputs=[IceVolumeEnum();MaxVelEnum()];
+md.verbose=verbose('autodiff',true);
+md.stressbalance.restol=1e-4;
+md.toolkits.DefaultAnalysis=issmmumpssolver();
+
+%setup autodiff parameters
+index=1; %this is the scalar component we are checking against
+md.autodiff.independents={...
+	independent('name','Thickness','type','vertex','nods',md.mesh.numberofvertices,'fos_forward_index',index)
+	};
+
+md.autodiff.dependents={...
+	dependent('name','IceVolume','type','scalar'),...
+	dependent('name','MaxVel','type','scalar')...
+	};
+md.autodiff.driver='fos_forward';
+
+%parameters for the step-wise derivative
+delta=0.00001;
+h1=md.geometry.thickness(index);
+h0=h1*(1.-delta);
+h2=h1*(1.+delta);
+deltaH=(h2-h0);
+
+%save model:
+md2=md;
+
+%evaluate derivative by forward and backward stepping 
+%forward
+md=md2;
+md.autodiff.isautodiff=false;
+md.geometry.thickness(index)=h0;
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
+md=SetIceShelfBC(md);
+
+md=solve(md,TransientSolutionEnum());
+V0=md.results.TransientSolution(end).IceVolume;
+MaxV0=md.results.TransientSolution(end).MaxVel;
+
+%backward
+md=md2;
+md.autodiff.isautodiff=false;
+md.geometry.thickness(index)=h2;
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
+md=SetIceShelfBC(md);
+
+md=solve(md,TransientSolutionEnum());
+V2=md.results.TransientSolution(end).IceVolume;
+MaxV2=md.results.TransientSolution(end).MaxVel;
+
+%compute resulting derivative
+dVdh_an=(V2-V0)/deltaH;
+dMaxVdh_an=(MaxV2-MaxV0)/deltaH;
+
+%evaluate derivative using ADOLC 
+md=md2;
+md.autodiff.isautodiff=true;
+md.geometry.thickness(index)=h1;
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+md.geometry.surface=md.geometry.bed+md.geometry.thickness;
+md=SetIceShelfBC(md);
+
+md=solve(md,TransientSolutionEnum());
+%retrieve directly
+dVdh_ad=md.results.TransientSolution(1).AutodiffJacobian(1);
+dMaxVdh_ad=md.results.TransientSolution(1).AutodiffJacobian(2);
+
+disp(sprintf('dV/dh: analytical:  %16.16g\n       using adolc:  %16.16g\n',dVdh_an,dVdh_ad));
+disp(sprintf('dMaxV/dh: analytical:  %16.16g\n       using adolc:  %16.16g\n',dMaxVdh_an,dMaxVdh_ad));
+
+%Fields and tolerances to track changes
+field_names     ={'dV/dh-dV/dh0','dMaxV/dh-dMaxV/dh0'};
+field_tolerances={1e-8,1e-7};
+field_values={dVdh_ad-dVdh_an,dMaxVdh_an-dMaxVdh_ad};
Index: /issm/trunk-jpl/test/NightlyRun/test3120.py
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3120.py	(revision 16194)
+++ /issm/trunk-jpl/test/NightlyRun/test3120.py	(revision 16194)
@@ -0,0 +1,99 @@
+import numpy
+import copy
+from model import *
+from triangle import *
+from setmask import *
+from parameterize import *
+from setflowequation import *
+from independent import *
+from dependent import *
+from SetIceShelfBC import *
+from EnumDefinitions import *
+from solve import *
+from MatlabFuncs import *
+
+#This test runs test3020 with autodiff on, and checks that 
+#the value of the scalar forward difference match a step-wise differential
+
+#First configure
+md=triangle(model(),'../Exp/Square.exp',150000.)
+md=setmask(md,'all','')
+md=parameterize(md,'../Par/SquareShelfConstrained.py')
+md=setflowequation(md,'SSA','all')
+md.cluster=generic('name',oshostname(),'np',3)
+md.transient.requested_outputs=[IceVolumeEnum(),MaxVelEnum()]
+md.verbose=verbose('autodiff',True)
+md.stressbalance.restol=0.000001
+md.toolkits.DefaultAnalysis=issmmumpssolver()
+
+#setup autodiff parameters
+index=1 #this is the scalar component we are checking against
+md.autodiff.independents=[\
+	independent('name','Thickness','type','vertex','nods',md.mesh.numberofvertices,'fos_forward_index',index)
+	]
+
+md.autodiff.dependents=[\
+	dependent('name','IceVolume','type','scalar'),\
+	dependent('name','MaxVel','type','scalar')\
+	]
+md.autodiff.driver='fos_forward'
+
+#parameters for the step-wise derivative
+delta=0.00001
+h1=md.geometry.thickness[index]
+h0=h1*(1.-delta)
+h2=h1*(1.+delta)
+deltaH=(h2-h0)
+
+#save model:
+md2=copy.deepcopy(md)
+
+#evaluate derivative by forward and backward stepping 
+#forward
+md=copy.deepcopy(md2)
+md.autodiff.isautodiff=False
+md.geometry.thickness[index]=h0
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness
+md.geometry.surface=md.geometry.bed+md.geometry.thickness
+md=SetIceShelfBC(md)
+
+md=solve(md,TransientSolutionEnum())
+V0=md.results.TransientSolution[2].IceVolume
+MaxV0=md.results.TransientSolution[2].MaxVel
+
+#backward
+md=copy.deepcopy(md2)
+md.autodiff.isautodiff=False
+md.geometry.thickness[index]=h2
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness
+md.geometry.surface=md.geometry.bed+md.geometry.thickness
+md=SetIceShelfBC(md)
+
+md=solve(md,TransientSolutionEnum())
+V2=md.results.TransientSolution[2].IceVolume
+MaxV2=md.results.TransientSolution[2].MaxVel
+
+#compute resulting derivative
+dVdh_an=(V2-V0)/deltaH
+dMaxVdh_an=(MaxV2-MaxV0)/deltaH
+
+#evaluate derivative using ADOLC 
+md=copy.deepcopy(md2)
+md.autodiff.isautodiff=True
+md.geometry.thickness[index]=h1
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness
+md.geometry.surface=md.geometry.bed+md.geometry.thickness
+md=SetIceShelfBC(md)
+
+md=solve(md,TransientSolutionEnum())
+#retrieve directly
+dVdh_ad=md.results.TransientSolution[0].AutodiffJacobian[0]
+dMaxVdh_ad=md.results.TransientSolution[0].AutodiffJacobian[1]
+
+print "dV/dh: analytical:  %16.16g\n       using adolc:  %16.16g\n" % (dVdh_an,dVdh_ad)
+print "dMaxV/dh: analytical:  %16.16g\n       using adolc:  %16.16g\n" % (dMaxVdh_an,dMaxVdh_ad)
+
+#Fields and tolerances to track changes
+field_names     =['dV/dh-dV/dh0','dMaxV/dh-dMaxV/dh0']
+field_tolerances=[1e-13,1e-13]
+field_values=[dVdh_ad-dVdh_an,dMaxVdh_an-dMaxVdh_ad]
