Index: /issm/trunk/src/c/objects/Input.cpp
===================================================================
--- /issm/trunk/src/c/objects/Input.cpp	(revision 364)
+++ /issm/trunk/src/c/objects/Input.cpp	(revision 365)
@@ -220,2 +220,49 @@
 	throw ErrorException(__FUNCT__,"not supported yet!");
 }
+
+#undef __FUNCT__
+#define __FUNCT__ "Input::Get"
+Vec   Input::Get(int* in_dofs, int in_numdofs){
+
+	int i,j;
+	int index;
+	double value;
+	extern int my_rank;
+	int count=0;
+	int i0,i1;
+
+	/*output: */
+	Vec outvector=NULL;
+	int totaldofs=0;
+
+	if (type!=DOUBLEVEC)throw ErrorException(__FUNCT__," trying to recover Petsc vector on non DOUBLEVEC entity!");
+
+	/*figure out how many dofs are requested: */
+	totaldofs=0;
+	for(i=0;i<in_numdofs;i++)totaldofs+=in_dofs[i];
+	
+	/*Allocate outvector: */
+	outvector=NewVec(totaldofs*numberofnodes);
+
+	i0=MPI_Lowerrow(numberofnodes);
+	i1=MPI_Upperrow(numberofnodes);
+
+	for(i=i0;i<i1;i++){
+		count=0;
+		for(j=0;j<in_numdofs;j++){
+			if (in_dofs[j]){
+				index=i*totaldofs+count;
+				value=vector[i*ndof+j];
+				VecSetValues(outvector,1,&index,&value,INSERT_VALUES);
+				count++;
+			}
+		}
+	}
+
+	/*Assmeble: */
+	VecAssemblyBegin(outvector);
+	VecAssemblyEnd(outvector);
+
+
+	return outvector;
+}
Index: /issm/trunk/src/c/objects/Input.h
===================================================================
--- /issm/trunk/src/c/objects/Input.h	(revision 364)
+++ /issm/trunk/src/c/objects/Input.h	(revision 365)
@@ -57,4 +57,7 @@
 		void  Recover(double* pdouble);
 
+		/*get into workspace: */
+		Vec   Get(int* dofs, int numdofs);
+
 };
 
Index: /issm/trunk/src/c/objects/ParameterInputs.cpp
===================================================================
--- /issm/trunk/src/c/objects/ParameterInputs.cpp	(revision 364)
+++ /issm/trunk/src/c/objects/ParameterInputs.cpp	(revision 365)
@@ -240,2 +240,32 @@
 	return 1;
 }
+		
+#undef __FUNCT__
+#define __FUNCT__ "ParameterInputs::Get"
+Vec ParameterInputs::Get(char* name,int* dofs, int numdofs){
+	
+	int i;
+	Input* input=NULL;
+	int found=0;
+	
+	/*output: */
+	Vec ug=NULL;
+
+	/*Go through dataset, and figure out if an Input 
+	 * has the name "name": */
+	for(i=0;i<dataset->Size();i++){
+		input=(Input*)dataset->GetObjectByOffset(i);
+
+		if (input->IsSameName(name)){
+			found=1;
+			break;
+		}
+	}
+
+	if(found==0)return NULL;
+	
+	/*call submethod: */
+	ug=input->Get(dofs,numdofs);
+
+	return ug;
+}
Index: /issm/trunk/src/c/objects/ParameterInputs.h
===================================================================
--- /issm/trunk/src/c/objects/ParameterInputs.h	(revision 364)
+++ /issm/trunk/src/c/objects/ParameterInputs.h	(revision 365)
@@ -33,4 +33,6 @@
 		int  Recover(char* name,double* values, int ndof, int* dofs,int numnodes,void** nodes); //void** because otherwise we get a circular dependency with Node
 
+		Vec  Get(char* field_name,int* dofs, int numdofs);
+
 		/*declaration found in io: */
 		void Init( void* data_handle);
Index: /issm/trunk/src/c/parallel/diagnostic_core_nonlinear.cpp
===================================================================
--- /issm/trunk/src/c/parallel/diagnostic_core_nonlinear.cpp	(revision 364)
+++ /issm/trunk/src/c/parallel/diagnostic_core_nonlinear.cpp	(revision 365)
@@ -42,4 +42,5 @@
 	int debug=0;
 	double eps_rel,eps_abs,yts;
+	int dofs[3]={1,1,0}; //recover vx,vy by default. vz may be.
 
 	/*Recover parameters: */
@@ -58,4 +59,11 @@
 	/*Copy loads for backup: */
 	loads=fem->loads->Copy();
+	
+	/*recover input velocities if present: */
+	if (numberofdofspernode>=3)dofs[2]=1;//only keep vz if running with more than 3 dofs per node
+	ug=inputs->Get("velocity",&dofs[0],3);
+
+	VecDuplicate(ug,&old_ug);
+	VecCopy(ug,old_ug);
 
 	count=1;
Index: /issm/trunk/src/c/toolkits/mpi/patches/MPI_Lowerrow.cpp
===================================================================
--- /issm/trunk/src/c/toolkits/mpi/patches/MPI_Lowerrow.cpp	(revision 364)
+++ /issm/trunk/src/c/toolkits/mpi/patches/MPI_Lowerrow.cpp	(revision 365)
@@ -27,7 +27,2 @@
 	
 }
-
-
-
-
-
