Index: /issm/trunk/src/c/Makefile.am
===================================================================
--- /issm/trunk/src/c/Makefile.am	(revision 9205)
+++ /issm/trunk/src/c/Makefile.am	(revision 9206)
@@ -494,4 +494,6 @@
 					./modules/NodesDofx/NodesDofx.h\
 					./modules/NodesDofx/NodesDofx.cpp\
+					./modules/NodalValuex/NodalValuex.h\
+					./modules/NodalValuex/NodalValuex.cpp\
 					./modules/TriaSearchx/TriaSearchx.h\
 					./modules/TriaSearchx/TriaSearchx.cpp\
@@ -1183,4 +1185,6 @@
 					./modules/NodesDofx/NodesDofx.h\
 					./modules/NodesDofx/NodesDofx.cpp\
+					./modules/NodalValuex/NodalValuex.h\
+					./modules/NodalValuex/NodalValuex.cpp\
 					./modules/TriaSearchx/TriaSearchx.h\
 					./modules/TriaSearchx/TriaSearchx.cpp\
Index: /issm/trunk/src/c/modules/NodalValuex/NodalValuex.cpp
===================================================================
--- /issm/trunk/src/c/modules/NodalValuex/NodalValuex.cpp	(revision 9206)
+++ /issm/trunk/src/c/modules/NodalValuex/NodalValuex.cpp	(revision 9206)
@@ -0,0 +1,46 @@
+/*!\file NodalValuex
+ * \brief: compute value at certain node
+ */
+
+#include "./NodalValuex.h"
+
+#include "../../shared/shared.h"
+#include "../../include/include.h"
+#include "../../toolkits/toolkits.h"
+#include "../../EnumDefinitions/EnumDefinitions.h"
+
+void NodalValuex( double* pnodalvalue, int natureofdataenum,Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units){
+
+	extern int my_rank;
+	int i;
+	int index;
+	Element* element=NULL;
+	double value;
+	int found;
+	int sumfound;
+	int cpu_found;
+
+	/*retrieve element we are interested in: */
+	parameters->FindParam(&index,IndexEnum);
+
+	/*This is the vertex id for which we want to collect the data. Go through elements, and for each 
+	 *element, figure out  if they hold the vertex, and the data. If so, return it: */
+	for(i=0;i<elements->Size();i++){
+		Element* element=(Element*)elements->GetObjectByOffset(i);
+		found=element->NodalValue(&value,index,natureofdataenum,process_units);
+		if (found){
+			cpu_found=my_rank;
+			break;
+		}
+	}
+
+	/*Broadcast whether we found the element: */
+	MPI_Allreduce ( &found,&sumfound,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
+	if(!sumfound)_error_("%s%i%s%s","could not find element with vertex with id",index," to compute nodal value ",EnumToStringx(natureofdataenum));
+
+	/*Broadcast and plug into response: */
+	MPI_Allreduce ( &cpu_found,&cpu_found,1,MPI_INT,MPI_MAX,MPI_COMM_WORLD);
+	MPI_Bcast(&value,1,MPI_DOUBLE,cpu_found,MPI_COMM_WORLD); 
+
+	*pnodalvalue=value;
+}
Index: /issm/trunk/src/c/modules/NodalValuex/NodalValuex.h
===================================================================
--- /issm/trunk/src/c/modules/NodalValuex/NodalValuex.h	(revision 9206)
+++ /issm/trunk/src/c/modules/NodalValuex/NodalValuex.h	(revision 9206)
@@ -0,0 +1,15 @@
+/*!\file:  NodalValuex.h
+ * \brief header file for NodalValuex
+ */ 
+
+#ifndef _NODALVALUEX_H
+#define _NODALVALUEX_H
+
+#include "../../Container/Container.h"
+#include "../../objects/objects.h"
+
+/* local prototypes: */
+void NodalValuex( double* pnodalvalue, int natureofdataenum,Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
+
+#endif  /* _NODALVALUEX_H */
+
Index: /issm/trunk/src/c/modules/Responsex/Responsex.cpp
===================================================================
--- /issm/trunk/src/c/modules/Responsex/Responsex.cpp	(revision 9205)
+++ /issm/trunk/src/c/modules/Responsex/Responsex.cpp	(revision 9206)
@@ -42,4 +42,5 @@
 		case DragCoefficientAbsGradientEnum:DragCoefficientAbsGradientx(responses, elements,nodes, vertices, loads, materials, parameters,process_units,weight_index); break;
 		case RheologyBbarEnum:RheologyBbarx(responses, elements,nodes, vertices, loads, materials, parameters,process_units); break;
+		case DragCoefficientEnum:NodalValuex(responses, DragCoefficientEnum,elements,nodes, vertices, loads, materials, parameters,process_units); break;
 		default: _error_(" response descriptor \"%s\" not supported yet!",response_descriptor); break;
 	}
Index: /issm/trunk/src/c/modules/modules.h
===================================================================
--- /issm/trunk/src/c/modules/modules.h	(revision 9205)
+++ /issm/trunk/src/c/modules/modules.h	(revision 9206)
@@ -79,4 +79,5 @@
 #include "./ModelProcessorx/ModelProcessorx.h"
 #include "./ParsePetscOptionsx/ParsePetscOptionsx.h"
+#include "./NodalValuex/NodalValuex.h"
 #include "./NodeConnectivityx/NodeConnectivityx.h"
 #include "./NodesDofx/NodesDofx.h"
Index: /issm/trunk/src/c/objects/Elements/Element.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Element.h	(revision 9205)
+++ /issm/trunk/src/c/objects/Elements/Element.h	(revision 9206)
@@ -96,4 +96,5 @@
 		virtual int    UpdatePotentialSheetUngrounding(double* potential_sheet_ungrounding,Vec vec_nodes_on_iceshelf,double* nodes_on_iceshelf)=0;
 		virtual double RheologyBbarx(void)=0;
+		virtual int    NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units)=0;
 
 		/*Implementation: */
Index: /issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 9205)
+++ /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 9206)
@@ -6940,4 +6940,35 @@
 	extern int my_rank;
 	return my_rank; 
+}
+/*}}}*/
+/*FUNCTION Penta::NodalValue {{{1*/
+int    Penta::NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units){
+
+	int i;
+	int found=0;
+	double value;
+	Input* data=NULL;
+	GaussPenta* gauss=NULL;
+
+	/*First, serarch the input: */
+	data=inputs->GetInput(natureofdataenum); 
+
+	/*figure out if we have the vertex id: */
+	found=0;
+	for(i=0;i<NUMVERTICES;i++){
+		if(index==nodes[i]->GetVertexId()){
+			/*Do we have natureofdataenum in our inputs? :*/
+			if(data){
+				/*ok, we are good. retrieve value of input at vertex :*/
+				gauss=new GaussPenta(); gauss->GaussVertex(i);
+				data->GetParameterValue(&value,gauss);
+				found=1;
+				break;
+			}
+		}
+	}
+
+	if(found)*pvalue=value;
+	return found;
 }
 /*}}}*/
Index: /issm/trunk/src/c/objects/Elements/Penta.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.h	(revision 9205)
+++ /issm/trunk/src/c/objects/Elements/Penta.h	(revision 9206)
@@ -146,4 +146,5 @@
 		double RheologyBbarx(void);
 		void   ViscousHeatingCreateInput(void);
+		int    NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units);
 		/*}}}*/
 		/*Penta specific routines:{{{1*/
Index: /issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 9205)
+++ /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 9206)
@@ -4525,4 +4525,35 @@
 }
 /*}}}*/
+/*FUNCTION Tria::NodalValue {{{1*/
+int    Tria::NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units){
+
+	int i;
+	int found=0;
+	double value;
+	Input* data=NULL;
+	GaussTria *gauss                            = NULL;
+
+	/*First, serarch the input: */
+	data=inputs->GetInput(natureofdataenum); 
+
+	/*figure out if we have the vertex id: */
+	found=0;
+	for(i=0;i<NUMVERTICES;i++){
+		if(index==nodes[i]->GetVertexId()){
+			/*Do we have natureofdataenum in our inputs? :*/
+			if(data){
+				/*ok, we are good. retrieve value of input at vertex :*/
+				gauss=new GaussTria(); gauss->GaussVertex(i);
+				data->GetParameterValue(&value,gauss);
+				found=1;
+				break;
+			}
+		}
+	}
+
+	if(found)*pvalue=value;
+	return found;
+}
+/*}}}*/
 /*FUNCTION Tria::PatchFill{{{1*/
 void  Tria::PatchFill(int* prow, Patch* patch){
Index: /issm/trunk/src/c/objects/Elements/Tria.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.h	(revision 9205)
+++ /issm/trunk/src/c/objects/Elements/Tria.h	(revision 9206)
@@ -148,4 +148,5 @@
 		int*   GetHorizontalNeighboorSids(void);
 		double RheologyBbarx(void);
+		int    NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units);
 		/*}}}*/
 		/*Tria specific routines:{{{1*/
