Index: /issm/trunk/src/mex/Response/Response.cpp
===================================================================
--- /issm/trunk/src/mex/Response/Response.cpp	(revision 6715)
+++ /issm/trunk/src/mex/Response/Response.cpp	(revision 6716)
@@ -1,4 +1,4 @@
 /*\file Response.c
- *\brief: compute misfit between modeled velocity and observed velocity
+ *\brief: compute response according to a response descriptor
  */
 
@@ -16,4 +16,7 @@
 	char       *response   = NULL;
 	bool        process_units;
+
+	/* output datasets: */
+	double resp;
 
 	/*Boot module: */
@@ -38,47 +41,9 @@
 	loads->     Configure(elements, loads, nodes,vertices, materials,parameters);
 
-	/*for MassFlux, loop over all profiles: */
-	if (StringToEnum(response) == MassFluxEnum) {
-		int  counter;
+	/*!Call core code: */
+	Responsex(&resp, elements,nodes,vertices, loads,materials,parameters,response,process_units);
 
-		/*all segments: */
-		double** array=NULL;
-		int      M;
-
-		/* output datasets: */
-		double*  resp;
-
-		/*First, figure out which segment to compute our mass flux on. Start with retrieving qmu_mass_flux_segments: */
-		if(!parameters->FindParam(&array,&M,NULL,NULL,QmuMassFluxSegmentsEnum))_error_(" could not find QmuMassFluxSegmentsEnum");
-
-		/*Retrieve index of segments being used for MassFlux computation: */
-//		if(!parameters->FindParam(&counter,IndexEnum))_error_(" could not find IndexEnum");
-
-		resp=(double*)xcalloc(M,sizeof(double));
-		for (counter=0; counter<M; counter++) {
-			/*indexed response: plug index into parameters and call response module: */
-			parameters->SetParam(counter+1,IndexEnum);
-
-			/*!Call core code: */
-			Responsex(&resp[counter], elements,nodes,vertices, loads,materials,parameters,response,process_units);
-		}
-
-		/*write output : */
-		WriteData(OUTPUT,resp,M);
-//		WriteData does not copy data, so don't free (jes, 11/30/10)
-//		xfree((void**)&resp);
-	}
-
-	/*otherwise a single call: */
-	else {
-		/* output datasets: */
-		double   resp;
-
-		/*!Call core code: */
-		Responsex(&resp, elements,nodes,vertices, loads,materials,parameters,response,process_units);
-
-		/*write output : */
-		WriteData(OUTPUT,resp);
-	}
+	/*write output : */
+	WriteData(OUTPUT,resp);
 
 	/*Free ressources: */
