Index: /issm/trunk/src/c/Makefile.am
===================================================================
--- /issm/trunk/src/c/Makefile.am	(revision 5477)
+++ /issm/trunk/src/c/Makefile.am	(revision 5478)
@@ -263,5 +263,5 @@
 					./shared/Elements/Paterson.cpp\
 					./shared/Elements/GetVerticesCoordinates.cpp\
-					./shared/String/isdistributed.cpp\
+					./shared/String/DescriptorIndex.cpp\
 					./shared/String/sharedstring.h\
 					./shared/Bamg/Abs.h \
@@ -501,4 +501,6 @@
 					./modules/AverageFilterx/AverageFilterx.cpp\
 					./modules/AverageFilterx/AverageFilterx.h\
+					./modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp\
+					./modules/AverageOntoPartitionx/AverageOntoPartitionx.h\
 					./modules/MeshPartitionx/MeshPartitionx.cpp\
 					./modules/MeshPartitionx/MeshPartitionx.h\
@@ -813,5 +815,5 @@
 					./shared/Elements/Paterson.cpp\
 					./shared/Elements/GetVerticesCoordinates.cpp\
-					./shared/String/isdistributed.cpp\
+					./shared/String/DescriptorIndex.cpp\
 					./shared/String/sharedstring.h\
 					./shared/Bamg/Abs.h \
@@ -1050,4 +1052,6 @@
 					./modules/AverageFilterx/AverageFilterx.cpp\
 					./modules/AverageFilterx/AverageFilterx.h\
+					./modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp\
+					./modules/AverageOntoPartitionx/AverageOntoPartitionx.h\
 					./modules/MeshPartitionx/MeshPartitionx.cpp\
 					./modules/MeshPartitionx/MeshPartitionx.h\
Index: /issm/trunk/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp
===================================================================
--- /issm/trunk/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp	(revision 5478)
+++ /issm/trunk/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp	(revision 5478)
@@ -0,0 +1,54 @@
+/*!\file AverageOntoPartitionx
+ * \brief: average vertex vector values onto a sub-partition of the vertices
+ * used by scaled responses in Qmu analysis. See DakotaResponses module.
+ */
+
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "./AverageOntoPartitionx.h"
+#include "../../Container/Container.h"    
+#include "../../shared/shared.h"
+#include "../../include/include.h"
+#include "../../EnumDefinitions/EnumDefinitions.h"
+#include "../../toolkits/toolkits.h"
+#include "../modules.h"
+
+			
+void AverageOntoPartitionx(double** average, double* vertex_response, Vertices* vertices, Parameters* parameters,Vec node_partition){
+
+	int     i,j,k;
+	int     dummy;
+
+	int     qmu_npart;
+	double *qmu_part_serial = NULL;
+	double *qmu_part  = NULL;
+	double* partition=NULL; //serial version of node_partition
+	int     numberofvertices;
+
+	/*First, recover qmu partition of vertices. Careful, do not confuse with node_partition, which is just used to distribute vertices 
+	 * onto cpus in a cluter: */
+	if(!parameters->FindParam(&qmu_part_serial,&dummy,QmuPartEnum))ISSMERROR(" could not find qmu partition vector");
+
+	/*Some parameters: */
+	numberofvertices=vertices->NumberOfVertices();
+	parameters->FindParam(&qmu_npart,QmuNPartEnum);
+
+	/*serialize nodal partition vector: */
+	VecToMPISerial(&partition,node_partition);
+
+	/*Use partition vector to repartition qmu_part_serial, which is ordered in a serial way: */
+	qmu_part=(double*)xmalloc(numberofvertices*sizeof(double));
+	for(k=0;k<numberofvertices;k++) qmu_part[(int)(partition[k])]=qmu_part_serial[k];
+
+	/*Ok, now we have a qmu partition (into separate areas) that takes into account the parallelism of the cluster. 
+	 *We want to use this vector, and the vector of responses, to average onto the separate areas. The result will 
+	 be a npart sized vector. */
+
+	ISSMERROR(" not supported yet!");
+
+
+}
Index: /issm/trunk/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.h
===================================================================
--- /issm/trunk/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.h	(revision 5478)
+++ /issm/trunk/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.h	(revision 5478)
@@ -0,0 +1,13 @@
+/*!\file:  AverageOntoPartitionx.h
+ * \brief header file for averaging  dakota responses onto a vertices partition
+ */ 
+
+#ifndef _AVERAGEONTOPARTITIONXX_H
+#define _AVERAGEONTOPARTITIONXX_H
+
+#include "../../objects/objects.h"
+#include "../../Container/Container.h"
+
+void AverageOntoPartitionx(double** average, double* vertex_response, Vertices* vertices,Parameters* parameters,Vec node_partition);
+
+#endif  /* _AVERAGEONTOPARTITIONXX_H */
Index: /issm/trunk/src/c/modules/modules.h
===================================================================
--- /issm/trunk/src/c/modules/modules.h	(revision 5477)
+++ /issm/trunk/src/c/modules/modules.h	(revision 5478)
@@ -9,4 +9,5 @@
 #include "./AddExternalResultx/AddExternalResultx.h"
 #include "./AverageFilterx/AverageFilterx.h"
+#include "./AverageOntoPartitionx/AverageOntoPartitionx.h"
 #include "./Bamgx/Bamgx.h"
 #include "./BamgConvertMeshx/BamgConvertMeshx.h"
