Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Control/CreateParametersControl.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Control/CreateParametersControl.cpp	(revision 18875)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Control/CreateParametersControl.cpp	(revision 18876)
@@ -30,7 +30,6 @@
 		/*How many controls and how many responses?*/
 		parameters->AddObject(iomodel->CopyConstantObject(InversionNumControlParametersEnum));
 		parameters->AddObject(iomodel->CopyConstantObject(InversionNumCostFunctionsEnum));
-		parameters->AddObject(iomodel->CopyConstantObject(InversionIncompleteAdjointEnum));
 
 		/*What solution type?*/
 		if(solution_type==SteadystateSolutionEnum){
@@ -49,6 +48,7 @@
 		/*Inversion type specifics*/
 		switch(inversiontype){
 			case 0:/*Brent Search*/
+				parameters->AddObject(iomodel->CopyConstantObject(InversionIncompleteAdjointEnum));
 				parameters->AddObject(iomodel->CopyConstantObject(InversionNstepsEnum));
 				parameters->AddObject(iomodel->CopyConstantObject(InversionCostFunctionThresholdEnum));
 				iomodel->FetchData(&cm_jump,&nsteps,NULL,InversionStepThresholdEnum);
@@ -59,6 +59,7 @@
 				parameters->AddObject(new IntVecParam(InversionMaxiterPerStepEnum,maxiter,nsteps));
 				break;
 			case 1:/*TAO*/
+				parameters->AddObject(iomodel->CopyConstantObject(InversionIncompleteAdjointEnum));
 				parameters->AddObject(iomodel->CopyConstantObject(InversionFatolEnum));
 				parameters->AddObject(iomodel->CopyConstantObject(InversionFrtolEnum));
 				parameters->AddObject(iomodel->CopyConstantObject(InversionGatolEnum));
@@ -69,6 +70,7 @@
 				parameters->AddObject(iomodel->CopyConstantObject(InversionAlgorithmEnum));
 				break;
 			case 2:/*M1QN3*/
+				parameters->AddObject(iomodel->CopyConstantObject(InversionIncompleteAdjointEnum));
 				parameters->AddObject(iomodel->CopyConstantObject(InversionDxminEnum));
 				parameters->AddObject(iomodel->CopyConstantObject(InversionGttolEnum));
 				parameters->AddObject(iomodel->CopyConstantObject(InversionMaxstepsEnum));
@@ -77,16 +79,24 @@
 				parameters->AddObject(new DoubleVecParam(InversionControlScalingFactorsEnum,control_scaling_factors,num_controls));
 				break;
 			case 3:/*Validation*/
+				parameters->AddObject(iomodel->CopyConstantObject(InversionIncompleteAdjointEnum));
 				iomodel->FetchData(&control_scaling_factors,NULL,NULL,InversionControlScalingFactorsEnum);
 				parameters->AddObject(new DoubleVecParam(InversionControlScalingFactorsEnum,control_scaling_factors,num_controls));
 				break;
+			case 4:/*M1QN3 AD*/
+				parameters->AddObject(iomodel->CopyConstantObject(InversionDxminEnum));
+				parameters->AddObject(iomodel->CopyConstantObject(InversionGttolEnum));
+				parameters->AddObject(iomodel->CopyConstantObject(InversionMaxstepsEnum));
+				parameters->AddObject(iomodel->CopyConstantObject(InversionMaxiterEnum));
+				iomodel->FetchData(&control_scaling_factors,NULL,NULL,InversionControlScalingFactorsEnum);
+				parameters->AddObject(new DoubleVecParam(InversionControlScalingFactorsEnum,control_scaling_factors,num_controls));
+				break;
 			default:
 				_error_("not supported");
 
 		}
 
 		xDelete<int>(control_type);
-		xDelete<int>(cm_responses);
 		xDelete<int>(maxiter);
 		xDelete<IssmDouble>(control_scaling_factors);
 		iomodel->DeleteData(cm_jump,InversionStepThresholdEnum);
