Index: /issm/trunk-jpl/src/c/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/c/Makefile.am	(revision 13699)
+++ /issm/trunk-jpl/src/c/Makefile.am	(revision 13700)
@@ -318,6 +318,4 @@
 					./modules/ConstraintsStatex/ConstraintsStatex.h\
 					./modules/ConstraintsStatex/ConstraintsStateLocal.h\
-					./modules/RequestedDependentsx/RequestedDependentsx.h\
-					./modules/RequestedDependentsx/RequestedDependentsx.cpp\
 					./modules/ResetConstraintsx/ResetConstraintsx.h\
 					./modules/ResetConstraintsx/ResetConstraintsx.cpp\
Index: /issm/trunk-jpl/src/c/classes/FemModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 13699)
+++ /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 13700)
@@ -508,4 +508,39 @@
 }
 /*}}}*/
+void FemModel::RequestedDependentsx(void){/*{{{*/
+
+
+	int         i;
+	bool        isautodiff      = false;
+	IssmDouble  output_value;
+
+	int         num_dependents;
+	IssmPDouble *dependents;
+	DataSet*    dependent_objects=NULL;
+
+	/*AD mode on?: */
+	parameters->FindParam(&isautodiff,AutodiffIsautodiffEnum);
+
+	if(isautodiff){
+		#ifdef _HAVE_ADOLC_
+		parameters->FindParam(&num_dependents,AutodiffNumDependentsEnum);
+		parameters->FindParam(&dependent_objects,AutodiffDependentObjectsEnum);
+		if(num_dependents){
+			dependents=xNew<IssmPDouble>(num_dependents);
+
+			/*Go through our dependent variables, and compute the response:*/
+			for(i=0;i<dependent_objects->Size();i++){
+				DependentObject* dep=(DependentObject*)dependent_objects->GetObjectByOffset(i);
+				dep->Responsex(&output_value,this);
+				output_value>>=dependents[i];
+			}
+		}
+		delete dependent_objects;
+		#else
+		_error_("Should not be requesting dependents when an AD library is not available!");
+		#endif
+	}
+}
+/*}}}*/
 #ifdef _HAVE_CONTROL_
 void FemModel::ThicknessAbsGradientx( IssmDouble* pJ, bool process_units, int weight_index){/*{{{*/
@@ -537,7 +572,4 @@
 }
 /*}}}*/
-#endif
-
-#ifdef  _HAVE_DAKOTA_
 void FemModel::CostFunctionx(IssmDouble* pJ){/*{{{*/
 
@@ -568,4 +600,7 @@
 }
 /*}}}*/
+#endif
+
+#ifdef  _HAVE_DAKOTA_
 void FemModel::DakotaResponsesx(double* d_responses,char** responses_descriptors,int numresponsedescriptors,int d_numresponses){/*{{{*/
 
Index: /issm/trunk-jpl/src/c/classes/FemModel.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/FemModel.h	(revision 13699)
+++ /issm/trunk-jpl/src/c/classes/FemModel.h	(revision 13700)
@@ -64,12 +64,13 @@
 		/*Modules: {{{*/
 		 #ifdef  _HAVE_DAKOTA_
-		void CostFunctionx( IssmDouble* pJ);
 		void DakotaResponsesx(double* d_responses,char** responses_descriptors,int numresponsedescriptors,int d_numresponses);
 		#endif
 
 		void RequestedOutputsx(int* requested_outputs, int numoutputs);
+		void RequestedDependentsx(void);
 		void Responsex(IssmDouble* presponse,int response_descriptor_enum,bool process_units,int weight_index);
 		void Responsex(IssmDouble* presponse,const char* response_descriptor,bool process_units,int weight_index);
 		#ifdef _HAVE_CONTROL_
+		void CostFunctionx( IssmDouble* pJ);
 		void ThicknessAbsGradientx( IssmDouble* pJ, bool process_units,int weight_index);
 		#endif
Index: /issm/trunk-jpl/src/c/modules/modules.h
===================================================================
--- /issm/trunk-jpl/src/c/modules/modules.h	(revision 13699)
+++ /issm/trunk-jpl/src/c/modules/modules.h	(revision 13700)
@@ -98,5 +98,4 @@
 #include "./Reducevectorgtosx/Reducevectorgtosx.h"
 #include "./Reducevectorgtofx/Reducevectorgtofx.h"
-#include "./RequestedDependentsx/RequestedDependentsx.h"
 #include "./ResetConstraintsx/ResetConstraintsx.h"
 #include "./ResetCoordinateSystemx/ResetCoordinateSystemx.h"
Index: /issm/trunk-jpl/src/c/solutions/diagnostic_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/diagnostic_core.cpp	(revision 13699)
+++ /issm/trunk-jpl/src/c/solutions/diagnostic_core.cpp	(revision 13700)
@@ -105,5 +105,5 @@
 	}
 
-	if(solution_type==DiagnosticSolutionEnum)RequestedDependentsx(femmodel->results,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
+	if(solution_type==DiagnosticSolutionEnum)femmodel->RequestedDependentsx();
 
 	/*Free ressources:*/
Index: /issm/trunk-jpl/src/c/solutions/prognostic_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/prognostic_core.cpp	(revision 13699)
+++ /issm/trunk-jpl/src/c/solutions/prognostic_core.cpp	(revision 13700)
@@ -54,5 +54,5 @@
 	}
 
-	if(solution_type==PrognosticSolutionEnum)RequestedDependentsx(femmodel->results,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
+	if(solution_type==PrognosticSolutionEnum)femmodel->RequestedDependentsx();
 
 	/*Free ressources:*/
Index: /issm/trunk-jpl/src/c/solutions/transient_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/transient_core.cpp	(revision 13699)
+++ /issm/trunk-jpl/src/c/solutions/transient_core.cpp	(revision 13700)
@@ -152,5 +152,5 @@
 	}
 
-	RequestedDependentsx(femmodel->results,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
+	femmodel->RequestedDependentsx();
 
 	/*Free ressources:*/
