Index: /issm/trunk/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp
===================================================================
--- /issm/trunk/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp	(revision 10570)
+++ /issm/trunk/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp	(revision 10571)
@@ -12,8 +12,10 @@
 void  InputUpdateFromDakotax(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials*  materials,Parameters* parameters,double* variables,char* *variables_descriptors,int numvariables){
 
-	int     i,j,k;
+	int     i,j,k,l;
 	int     dummy;
 	
 	int     numberofvertices;
+	int     nrows;
+	int     ncols;
 	int     npart;
 	double *qmu_part  = NULL;
@@ -53,17 +55,27 @@
 
 			/*Now, pick up the parameter corresponding to root: */
-			parameters->FindParam(&parameter,NULL,StringToEnumx(root));
+			parameters->FindParam(&parameter,&nrows,&ncols,StringToEnumx(root));
 
-			/*We've got the parameter, we need to update it using qmu_part (a partitioning vector), and the distributed_values: */
+			/*We've got the parameter, we need to update it using qmu_part (a partitioning vector), 
+			 * and the distributed_values. Two cases: we either have a nrows=numberofvertices, in 
+			 * which case our parameter is a vector, or nrows=numberofvertices+1, in which case, 
+			 * our parameter is a transient vector. Deal with both cases accordingly: */
 			for(k=0;k<numberofvertices;k++){
-				parameter[k]=parameter[k]*distributed_values[(int)qmu_part[k]];
+				for(l=0;l<ncols;l++){
+					*(parameter+ncols*k+l)=*(parameter+ncols*k+l)*distributed_values[(int)qmu_part[k]];
+				}
 			}
 
 			#ifdef _DEBUG_
-				PetscSynchronizedPrintf(MPI_COMM_WORLD,"Parameter vector:");
+				PetscSynchronizedPrintf(MPI_COMM_WORLD,"Parameter matrix:");
 				PetscSynchronizedFlush(MPI_COMM_WORLD);
-				for(k=0;k<numberofvertices;k++){
-					PetscSynchronizedPrintf(MPI_COMM_WORLD," node %i value %g\n",k+1,parameter[k]);
+				for(l=0;l<ncols;l++){
+					PetscSynchronizedPrintf(MPI_COMM_WORLD," time %i\n",l);
 					PetscSynchronizedFlush(MPI_COMM_WORLD);
+
+					for(k=0;k<numberofvertices;k++){
+						PetscSynchronizedPrintf(MPI_COMM_WORLD," node %i value %g\n",k+1,*(parameter+k*ncols+l));
+						PetscSynchronizedFlush(MPI_COMM_WORLD);
+					}
 				}
 				PetscSynchronizedPrintf(MPI_COMM_WORLD," descriptor: %s root %s enum: %i\n",descriptor,root,StringToEnumx(root));
@@ -72,6 +84,6 @@
 			  
 
-			/*Update inputs using the parameter vector: */
-			InputUpdateFromVectorDakotax( elements,nodes, vertices,loads, materials,  parameters, parameter, StringToEnumx(root), VertexEnum);
+			/*Update inputs using the parameter matrix: */
+			InputUpdateFromMatrixDakotax( elements,nodes, vertices,loads, materials,  parameters, parameter, nrows,ncols,StringToEnumx(root), VertexEnum);
 
 			/*increment i to skip the distributed values just collected: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp	(revision 10570)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp	(revision 10571)
@@ -56,4 +56,6 @@
 	int      numberofresponses;
 	int      numberofvertices;
+	int      nrows;
+	int      ncols;
 
 	/*}}}*/
@@ -123,11 +125,11 @@
 				
 				/*Recover data: */
-				iomodel->FetchData(&dakota_parameter,NULL,NULL,StringToEnumx(tag));
+				iomodel->FetchData(&dakota_parameter,&nrows,&ncols,StringToEnumx(tag));
 
 				/*Convert units: */
-				UnitConversion(dakota_parameter,numberofvertices,ExtToIuEnum,StringToEnumx(tag));
+				UnitConversion(dakota_parameter,nrows*ncols,ExtToIuEnum,StringToEnumx(tag));
 
 				/*Add to parameters: */
-				parameters->AddObject(new DoubleVecParam(StringToEnumx(tag),dakota_parameter,numberofvertices));
+				parameters->AddObject(new DoubleMatParam(StringToEnumx(tag),dakota_parameter,nrows,ncols));
 				
 				/*Free ressources:*/
Index: /issm/trunk/src/c/objects/Elements/Penta.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.h	(revision 10570)
+++ /issm/trunk/src/c/objects/Elements/Penta.h	(revision 10571)
@@ -74,4 +74,5 @@
 		void  InputUpdateFromVectorDakota(double* vector, int name, int type);
 		void  InputUpdateFromVectorDakota(int* vector, int name, int type);
+		void  InputUpdateFromMatrixDakota(double* matrix, int nows, int ncols, int name, int type);
 		#endif
 		void  InputUpdateFromIoModel(int index, IoModel* iomodel);
Index: /issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 10570)
+++ /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 10571)
@@ -4980,4 +4980,43 @@
 }
 /*}}}*/
+/*FUNCTION Tria::InputUpdateFromVectorMatrix(double* matrix, int nrows, int ncols, int name, int type);{{{1*/
+void  Tria::InputUpdateFromVectorMatrix(double* matrix, int nrows, int ncols, int name, int type){
+	
+	int i,j,t;
+
+	/*Check that name is an element input*/
+	if (!IsInput(name)) return;
+
+	switch(type){
+
+		case VertexEnum:
+			
+			double values[3];
+			double time;
+
+			/*Ok, create transient input: */
+			for(t=0;t<ncols;t++){ //ncols is the number of times
+
+				/*create input values: */
+				for(i=0;i<3;i++){
+					row=this->nodes[i]->GetSidList();
+					values[i]=(double)matrix[ncols*row+t];
+				}
+
+				/*time? :*/
+				time=(double)matrix[(nrows-1)*ncols+t]*yts;
+
+				if(t==0) transientinput=new TransientInput(vector_enum);
+				transientinput->AddTimeInput(new TriaVertexInput(vector_enum,nodeinputs),time);
+			}
+			this->inputs->AddInput(transientinput);
+			break;
+
+		default:
+			_error_("type %i (%s) not implemented yet",type,EnumToStringx(type));
+	}
+
+}
+/*}}}*/
 #endif
 
Index: /issm/trunk/src/c/objects/Elements/Tria.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.h	(revision 10570)
+++ /issm/trunk/src/c/objects/Elements/Tria.h	(revision 10571)
@@ -66,6 +66,8 @@
 		#ifdef _HAVE_DAKOTA_
 		void  InputUpdateFromVectorDakota(double* vector, int name, int type);
+		void  InputUpdateFromVectorDakota(double* vector, int name, int type);
 		void  InputUpdateFromVectorDakota(int* vector, int name, int type);
 		void  InputUpdateFromVectorDakota(bool* vector, int name, int type);
+		void  InputUpdateFromMatrixDakota(double* matrix, int nows, int ncols, int name, int type);
 		#endif
 		void  InputUpdateFromConstant(double constant, int name);
