Index: /issm/trunk-jpl/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp	(revision 24167)
+++ /issm/trunk-jpl/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp	(revision 24168)
@@ -16,7 +16,6 @@
 void AverageOntoPartitionx(double** paverage, Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,double* vertex_response){
 
-	int     dummy;
 	int     npart;
-	double *qmu_part  = NULL;
+	double *qmu_vpart  = NULL;
 
 	/*output: */
@@ -27,5 +26,5 @@
 
 	/*First, recover qmu partition of vertices: */
-	parameters->FindParam(&qmu_part,&dummy,QmuPartitionEnum);
+	parameters->FindParam(&qmu_vpart,NULL,QmuVpartitionEnum);
 
 	/*Some parameters: */
@@ -42,5 +41,5 @@
 	for(int i=0;i<elements->Size();i++){
 		Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i));
-		element->AverageOntoPartition(partition_contributions,partition_areas,vertex_response,qmu_part);
+		element->AverageOntoPartition(partition_contributions,partition_areas,vertex_response,qmu_vpart);
 	}
 
@@ -56,5 +55,5 @@
 
 	/*Free ressources:*/
-	xDelete<double>(qmu_part);
+	xDelete<double>(qmu_vpart);
 	delete partition_contributions;
 	delete partition_areas;
Index: /issm/trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp	(revision 24167)
+++ /issm/trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp	(revision 24168)
@@ -20,6 +20,6 @@
 	int     ncols;
 	int     npart;
-	double *qmu_part  = NULL;
-	int     qmu_npart;
+	double *qmu_vpart  = NULL;
+	double *qmu_epart  = NULL;
 
 	double *distributed_values = NULL;
@@ -30,5 +30,6 @@
 	/*retrieve parameters: */
 	femmodel->parameters->FindParam(&npart,QmuNumberofpartitionsEnum);
-	femmodel->parameters->FindParam(&qmu_part,&qmu_npart,QmuPartitionEnum);
+	femmodel->parameters->FindParam(&qmu_vpart,NULL,QmuVpartitionEnum);
+	femmodel->parameters->FindParam(&qmu_epart,NULL,QmuEpartitionEnum);
 	numberofvertices=femmodel->vertices->NumberOfVertices();
 	numberofelements=femmodel->elements->NumberOfElements();
@@ -60,21 +61,21 @@
 
 
-			/*We've got the parameter, we need to update it using qmu_part and the distributed_values. 
-			 * Several cases: we either have a nrows=numberofvertices or nrows=numberofelements, and 
-			 * in addition, it can be either a static or transient (nrows+1) vector. 
-			 * Deal with both cases accordingly: */
+			/*We've got the parameter, we need to update it using qmu_vpart or qmu_epart (depending on whether 
+			 * it is element or vertex distributed), and the distributed_values. 
+			 In addition, the parameter can be either a static or transient (nrows+1) vector. */
+			
 			//_printf_("nrows: " << nrows << " numberofvertices: " << numberofvertices << " qmu_npart: " << qmu_npart << "\n");
 
-			if (qmu_npart==numberofvertices){
+			if (nrows==numberofvertices | nrows==numberofvertices+1){
 				for(k=0;k<numberofvertices;k++){
 					for(l=0;l<ncols;l++){
-						*(parameter+ncols*k+l)=*(parameter+ncols*k+l)*distributed_values[(int)qmu_part[k]];
+						*(parameter+ncols*k+l)=*(parameter+ncols*k+l)*distributed_values[(int)qmu_vpart[k]];
 					}
 				}
 			}
-			else if (qmu_npart==numberofelements){
+			else if (nrows==numberofelements | nrows==numberofelements+1){
 				for(k=0;k<numberofelements;k++){
 					for(l=0;l<ncols;l++){
-						*(parameter+ncols*k+l)=*(parameter+ncols*k+l)*distributed_values[(int)qmu_part[k]];
+						*(parameter+ncols*k+l)=*(parameter+ncols*k+l)*distributed_values[(int)qmu_epart[k]];
 					}
 				}
@@ -100,5 +101,5 @@
 
 			/*Update inputs using the parameter matrix: */
-			if(qmu_npart==numberofvertices)
+			if(nrows==numberofvertices| nrows==numberofvertices+1)
 				InputUpdateFromMatrixDakotax(femmodel, parameter, nrows,ncols,StringToEnumx(root), VertexEnum);
 			else
@@ -125,4 +126,5 @@
 
 	/*Free ressources:*/
-	xDelete<double>(qmu_part);
+	xDelete<double>(qmu_vpart);
+	xDelete<double>(qmu_epart);
 }
Index: /issm/trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp	(revision 24167)
+++ /issm/trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp	(revision 24168)
@@ -13,6 +13,6 @@
 	/*variable declarations*/
 	int          i;
-	int         *part                   = NULL;
-	double      *dpart                  = NULL;
+	double      *vpart                  = NULL;
+	double      *epart                  = NULL;
 	int          npart;
 	char       **responsedescriptors    = NULL;
@@ -66,10 +66,11 @@
 		parameters->AddObject(new StringArrayParam(QmuResponsedescriptorsEnum,responsedescriptors,numresponsedescriptors));
 
-		/*Deal with partitioning*/
-		/*partition vertices in iomodel->qmu_npart parts, unless a partition is already present: */
+		/*Load partitioning vectors (both vertex and element based: */
 		parameters->AddObject(iomodel->CopyConstantObject("md.qmu.numberofpartitions",QmuNumberofpartitionsEnum));
-		iomodel->FetchData(&dpart,&npart,NULL,"md.qmu.partition");
-		if(!dpart) _error_("md.qmu.partition is empty");
-		parameters->AddObject(new DoubleVecParam(QmuPartitionEnum,dpart,npart));
+		iomodel->FetchData(&vpart,&npart,NULL,"md.qmu.vpartition"); if(!vpart) _error_("md.qmu.vpartition is empty");
+		parameters->AddObject(new DoubleVecParam(QmuEpartitionEnum,vpart,npart));
+		
+		iomodel->FetchData(&epart,&npart,NULL,"md.qmu.epartition"); if(!epart) _error_("md.qmu.epartition is empty");
+		parameters->AddObject(new DoubleVecParam(QmuVpartitionEnum,epart,npart));
 
 		/*Deal with data needed because of qmu variables*/
@@ -111,6 +112,6 @@
 		}
 		xDelete<char*>(variabledescriptors);
-		xDelete<int>(part);
-		xDelete<double>(dpart);
+		xDelete<double>(vpart);
+		xDelete<double>(epart);
 		xDelete<char>(qmuinname);
 		xDelete<char>(qmuerrname);
Index: /issm/trunk-jpl/src/c/shared/Enum/Enum.vim
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/Enum.vim	(revision 24167)
+++ /issm/trunk-jpl/src/c/shared/Enum/Enum.vim	(revision 24168)
@@ -115,4 +115,5 @@
 syn keyword cConstant DamageC2Enum
 syn keyword cConstant DamageC3Enum
+syn keyword cConstant DamageC4Enum
 syn keyword cConstant DamageEnum
 syn keyword cConstant DamageEquivStressEnum
@@ -125,4 +126,5 @@
 syn keyword cConstant DamageStabilizationEnum
 syn keyword cConstant DamageStressThresholdEnum
+syn keyword cConstant DamageStressUBoundEnum
 syn keyword cConstant DebugProfilingEnum
 syn keyword cConstant DomainDimensionEnum
@@ -288,5 +290,6 @@
 syn keyword cConstant QmuNumberofpartitionsEnum
 syn keyword cConstant QmuOutNameEnum
-syn keyword cConstant QmuPartitionEnum
+syn keyword cConstant QmuEpartitionEnum
+syn keyword cConstant QmuVpartitionEnum
 syn keyword cConstant QmuResponsedescriptorsEnum
 syn keyword cConstant QmuVariableDescriptorsEnum
@@ -395,4 +398,5 @@
 syn keyword cConstant StressbalanceRiftPenaltyThresholdEnum
 syn keyword cConstant StressbalanceShelfDampeningEnum
+syn keyword cConstant ThermalIsdrainicecolumnEnum
 syn keyword cConstant ThermalIsdynamicbasalspcEnum
 syn keyword cConstant ThermalIsenthalpyEnum
@@ -405,4 +409,5 @@
 syn keyword cConstant ThermalRequestedOutputsEnum
 syn keyword cConstant ThermalStabilizationEnum
+syn keyword cConstant ThermalWatercolumnUpperlimitEnum
 syn keyword cConstant TimeEnum
 syn keyword cConstant TimesteppingCflCoefficientEnum
@@ -459,4 +464,6 @@
 syn keyword cConstant BasalforcingsIsmip6TfShelfEnum
 syn keyword cConstant BasalforcingsIsmip6MeltAnomalyEnum
+syn keyword cConstant BasalforcingsOceanSalinityEnum
+syn keyword cConstant BasalforcingsOceanTempEnum
 syn keyword cConstant BasalforcingsPicoBasinIdEnum
 syn keyword cConstant BasalforcingsPicoBoxIdEnum
@@ -783,4 +790,5 @@
 syn keyword cConstant ThicknessOldEnum
 syn keyword cConstant ThicknessPositiveEnum
+syn keyword cConstant ThicknessResidualEnum
 syn keyword cConstant VelEnum
 syn keyword cConstant VxAverageEnum
@@ -928,4 +936,5 @@
 syn keyword cConstant BasalforcingsIsmip6Enum
 syn keyword cConstant BasalforcingsPicoEnum
+syn keyword cConstant BeckmannGoosseFloatingMeltRateEnum
 syn keyword cConstant BedSlopeSolutionEnum
 syn keyword cConstant BoolExternalResultEnum
@@ -1282,5 +1291,4 @@
 syn keyword cType Cfsurfacesquare
 syn keyword cType Channel
-syn keyword cType classes
 syn keyword cType Constraint
 syn keyword cType Constraints
@@ -1289,6 +1297,6 @@
 syn keyword cType ControlInput
 syn keyword cType Covertree
+syn keyword cType DataSetParam
 syn keyword cType DatasetInput
-syn keyword cType DataSetParam
 syn keyword cType Definition
 syn keyword cType DependentObject
@@ -1303,6 +1311,6 @@
 syn keyword cType ElementHook
 syn keyword cType ElementMatrix
+syn keyword cType ElementVector
 syn keyword cType Elements
-syn keyword cType ElementVector
 syn keyword cType ExponentialVariogram
 syn keyword cType ExternalResult
@@ -1311,10 +1319,9 @@
 syn keyword cType Friction
 syn keyword cType Gauss
-syn keyword cType GaussianVariogram
-syn keyword cType gaussobjects
 syn keyword cType GaussPenta
 syn keyword cType GaussSeg
 syn keyword cType GaussTetra
 syn keyword cType GaussTria
+syn keyword cType GaussianVariogram
 syn keyword cType GenericExternalResult
 syn keyword cType GenericOption
@@ -1324,5 +1331,4 @@
 syn keyword cType Input
 syn keyword cType Inputs
-syn keyword cType IntArrayInput
 syn keyword cType IntInput
 syn keyword cType IntMatParam
@@ -1332,5 +1338,4 @@
 syn keyword cType IssmDirectApplicInterface
 syn keyword cType IssmParallelDirectApplicInterface
-syn keyword cType krigingobjects
 syn keyword cType Load
 syn keyword cType Loads
@@ -1343,5 +1348,4 @@
 syn keyword cType Matice
 syn keyword cType Matlitho
-syn keyword cType matrixobjects
 syn keyword cType MatrixParam
 syn keyword cType Misfit
@@ -1356,6 +1360,6 @@
 syn keyword cType Observations
 syn keyword cType Option
+syn keyword cType OptionUtilities
 syn keyword cType Options
-syn keyword cType OptionUtilities
 syn keyword cType Param
 syn keyword cType Parameters
@@ -1370,10 +1374,10 @@
 syn keyword cType Regionaloutput
 syn keyword cType Results
+syn keyword cType RiftStruct
 syn keyword cType Riftfront
-syn keyword cType RiftStruct
 syn keyword cType Seg
 syn keyword cType SegInput
+syn keyword cType SegRef
 syn keyword cType Segment
-syn keyword cType SegRef
 syn keyword cType SpcDynamic
 syn keyword cType SpcStatic
@@ -1395,4 +1399,8 @@
 syn keyword cType Vertex
 syn keyword cType Vertices
+syn keyword cType classes
+syn keyword cType gaussobjects
+syn keyword cType krigingobjects
+syn keyword cType matrixobjects
 syn keyword cType AdjointBalancethickness2Analysis
 syn keyword cType AdjointBalancethicknessAnalysis
@@ -1413,6 +1421,6 @@
 syn keyword cType FreeSurfaceBaseAnalysis
 syn keyword cType FreeSurfaceTopAnalysis
+syn keyword cType GLheightadvectionAnalysis
 syn keyword cType GiaIvinsAnalysis
-syn keyword cType GLheightadvectionAnalysis
 syn keyword cType HydrologyDCEfficientAnalysis
 syn keyword cType HydrologyDCInefficientAnalysis
Index: /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 24167)
+++ /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 24168)
@@ -284,5 +284,6 @@
 	QmuNumberofpartitionsEnum,
 	QmuOutNameEnum,
-	QmuPartitionEnum,
+	QmuEpartitionEnum,
+	QmuVpartitionEnum,
 	QmuResponsedescriptorsEnum,
 	QmuVariableDescriptorsEnum,
Index: /issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 24167)
+++ /issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 24168)
@@ -292,5 +292,6 @@
 		case QmuNumberofpartitionsEnum : return "QmuNumberofpartitions";
 		case QmuOutNameEnum : return "QmuOutName";
-		case QmuPartitionEnum : return "QmuPartition";
+		case QmuEpartitionEnum : return "QmuEpartition";
+		case QmuVpartitionEnum : return "QmuVpartition";
 		case QmuResponsedescriptorsEnum : return "QmuResponsedescriptors";
 		case QmuVariableDescriptorsEnum : return "QmuVariableDescriptors";
Index: /issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 24167)
+++ /issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 24168)
@@ -298,5 +298,6 @@
 	      else if (strcmp(name,"QmuNumberofpartitions")==0) return QmuNumberofpartitionsEnum;
 	      else if (strcmp(name,"QmuOutName")==0) return QmuOutNameEnum;
-	      else if (strcmp(name,"QmuPartition")==0) return QmuPartitionEnum;
+	      else if (strcmp(name,"QmuEpartition")==0) return QmuEpartitionEnum;
+	      else if (strcmp(name,"QmuVpartition")==0) return QmuVpartitionEnum;
 	      else if (strcmp(name,"QmuResponsedescriptors")==0) return QmuResponsedescriptorsEnum;
 	      else if (strcmp(name,"QmuVariableDescriptors")==0) return QmuVariableDescriptorsEnum;
@@ -382,9 +383,9 @@
 	      else if (strcmp(name,"SmbRunoffref")==0) return SmbRunoffrefEnum;
 	      else if (strcmp(name,"SmbSealev")==0) return SmbSealevEnum;
-	      else if (strcmp(name,"SmbSwIdx")==0) return SmbSwIdxEnum;
          else stage=4;
    }
    if(stage==4){
-	      if (strcmp(name,"SmbT0dry")==0) return SmbT0dryEnum;
+	      if (strcmp(name,"SmbSwIdx")==0) return SmbSwIdxEnum;
+	      else if (strcmp(name,"SmbT0dry")==0) return SmbT0dryEnum;
 	      else if (strcmp(name,"SmbT0wet")==0) return SmbT0wetEnum;
 	      else if (strcmp(name,"SmbTdiff")==0) return SmbTdiffEnum;
@@ -505,9 +506,9 @@
 	      else if (strcmp(name,"CrevasseDepth")==0) return CrevasseDepthEnum;
 	      else if (strcmp(name,"DamageD")==0) return DamageDEnum;
-	      else if (strcmp(name,"DamageDbar")==0) return DamageDbarEnum;
          else stage=5;
    }
    if(stage==5){
-	      if (strcmp(name,"DamageF")==0) return DamageFEnum;
+	      if (strcmp(name,"DamageDbar")==0) return DamageDbarEnum;
+	      else if (strcmp(name,"DamageF")==0) return DamageFEnum;
 	      else if (strcmp(name,"DegreeOfChannelization")==0) return DegreeOfChannelizationEnum;
 	      else if (strcmp(name,"DeviatoricStresseffective")==0) return DeviatoricStresseffectiveEnum;
@@ -628,9 +629,9 @@
 	      else if (strcmp(name,"MaterialsRheologyEbar")==0) return MaterialsRheologyEbarEnum;
 	      else if (strcmp(name,"MaterialsRheologyEc")==0) return MaterialsRheologyEcEnum;
-	      else if (strcmp(name,"MaterialsRheologyEcbar")==0) return MaterialsRheologyEcbarEnum;
          else stage=6;
    }
    if(stage==6){
-	      if (strcmp(name,"MaterialsRheologyEs")==0) return MaterialsRheologyEsEnum;
+	      if (strcmp(name,"MaterialsRheologyEcbar")==0) return MaterialsRheologyEcbarEnum;
+	      else if (strcmp(name,"MaterialsRheologyEs")==0) return MaterialsRheologyEsEnum;
 	      else if (strcmp(name,"MaterialsRheologyEsbar")==0) return MaterialsRheologyEsbarEnum;
 	      else if (strcmp(name,"MaterialsRheologyN")==0) return MaterialsRheologyNEnum;
@@ -751,9 +752,9 @@
 	      else if (strcmp(name,"SmbTeValue")==0) return SmbTeValueEnum;
 	      else if (strcmp(name,"SmbTemperaturesAnomaly")==0) return SmbTemperaturesAnomalyEnum;
-	      else if (strcmp(name,"SmbTemperaturesLgm")==0) return SmbTemperaturesLgmEnum;
          else stage=7;
    }
    if(stage==7){
-	      if (strcmp(name,"SmbTemperaturesPresentday")==0) return SmbTemperaturesPresentdayEnum;
+	      if (strcmp(name,"SmbTemperaturesLgm")==0) return SmbTemperaturesLgmEnum;
+	      else if (strcmp(name,"SmbTemperaturesPresentday")==0) return SmbTemperaturesPresentdayEnum;
 	      else if (strcmp(name,"SmbTemperaturesReconstructed")==0) return SmbTemperaturesReconstructedEnum;
 	      else if (strcmp(name,"SmbTini")==0) return SmbTiniEnum;
@@ -874,9 +875,9 @@
 	      else if (strcmp(name,"Outputdefinition48")==0) return Outputdefinition48Enum;
 	      else if (strcmp(name,"Outputdefinition49")==0) return Outputdefinition49Enum;
-	      else if (strcmp(name,"Outputdefinition4")==0) return Outputdefinition4Enum;
          else stage=8;
    }
    if(stage==8){
-	      if (strcmp(name,"Outputdefinition50")==0) return Outputdefinition50Enum;
+	      if (strcmp(name,"Outputdefinition4")==0) return Outputdefinition4Enum;
+	      else if (strcmp(name,"Outputdefinition50")==0) return Outputdefinition50Enum;
 	      else if (strcmp(name,"Outputdefinition51")==0) return Outputdefinition51Enum;
 	      else if (strcmp(name,"Outputdefinition52")==0) return Outputdefinition52Enum;
@@ -997,9 +998,9 @@
 	      else if (strcmp(name,"DefaultCalving")==0) return DefaultCalvingEnum;
 	      else if (strcmp(name,"Dense")==0) return DenseEnum;
-	      else if (strcmp(name,"DependentObject")==0) return DependentObjectEnum;
          else stage=9;
    }
    if(stage==9){
-	      if (strcmp(name,"DepthAverageAnalysis")==0) return DepthAverageAnalysisEnum;
+	      if (strcmp(name,"DependentObject")==0) return DependentObjectEnum;
+	      else if (strcmp(name,"DepthAverageAnalysis")==0) return DepthAverageAnalysisEnum;
 	      else if (strcmp(name,"DeviatoricStressErrorEstimator")==0) return DeviatoricStressErrorEstimatorEnum;
 	      else if (strcmp(name,"Divergence")==0) return DivergenceEnum;
@@ -1120,9 +1121,9 @@
 	      else if (strcmp(name,"MassFlux")==0) return MassFluxEnum;
 	      else if (strcmp(name,"Masscon")==0) return MassconEnum;
-	      else if (strcmp(name,"Massconaxpby")==0) return MassconaxpbyEnum;
          else stage=10;
    }
    if(stage==10){
-	      if (strcmp(name,"Massfluxatgate")==0) return MassfluxatgateEnum;
+	      if (strcmp(name,"Massconaxpby")==0) return MassconaxpbyEnum;
+	      else if (strcmp(name,"Massfluxatgate")==0) return MassfluxatgateEnum;
 	      else if (strcmp(name,"MasstransportAnalysis")==0) return MasstransportAnalysisEnum;
 	      else if (strcmp(name,"MasstransportSolution")==0) return MasstransportSolutionEnum;
@@ -1243,9 +1244,9 @@
 	      else if (strcmp(name,"Sset")==0) return SsetEnum;
 	      else if (strcmp(name,"SteadystateSolution")==0) return SteadystateSolutionEnum;
-	      else if (strcmp(name,"StressIntensityFactor")==0) return StressIntensityFactorEnum;
          else stage=11;
    }
    if(stage==11){
-	      if (strcmp(name,"StressbalanceAnalysis")==0) return StressbalanceAnalysisEnum;
+	      if (strcmp(name,"StressIntensityFactor")==0) return StressIntensityFactorEnum;
+	      else if (strcmp(name,"StressbalanceAnalysis")==0) return StressbalanceAnalysisEnum;
 	      else if (strcmp(name,"StressbalanceConvergenceNumSteps")==0) return StressbalanceConvergenceNumStepsEnum;
 	      else if (strcmp(name,"StressbalanceSIAAnalysis")==0) return StressbalanceSIAAnalysisEnum;
Index: /issm/trunk-jpl/src/m/classes/qmu.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/qmu.m	(revision 24167)
+++ /issm/trunk-jpl/src/m/classes/qmu.m	(revision 24168)
@@ -12,5 +12,6 @@
 		params                      = struct();
 		results                     = struct();
-		partition                   = NaN;
+		vpartition                   = NaN;
+		epartition                   = NaN;
 		numberofpartitions          = 0;
 		numberofresponses           = 0;
@@ -25,5 +26,6 @@
 	methods
 		function self = extrude(self,md) % {{{
-			self.partition=project3d(md,'vector',self.partition','type','node');
+			self.vpartition=project3d(md,'vector',self.vpartition','type','node');
+			self.epartition=project3d(md,'vector',self.epartition','type','element');
 		end % }}}
 		function self = qmu(varargin) % {{{
@@ -61,19 +63,32 @@
 				end
 				if mod(md.cluster.np-1,self.params.processors_per_evaluation), 
-					md = checkmessage(md,['in parallel library mode, the requirement is for md.cluster.np = md.qmu.params.processors_per_evaluation * number_of_slaves, where number_of_slaves will automatically be determined by Dakota. Modify md.cluster.np accordingly']);
-				end
-			end
-			if ~isempty(md.qmu.partition),
-				if (numel(md.qmu.partition)~=md.mesh.numberofvertices & numel(md.qmu.partition)~=md.mesh.numberofelements) | size(md.qmu.partition,2)~=1,
-					md = checkmessage(md,['user supplied partition for qmu analysis should have size md.mesh.numberofvertices x 1 or md.mesh.numberofelements x 1']);
-				end
-				if min(md.qmu.partition)~=0,
-					md = checkmessage(md,['partition vector not indexed from 0 on']);
-				end
-				if max(md.qmu.partition)>=md.qmu.numberofpartitions,
-					md = checkmessage(md,['for qmu analysis, partitioning vector cannot go over npart, number of partition areas']);
-				end
-			end
-
+					%md = checkmessage(md,['in parallel library mode, the requirement is for md.cluster.np = md.qmu.params.processors_per_evaluation * number_of_slaves, where number_of_slaves will automatically be determined by Dakota. Modify md.cluster.np accordingly']);
+				end
+			end
+			if ~isempty(md.qmu.vpartition),
+				if numel(md.qmu.vpartition)~=md.mesh.numberofvertices 
+					md = checkmessage(md,['user supplied vertex partition for qmu analysis should have size md.mesh.numberofvertices x 1']);
+				end
+				if min(md.qmu.vpartition)~=0,
+					md = checkmessage(md,['vertex partition vector not indexed from 0 on']);
+				end
+				if max(md.qmu.vpartition)>=md.qmu.numberofpartitions,
+					md = checkmessage(md,['for qmu analysis, vertex partitioning vector cannot go over npart, number of partition areas']);
+				end
+			end
+			if ~isempty(md.qmu.epartition),
+				if numel(md.qmu.epartition)~=md.mesh.numberofelements, 
+					md = checkmessage(md,['user supplied element partition for qmu analysis should have size md.mesh.numberofelements x 1']);
+				end
+				if min(md.qmu.epartition)~=0,
+					md = checkmessage(md,['element partition vector not indexed from 0 on']);
+				end
+				if max(md.qmu.epartition)>=md.qmu.numberofpartitions,
+					md = checkmessage(md,['for qmu analysis, element partitioning vector cannot go over npart, number of partition areas']);
+				end
+			end
+			if isempty(md.qmu.vpartition) & isempty(md.qmu.epartition),
+					md = checkmessage(md,['for qmu analysis, at least one of element and partitioning vectors need to be supplied!']);
+			end
 		end % }}}
 		function disp(self) % {{{
@@ -144,5 +159,6 @@
 				end
 			end
-			fielddisplay(self,'partition','user provided mesh partitioning, defaults to metis if not specified') 
+			fielddisplay(self,'vpartition','user provided mesh partitioning (vertex based)');
+			fielddisplay(self,'epartition','user provided mesh partitioning (element based)');
 			fielddisplay(self,'numberofpartitions','number of partitions for semi-discrete qmu') 
 			fielddisplay(self,'variabledescriptors','');
@@ -162,5 +178,6 @@
 				return; 
 			end
-			WriteData(fid,prefix,'object',self,'fieldname','partition','format','DoubleMat','mattype',2);
+			WriteData(fid,prefix,'object',self,'fieldname','vpartition','format','DoubleMat','mattype',2);
+			WriteData(fid,prefix,'object',self,'fieldname','epartition','format','DoubleMat','mattype',2);
 			WriteData(fid,prefix,'object',self,'fieldname','numberofpartitions','format','Integer');
 			WriteData(fid,prefix,'object',self,'fieldname','numberofresponses','format','Integer');
