Index: /issm/trunk-jpl/src/c/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/c/Makefile.am	(revision 11655)
+++ /issm/trunk-jpl/src/c/Makefile.am	(revision 11656)
@@ -204,5 +204,4 @@
 					./shared/Elements/GetGlobalDofList.cpp\
 					./shared/Elements/GetNumberOfDofs.cpp\
-					./shared/Elements/CoordinateSystemTransform.cpp\
 					./shared/String/sharedstring.h\
 					./toolkits/petsc\
@@ -502,4 +501,5 @@
 					      ./modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp \
 					      ./modules/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp \
+							./shared/Elements/CoordinateSystemTransform.cpp\
 							./shared/Elements/TransformLoadVectorCoord.cpp \
 							./shared/Elements/TransformStiffnessMatrixCoord.cpp \
Index: /issm/trunk-jpl/src/c/objects/Elements/Element.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Elements/Element.h	(revision 11655)
+++ /issm/trunk-jpl/src/c/objects/Elements/Element.h	(revision 11656)
@@ -58,4 +58,5 @@
 		virtual void   RequestedOutput(int output_enum,int step,double time)=0;
 		
+		virtual int    NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units)=0;
 		virtual void   InputScale(int enum_type,double scale_factor)=0;
 		virtual void   GetVectorFromInputs(Vec vector, int name_enum)=0;
@@ -88,5 +89,4 @@
 		virtual void   ElementResponse(double* presponse,int response_enum,bool process_units)=0;
 		virtual double IceVolume(void)=0;
-		virtual int    NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units)=0;
 		#endif
 
Index: /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 11655)
+++ /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 11656)
@@ -2325,4 +2325,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->GetInputValue(&value,gauss);
+				found=1;
+				break;
+			}
+		}
+	}
+
+	if(found)*pvalue=value;
+	return found;
 }
 /*}}}*/
@@ -3002,35 +3033,4 @@
 }
 /*}}}*/
-/*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->GetInputValue(&value,gauss);
-				found=1;
-				break;
-			}
-		}
-	}
-
-	if(found)*pvalue=value;
-	return found;
-}
-/*}}}*/
 /*FUNCTION Penta::MinVel{{{1*/
 void  Penta::MinVel(double* pminvel, bool process_units){
Index: /issm/trunk-jpl/src/c/objects/Elements/Penta.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Elements/Penta.h	(revision 11655)
+++ /issm/trunk-jpl/src/c/objects/Elements/Penta.h	(revision 11656)
@@ -118,4 +118,5 @@
 		void   Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type);
 		int    UpdatePotentialSheetUngrounding(double* potential_sheet_ungrounding,Vec vec_nodes_on_iceshelf,double* nodes_on_iceshelf);
+		int    NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units);
 		double TimeAdapt();
 		int*   GetHorizontalNeighboorSids(void);
@@ -129,5 +130,4 @@
 		void   MinVy(double* pminvy, bool process_units);
 		void   MinVz(double* pminvz, bool process_units);
-		int    NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units);
 		double MassFlux(double* segment,bool process_units);
 		void   MaxAbsVx(double* pmaxabsvx, bool process_units);
Index: /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 11655)
+++ /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 11656)
@@ -2123,4 +2123,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->GetInputValue(&value,gauss);
+				found=1;
+				break;
+			}
+		}
+	}
+
+	if(found)*pvalue=value;
+	return found;
+}
+/*}}}*/
 /*FUNCTION Tria::PatchFill{{{1*/
 void  Tria::PatchFill(int* prow, Patch* patch){
@@ -2737,35 +2768,4 @@
 	/*Assign output pointers:*/
 	*pminvz=minvz;
-}
-/*}}}*/
-/*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->GetInputValue(&value,gauss);
-				found=1;
-				break;
-			}
-		}
-	}
-
-	if(found)*pvalue=value;
-	return found;
 }
 /*}}}*/
Index: /issm/trunk-jpl/src/c/objects/Elements/Tria.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Elements/Tria.h	(revision 11655)
+++ /issm/trunk-jpl/src/c/objects/Elements/Tria.h	(revision 11656)
@@ -106,4 +106,5 @@
 		void   MaterialUpdateFromTemperature(void){_error_("not implemented yet");};
 		void   MigrateGroundingLine(double* oldfloating,double* sheet_ungrounding);
+		int    NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units);
 		void   PotentialSheetUngrounding(Vec potential_sheet_ungrounding);
 		void   PositiveDegreeDay(void);
@@ -127,5 +128,4 @@
 		void   MinVy(double* pminvy, bool process_units);
 		void   MinVz(double* pminvz, bool process_units);
-		int    NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units);
 		double MassFlux(double* segment,bool process_units);
 		void   MaxAbsVx(double* pmaxabsvx, bool process_units);
Index: /issm/trunk-jpl/src/c/objects/Loads/Pengrid.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Loads/Pengrid.cpp	(revision 11655)
+++ /issm/trunk-jpl/src/c/objects/Loads/Pengrid.cpp	(revision 11656)
@@ -319,7 +319,10 @@
 
 	switch(analysis_type){
+		#ifdef _HAVE_DIAGNOSTIC_
 		case DiagnosticHorizAnalysisEnum: case AdjointHorizAnalysisEnum:
 			Ke=PenaltyCreateKMatrixDiagnosticStokes(kmax);
 			break;
+		#endif
+		#ifdef _HAVE_THERMAL_
 		case ThermalAnalysisEnum:
 			Ke=PenaltyCreateKMatrixThermal(kmax);
@@ -328,4 +331,5 @@
 			Ke=PenaltyCreateKMatrixMelting(kmax);
 			break;
+		#endif
 		default:
 			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
@@ -348,7 +352,10 @@
 
 	switch(analysis_type){
+		#ifdef _HAVE_DIAGNOSTIC_
 		case ThermalAnalysisEnum:
 			pe=PenaltyCreatePVectorThermal(kmax);
 			break;
+		#endif
+		#ifdef _HAVE_THERMAL_
 		case MeltingAnalysisEnum:
 			pe=PenaltyCreatePVectorMelting(kmax);
@@ -356,4 +363,5 @@
 		case DiagnosticHorizAnalysisEnum: case AdjointHorizAnalysisEnum:
 			break;
+		#endif
 		default:
 			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
@@ -539,4 +547,5 @@
 }
 /*}}}1*/
+#ifdef _HAVE_DIAGNOSTIC_
 /*FUNCTION Pengrid::PenaltyCreateKMatrixDiagnosticStokes {{{1*/
 ElementMatrix* Pengrid::PenaltyCreateKMatrixDiagnosticStokes(double kmax){
@@ -571,4 +580,6 @@
 }
 /*}}}1*/
+#endif
+#ifdef _HAVE_THERMAL_
 /*FUNCTION Pengrid::PenaltyCreateKMatrixMelting {{{1*/
 ElementMatrix* Pengrid::PenaltyCreateKMatrixMelting(double kmax){
@@ -690,4 +701,5 @@
 }
 /*}}}1*/
+#endif
 /*FUNCTION Pengrid::ResetConstraint {{{1*/
 void  Pengrid::ResetConstraint(void){
Index: /issm/trunk-jpl/src/c/objects/Loads/Pengrid.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Loads/Pengrid.h	(revision 11655)
+++ /issm/trunk-jpl/src/c/objects/Loads/Pengrid.h	(revision 11656)
@@ -84,9 +84,13 @@
 		/*}}}*/
 		/*Pengrid management {{{1*/
+		#ifdef _HAVE_DIAGNOSTIC_
 		ElementMatrix* PenaltyCreateKMatrixDiagnosticStokes(double kmax);
+		#endif
+		#ifdef _HAVE_THERMAL_
 		ElementMatrix* PenaltyCreateKMatrixThermal(double kmax);
 		ElementMatrix* PenaltyCreateKMatrixMelting(double kmax);
 		ElementVector* PenaltyCreatePVectorThermal(double kmax);
 		ElementVector* PenaltyCreatePVectorMelting(double kmax);
+		#endif
 		void  ConstraintActivate(int* punstable);
 		void  ConstraintActivateThermal(int* punstable);
Index: /issm/trunk-jpl/src/c/shared/Elements/elements.h
===================================================================
--- /issm/trunk-jpl/src/c/shared/Elements/elements.h	(revision 11655)
+++ /issm/trunk-jpl/src/c/shared/Elements/elements.h	(revision 11656)
@@ -17,6 +17,6 @@
 int*   GetLocalDofList( Node** nodes,int numnodes,int setenum,int approximation_enum);
 int*   GetGlobalDofList(Node** nodes,int numnodes,int setenum,int approximation_enum);
+#ifdef _HAVE_DIAGNOSTIC_
 void   CoordinateSystemTransform(double** ptransform,Node** nodes,int numnodes,int* cs_array);
-#ifdef _HAVE_DIAGNOSTIC_
 void   TransformInvStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int cs_enum);
 void   TransformInvStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int* cs_array);
