Index: /issm/trunk-jpl/src/c/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/c/Makefile.am	(revision 14649)
+++ /issm/trunk-jpl/src/c/Makefile.am	(revision 14650)
@@ -500,5 +500,7 @@
 			   ./modules/ModelProcessorx/Gia/CreateNodesGia.cpp \
 			   ./modules/ModelProcessorx/Gia/CreateConstraintsGia.cpp\
-			   ./modules/ModelProcessorx/Gia/CreateLoadsGia.cpp
+			   ./modules/ModelProcessorx/Gia/CreateLoadsGia.cpp\
+			   ./modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp\
+			   ./modules/GiaDeflectionCorex/GiaDeflectionCorex.h
 
 #}}}
Index: /issm/trunk-jpl/src/c/classes/FemModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 14649)
+++ /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 14650)
@@ -1552,7 +1552,7 @@
 	for (i=0;i<elements->Size();i++){
 		element=dynamic_cast<Element*>(elements->GetObjectByOffset(i));
-		element->Deflection(wg,x,y);
-	}
-}
-/*}}}*/
-#endif
+		element->GiaDeflection(wg,x,y);
+	}
+}
+/*}}}*/
+#endif
Index: /issm/trunk-jpl/src/c/classes/objects/Elements/Element.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/objects/Elements/Element.h	(revision 14649)
+++ /issm/trunk-jpl/src/c/classes/objects/Elements/Element.h	(revision 14650)
@@ -101,5 +101,5 @@
 
 		#ifdef _HAVE_GIA_
-		virtual void   Deflection(Vector<IssmDouble>* wg,IssmDouble* x,IssmDouble* y)=0;
+		virtual void   GiaDeflection(Vector<IssmDouble>* wg,IssmDouble* x,IssmDouble* y)=0;
 		#endif
 
Index: /issm/trunk-jpl/src/c/classes/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/objects/Elements/Penta.cpp	(revision 14649)
+++ /issm/trunk-jpl/src/c/classes/objects/Elements/Penta.cpp	(revision 14650)
@@ -3486,6 +3486,6 @@
 
 #ifdef _HAVE_GIA_
-/*FUNCTION Penta::Deflection {{{*/
-void Penta::Deflection(Vector<IssmDouble>* wg,IssmDouble* x, IssmDouble* y){
+/*FUNCTION Penta::GiaDeflection {{{*/
+void Penta::GiaDeflection(Vector<IssmDouble>* wg,IssmDouble* x, IssmDouble* y){
 	_error_("GIA deflection not implemented yet!");
 }
Index: /issm/trunk-jpl/src/c/classes/objects/Elements/Penta.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/objects/Elements/Penta.h	(revision 14649)
+++ /issm/trunk-jpl/src/c/classes/objects/Elements/Penta.h	(revision 14650)
@@ -143,5 +143,5 @@
 
 		#ifdef _HAVE_GIA_
-		void   Deflection(Vector<IssmDouble>* wg,IssmDouble* x,IssmDouble* y);
+		void   GiaDeflection(Vector<IssmDouble>* wg,IssmDouble* x,IssmDouble* y);
 		#endif
 
Index: /issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp	(revision 14649)
+++ /issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp	(revision 14650)
@@ -17,4 +17,7 @@
 #include "../../../Container/Container.h"
 #include "../../../include/include.h"
+#ifdef _HAVE_GIA_
+#include "../../../modules/GiaDeflectionCorex/GiaDeflectionCorex.h"
+#endif
 /*}}}*/
 
@@ -3040,6 +3043,6 @@
 
 #ifdef _HAVE_GIA_
-/*FUNCTION Tria::Deflection {{{*/
-void Tria::Deflection(Vector<IssmDouble>* wg,IssmDouble* x, IssmDouble* y){
+/*FUNCTION Tria::GiaDeflection {{{*/
+void Tria::GiaDeflection(Vector<IssmDouble>* wg,IssmDouble* x, IssmDouble* y){
 
 	int i;
@@ -3048,14 +3051,26 @@
 	IssmDouble x0,y0;
 	IssmDouble xyz_list[NUMVERTICES][3];
-	IssmDouble he;
+
+	/*thickness averages: */
+	IssmDouble* hes=NULL;
+	IssmDouble* times=NULL;
+	IssmDouble  currenttime;
+	int         numtimes;
+
+	/*output: */
+	IssmDouble  wi;
 
 	/*how many dofs are we working with here? */
-	gsize=this->nodes[0]->indexing.gsize;
-
-	/*pull thickness average and area: */
+	this->parameters->FindParam(&gsize,MeshNumberofverticesEnum);
+	
+	/*what time is it? :*/
+	this->parameters->FindParam(&currenttime,TimeEnum);
+
+	/*pull thickness averages: */
 	Input* thickness_input=inputs->GetInput(ThicknessEnum); 
 	if (!thickness_input)_error_("thickness input needed to compute gia deflection!");
-	thickness_input->GetInputAverage(&he);
+	thickness_input->GetInputAllTimeAverages(&hes,&times,&numtimes);
 	
+	/*pull area of this Tria: */
 	area=this->GetArea();
 
@@ -3069,7 +3084,18 @@
 
 	for(i=0;i<gsize;i++){
+		/*compute distance from the center of the tria to the vertex i: */
 		xi=x[i]; yi=y[i];
 		ri=sqrt(pow(xi-x0,2)+pow(yi-y0,2));
-	}
+
+		/*for this Tria, compute contribution to rebound at vertex i: */
+		GiaDeflectionCorex(&wi,ri,re,hes,times,currenttime,numtimes);
+
+		/*plug value into solution vector: */
+		wg->SetValue(i,wi,ADD_VAL);
+	}
+
+	/*Free ressources: */
+	xDelete<IssmDouble>(hes);
+	xDelete<IssmDouble>(times);
 
 	return;
Index: /issm/trunk-jpl/src/c/classes/objects/Elements/Tria.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/objects/Elements/Tria.h	(revision 14649)
+++ /issm/trunk-jpl/src/c/classes/objects/Elements/Tria.h	(revision 14650)
@@ -141,5 +141,5 @@
 
 		#ifdef _HAVE_GIA_
-		void   Deflection(Vector<IssmDouble>* wg,IssmDouble* x,IssmDouble* y);
+		void   GiaDeflection(Vector<IssmDouble>* wg,IssmDouble* x,IssmDouble* y);
 		#endif
 
Index: /issm/trunk-jpl/src/c/classes/objects/Inputs/TransientInput.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/objects/Inputs/TransientInput.cpp	(revision 14649)
+++ /issm/trunk-jpl/src/c/classes/objects/Inputs/TransientInput.cpp	(revision 14650)
@@ -250,6 +250,21 @@
 void TransientInput::GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){
 
-	_error_("not implemented yet!");
-
+	int i;
+	IssmDouble* times=NULL;
+	IssmDouble* values=NULL;
+
+	/*allocate: */
+	times=xNew<IssmDouble>(this->numtimesteps);
+	values=xNew<IssmDouble>(this->numtimesteps);
+
+	for(i=0;i<numtimesteps;i++){
+		Input* input=(Input*)this->inputs->GetObjectByOffset(i);
+		input->GetInputAverage(values+i);
+		times[i]=this->timesteps[i];
+	}
+
+	*pvalues=values;
+	*ptimes=times;
+	*pnumtimes=numtimesteps;
 }
 /*}}}*/
Index: /issm/trunk-jpl/src/c/classes/objects/Inputs/TriaP1Input.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/objects/Inputs/TriaP1Input.cpp	(revision 14649)
+++ /issm/trunk-jpl/src/c/classes/objects/Inputs/TriaP1Input.cpp	(revision 14650)
@@ -181,4 +181,25 @@
 }
 /*}}}*/
+/*FUNCTION TriaP1Input::GetInputAllTimeAverages{{{*/
+void TriaP1Input::GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){
+
+	IssmDouble* outvalues=NULL;
+	IssmDouble* times=NULL;
+	IssmDouble  numtimes;
+
+	/*this is not a transient forcing, so we only have 1 value, steady state: */
+	numtimes=1;
+	outvalues=xNew<IssmDouble>(1);
+	times=xNew<IssmDouble>(1);
+	
+	outvalues[0]=1./3.*(values[0]+values[1]+values[2]);
+	times[0]=0; /*we don't have a time*/
+
+	*pvalues=outvalues;
+	*ptimes=times;
+	*pnumtimes=numtimes;
+}
+/*}}}*/
+
 
 /*Intermediary*/
Index: /issm/trunk-jpl/src/c/classes/objects/Inputs/TriaP1Input.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/objects/Inputs/TriaP1Input.h	(revision 14649)
+++ /issm/trunk-jpl/src/c/classes/objects/Inputs/TriaP1Input.h	(revision 14650)
@@ -55,5 +55,5 @@
 		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
 		void GetInputAverage(IssmDouble* pvalue);
-		void GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes){_error_("not implemented yet");};
+		void GetInputAllTimeAverages(IssmDouble** pvalues,IssmDouble** ptimes, int* pnumtimes);
 		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss);
 		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss);
Index: /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/CMakeLists.txt
===================================================================
--- /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/CMakeLists.txt	(revision 14650)
+++ /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/CMakeLists.txt	(revision 14650)
@@ -0,0 +1,8 @@
+# Subdirectories {{{
+# }}}
+# Include Directory {{{
+include_directories(AFTER $ENV{ISSM_DIR}/src/c/modules/SurfaceAreax)
+# }}}
+# CORE_SOURCES {{{
+set(CORE_SOURCES $ENV{ISSM_DIR}/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp PARENT_SCOPE)
+# }}}
Index: /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp	(revision 14650)
+++ /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp	(revision 14650)
@@ -0,0 +1,22 @@
+/*!\file GiaDeflectionCorex
+ * \brief: GIA solution from Erik Ivins. 
+ * Compute deflection wi from a single disk of radius re, load history hes for 
+ * numtimes time steps. 
+ */
+
+#include "./GiaDeflectionCorex.h"
+
+#include "../../shared/shared.h"
+#include "../../include/include.h"
+#include "../../toolkits/toolkits.h"
+#include "../../EnumDefinitions/EnumDefinitions.h"
+#include "../InputUpdateFromConstantx/InputUpdateFromConstantx.h"
+
+void GiaDeflectionCorex( IssmDouble* pwi, IssmDouble ri, IssmDouble re, IssmDouble* hes, IssmDouble* times, IssmDouble currentime,int numtimes){
+
+	/*output: */
+	IssmDouble wi=1;
+
+	/*allocate output pointer: */
+	*pwi=wi;
+}
Index: /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.h
===================================================================
--- /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.h	(revision 14650)
+++ /issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.h	(revision 14650)
@@ -0,0 +1,14 @@
+/*!\file:  GiaDeflectionCorex.h
+ * \brief header file for ...
+ */ 
+
+#ifndef _GIADEFLECTIONCOREX_H
+#define _GIADEFLECTIONCOREX_H
+
+#include "../../classes/objects/objects.h"
+#include "../../Container/Container.h"
+
+/* local prototypes: */
+void GiaDeflectionCorex( IssmDouble* pwi, IssmDouble ri, IssmDouble re, IssmDouble* hes, IssmDouble* times, IssmDouble currentime,int numtimes);
+
+#endif  /* _GIADEFLECTIONCOREX_H */
Index: /issm/trunk-jpl/src/c/modules/ModelProcessorx/Gia/UpdateElementsGia.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/ModelProcessorx/Gia/UpdateElementsGia.cpp	(revision 14649)
+++ /issm/trunk-jpl/src/c/modules/ModelProcessorx/Gia/UpdateElementsGia.cpp	(revision 14650)
@@ -34,6 +34,5 @@
 	}
 
-	iomodel->FetchDataToInput(elements,SurfaceEnum);
-	iomodel->FetchDataToInput(elements,BedEnum);
+	iomodel->FetchDataToInput(elements,ThicknessEnum);
 
 	/*Free data: */
Index: /issm/trunk-jpl/src/c/modules/modules.h
===================================================================
--- /issm/trunk-jpl/src/c/modules/modules.h	(revision 14649)
+++ /issm/trunk-jpl/src/c/modules/modules.h	(revision 14650)
@@ -30,4 +30,5 @@
 #include "./GetVectorFromInputsx/GetVectorFromInputsx.h"
 #include "./GetVectorFromControlInputsx/GetVectorFromControlInputsx.h"
+#include "./GiaDeflectionCorex/GiaDeflectionCorex.h"
 #include "./SetControlInputsFromVectorx/SetControlInputsFromVectorx.h"
 #include "./Gradjx/Gradjx.h"
Index: /issm/trunk-jpl/src/c/solutions/gia_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/gia_core.cpp	(revision 14649)
+++ /issm/trunk-jpl/src/c/solutions/gia_core.cpp	(revision 14650)
@@ -41,5 +41,8 @@
 	/*call the main module: */
 	femmodel->Deflection(wg,x,y);
-	
+
+	/*assemble vector: */
+	wg->Assemble();
+
 	InputUpdateFromSolutionx( femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,wg); 
 
Index: /issm/trunk-jpl/test/NightlyRun/test330.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test330.m	(revision 14649)
+++ /issm/trunk-jpl/test/NightlyRun/test330.m	(revision 14650)
@@ -5,4 +5,5 @@
 md=setflowequation(md,'macayeal','all');
 md.cluster=generic('name',oshostname(),'np',3);
+%md.verbose=verbose('convergence',true,'solution',true,'module',true,'solver',true,'mprocessor',true);
 md=solve(md,GiaSolutionEnum());
 
