Index: ../trunk-jpl/src/m/classes/inversion.m
===================================================================
--- ../trunk-jpl/src/m/classes/inversion.m	(revision 18404)
+++ ../trunk-jpl/src/m/classes/inversion.m	(revision 18405)
@@ -132,11 +132,11 @@
 			md = checkfield(md,'fieldname','inversion.incomplete_adjoint','values',[0 1]);
 			md = checkfield(md,'fieldname','inversion.control_parameters','cell',1,'values',...
 				{'BalancethicknessThickeningRate' 'FrictionCoefficient' 'MaterialsRheologyBbar' 'DamageDbar' 'Vx' 'Vy' 'Thickness',...
-				'BalancethicknessNux' 'BalancethicknessNuy' 'BalancethicknessApparentMassbalance'});
+				'BalancethicknessNu' 'BalancethicknessApparentMassbalance'});
 			md = checkfield(md,'fieldname','inversion.nsteps','numel',1,'>=',0);
 			md = checkfield(md,'fieldname','inversion.maxiter_per_step','size',[md.inversion.nsteps 1],'>=',0);
 			md = checkfield(md,'fieldname','inversion.step_threshold','size',[md.inversion.nsteps 1]);
-			md = checkfield(md,'fieldname','inversion.cost_functions','size',[1 num_costfunc],'values',[101:105 201 501:507]);
+			md = checkfield(md,'fieldname','inversion.cost_functions','size',[1 num_costfunc],'values',[101:105 201 501:506 601:604]);
 			md = checkfield(md,'fieldname','inversion.cost_functions_coefficients','size',[md.mesh.numberofvertices num_costfunc],'>=',0);
 			md = checkfield(md,'fieldname','inversion.gradient_scaling','size',[md.inversion.nsteps num_controls]);
 			md = checkfield(md,'fieldname','inversion.min_parameters','size',[md.mesh.numberofvertices num_controls]);
@@ -238,7 +238,11 @@
 			pos=find(obj.cost_functions==504); data(pos)=ThicknessAlongGradientEnum();
 			pos=find(obj.cost_functions==505); data(pos)=ThicknessAcrossGradientEnum();
 			pos=find(obj.cost_functions==506); data(pos)=BalancethicknessMisfitEnum();
-			pos=find(obj.cost_functions==507); data(pos)=Balancethickness2MisfitEnum();
+			pos=find(obj.cost_functions==601); data(pos)=IrrotationalH2MisfitEnum();
+			pos=find(obj.cost_functions==602); data(pos)=IrrotationalDirectionMisfitEnum();
+			pos=find(obj.cost_functions==603); data(pos)=IrrotationalVelMisfitEnum();
+			pos=find(obj.cost_functions==604); data(pos)=IrrotationalAlongGradientNuEnum();
+			pos=find(obj.cost_functions==605); data(pos)=IrrotationalAcrossGradientNuEnum();
 			WriteData(fid,'data',data,'enum',InversionCostFunctionsEnum(),'format','DoubleMat','mattype',3);
 			WriteData(fid,'data',num_cost_functions,'enum',InversionNumCostFunctionsEnum(),'format','Integer');
 		end % }}}
Index: ../trunk-jpl/src/m/classes/m1qn3inversion.m
===================================================================
--- ../trunk-jpl/src/m/classes/m1qn3inversion.m	(revision 18404)
+++ ../trunk-jpl/src/m/classes/m1qn3inversion.m	(revision 18405)
@@ -70,12 +70,13 @@
 			md = checkfield(md,'fieldname','inversion.iscontrol','values',[0 1]);
 			md = checkfield(md,'fieldname','inversion.incomplete_adjoint','values',[0 1]);
 			md = checkfield(md,'fieldname','inversion.control_parameters','cell',1,'values',...
-				{'BalancethicknessThickeningRate' 'FrictionCoefficient' 'MaterialsRheologyBbar' 'MaterialsRheologyZbar' 'Vx' 'Vy' 'Thickness' 'BalancethicknessApparentMassbalance'});
+				{'BalancethicknessThickeningRate' 'FrictionCoefficient' 'MaterialsRheologyBbar' 'DamageDbar',...
+				'Vx' 'Vy' 'Thickness' 'BalancethicknessNu' 'BalancethicknessApparentMassbalance'});
 			md = checkfield(md,'fieldname','inversion.maxsteps','numel',1,'>=',0);
 			md = checkfield(md,'fieldname','inversion.maxiter','numel',1,'>=',0);
 			md = checkfield(md,'fieldname','inversion.dxmin','numel',1,'>',0);
 			md = checkfield(md,'fieldname','inversion.gttol','numel',1,'>',0);
-			md = checkfield(md,'fieldname','inversion.cost_functions','size',[1 num_costfunc],'values',[101:105 201 501:507]);
+			md = checkfield(md,'fieldname','inversion.cost_functions','size',[1 num_costfunc],'values',[101:105 201 501:506 601:604]);
 			md = checkfield(md,'fieldname','inversion.cost_functions_coefficients','size',[md.mesh.numberofvertices num_costfunc],'>=',0);
 			md = checkfield(md,'fieldname','inversion.min_parameters','size',[md.mesh.numberofvertices num_controls]);
 			md = checkfield(md,'fieldname','inversion.max_parameters','size',[md.mesh.numberofvertices num_controls]);
@@ -168,7 +169,11 @@
 			pos=find(obj.cost_functions==504); data(pos)=ThicknessAlongGradientEnum();
 			pos=find(obj.cost_functions==505); data(pos)=ThicknessAcrossGradientEnum();
 			pos=find(obj.cost_functions==506); data(pos)=BalancethicknessMisfitEnum();
-			pos=find(obj.cost_functions==507); data(pos)=Balancethickness2MisfitEnum();
+			pos=find(obj.cost_functions==601); data(pos)=IrrotationalH2MisfitEnum();
+			pos=find(obj.cost_functions==602); data(pos)=IrrotationalDirectionMisfitEnum();
+			pos=find(obj.cost_functions==603); data(pos)=IrrotationalVelMisfitEnum();
+			pos=find(obj.cost_functions==604); data(pos)=IrrotationalAlongGradientNuEnum();
+			pos=find(obj.cost_functions==605); data(pos)=IrrotationalAcrossGradientNuEnum();
 			WriteData(fid,'data',data,'enum',InversionCostFunctionsEnum(),'format','DoubleMat','mattype',3);
 			WriteData(fid,'data',num_cost_functions,'enum',InversionNumCostFunctionsEnum(),'format','Integer');
 		end % }}}
