Index: /issm/trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp	(revision 25259)
+++ /issm/trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp	(revision 25260)
@@ -17,8 +17,4 @@
 	int     i,j,k,l;
 
-	int     numberofvertices;
-	int     numberofelements;
-	int     nrows;
-	int     ncols;
 	IssmDouble **variable_partitions         = NULL;
 	IssmDouble * variable_partition         = NULL;
@@ -42,6 +38,4 @@
 	femmodel->parameters->FindParam(&variable_partitions_nt,NULL,NULL,QmuVariablePartitionsNtEnum); 
 	
-	numberofvertices=femmodel->vertices->NumberOfVertices();
-	numberofelements=femmodel->elements->NumberOfElements();
 
 	/*Go through all dakota descriptors, ex: "rho_ice","thermal_conductivity","thickness1","thickness2", etc ..., and 
@@ -60,5 +54,4 @@
 		if (strncmp(descriptor,"scaled_",7)==0){ 
 			/*we are skipping these for now.*/
-			variable_partition=variable_partitions[variablecount];
 			npart=variable_partitions_npart[variablecount];
 			nt=variable_partitions_nt[variablecount];
@@ -75,5 +68,4 @@
 		
 		else if (strncmp(descriptor,"distributed_",12)==0){
-		
 			if (VerboseQmu())_printf0_("   updating variable " << descriptor << "\n");
 			
@@ -119,5 +111,4 @@
 		descriptor=variables_descriptors[i];
 	
-
 		/*From descriptor, figure out if the variable is scaled, indexed, distributed or just a simple variable: */
 		if (strncmp(descriptor,"scaled_",7)==0){
@@ -140,85 +131,6 @@
 			}
 
-			
-			int inputscaling=1;
-			if(!inputscaling){
-				/*Scale variable outside of the inputs:{{{*/
-
-				/*Now, pick up the parameter corresponding to root: */   
-				femmodel->parameters->FindParamInDataset(&parameter,&nrows,&ncols,QmuVariableDescriptorsEnum,StringToEnumx(root));
-
-				/*We've got the parameter, we need to update it using the partition vector, and the distributed_values. 
-				 In addition, the parameter can be either a static or transient (nrows+1) vector. Finally, the partition vectors can include
-				 -1 (meaning, don't update). */
-				
-				//_printf_("nrows: " << nrows << " numberofvertices: " << numberofvertices << " numberofelements: " << numberofelements << "\n");
-
-				if(ncols!=nt){
-					/*we are trying to update a col sized transient input by scaling with a matrix of col size nt. This can only work if nt==1, otherwise, error out: */
-					if (nt!=1) _error_("InputUpdateFromDakotax error message: transient input being updated should be the same col size as the number of time step in the qmu variable specificationi");
-				}
-
-				if(nt==1){
-					/*scale all the columns by the same vector:*/
-					if (nrows==numberofvertices || nrows==(numberofvertices+1)){
-						for(k=0;k<numberofvertices;k++){
-							if (variable_partition[k]==-1)continue;
-							else{
-								for(l=0;l<ncols;l++){
-									*(parameter+ncols*k+l)=*(parameter+ncols*k+l)*distributed_values[(int)variable_partition[k]];
-								}
-							}
-						}
-					}
-					else if (nrows==numberofelements || nrows==(numberofelements+1)){
-						for(k=0;k<numberofelements;k++){
-							if (variable_partition[k]==-1)continue;
-							else{
-								for(l=0;l<ncols;l++){
-									*(parameter+ncols*k+l)=*(parameter+ncols*k+l)*distributed_values[(int)variable_partition[k]];
-								}
-							}
-						}
-
-					}
-					else _error_("partitioning vector should be either elements or vertex sized!");
-
-				}
-				else{
-					/*scale all the columns by the scalar matrix:*/
-					if (nrows==numberofvertices || nrows==(numberofvertices+1)){
-						for(k=0;k<numberofvertices;k++){
-							if (variable_partition[k]==-1)continue;
-							else{
-								for(l=0;l<ncols;l++){
-									*(parameter+ncols*k+l)=*(parameter+ncols*k+l)*distributed_values[(int)variable_partition[k]*nt+l];
-								}
-							}
-						}
-					}
-					else if (nrows==numberofelements || nrows==(numberofelements+1)){
-						for(k=0;k<numberofelements;k++){
-							if (variable_partition[k]==-1)continue;
-							else{
-								for(l=0;l<ncols;l++){
-									*(parameter+ncols*k+l)=*(parameter+ncols*k+l)*distributed_values[(int)variable_partition[k]*nt+l];
-								}
-							}
-						}
-
-					}
-					else _error_("partitioning vector should be either elements or vertex sized!");
-				}
-
-				/*Update inputs using the parameter matrix: */
-				if(nrows==numberofvertices || (nrows==numberofvertices+1))
-					InputUpdateFromMatrixDakotax(femmodel, parameter, nrows,ncols,StringToEnumx(root), VertexEnum);
-				else
-					InputUpdateFromMatrixDakotax(femmodel, parameter, nrows,ncols,StringToEnumx(root), ElementEnum); /*}}}*/
-			}
-			else{
-				/*Scale variable inside the inputs:*/
-				InputScaleFromDakotax(femmodel, distributed_values, variable_partition,npart, nt, StringToEnumx(root));
-			}
+			/*Scale variable inside the inputs:*/
+			InputScaleFromDakotax(femmodel, distributed_values, variable_partition,npart, nt, StringToEnumx(root));
 
 			/*increment i to skip the distributed values just collected: */
