Index: /issm/trunk/src/mex/CostFunction/CostFunction.cpp
===================================================================
--- /issm/trunk/src/mex/CostFunction/CostFunction.cpp	(revision 5279)
+++ /issm/trunk/src/mex/CostFunction/CostFunction.cpp	(revision 5280)
@@ -8,11 +8,11 @@
 
 	/*input datasets: */
-	Elements* elements=NULL;
-	Loads* loads=NULL;
-	Nodes* nodes=NULL;
-	Vertices* vertices=NULL;
-	Materials* materials=NULL;
-	Parameters* parameters=NULL;
-	bool process_units=false;
+	Elements   *elements   = NULL;
+	Loads      *loads      = NULL;
+	Nodes      *nodes      = NULL;
+	Vertices   *vertices   = NULL;
+	Materials  *materials  = NULL;
+	Parameters *parameters = NULL;
+	int         response;
 
 	/* output datasets: */
@@ -32,4 +32,5 @@
 	FetchData((DataSet**)&materials,MATERIALS);
 	FetchParams(&parameters,PARAMETERS);
+	FetchData(&response,RESPONSE);
 
 	/*configure: */
@@ -39,5 +40,5 @@
 
 	/*!Call core code: */
-	CostFunctionx(&J, elements,nodes,vertices, loads,materials,parameters,process_units);
+	CostFunctionx(&J, elements,nodes,vertices, loads,materials,parameters,response);
 
 	/*write output : */
@@ -59,5 +60,5 @@
 {
 	_printf_("\n");
-	_printf_("   usage: [J] = %s(elements,nodes,vertices,loads, materials, parameters);\n",__FUNCT__);
+	_printf_("   usage: [J] = %s(elements,nodes,vertices,loads, materials, parameters,response);\n",__FUNCT__);
 	_printf_("\n");
 }
Index: /issm/trunk/src/mex/CostFunction/CostFunction.h
===================================================================
--- /issm/trunk/src/mex/CostFunction/CostFunction.h	(revision 5279)
+++ /issm/trunk/src/mex/CostFunction/CostFunction.h	(revision 5280)
@@ -23,4 +23,5 @@
 #define MATERIALS (mxArray*)prhs[4]
 #define PARAMETERS (mxArray*)prhs[5]
+#define RESPONSE (mxArray*)prhs[6]
 
 /* serial output macros: */
@@ -31,5 +32,5 @@
 #define NLHS  1
 #undef NRHS
-#define NRHS  6
+#define NRHS  7
 
 #endif  /* _COSTFUNCTION_H */
