Index: /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 15745)
+++ /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 15746)
@@ -401,23 +401,27 @@
 
 	if(Ke){
-		int approximation;
-		inputs->GetInputValue(&approximation,ApproximationEnum);
-		if(approximation==HOFSApproximationEnum){
-			//Do nothing condensatino already done for Stokes part
-		}
-		else{
-			/*Condense if requested*/
-			if(this->element_type==MINIcondensedEnum){
-				int indices[3]={18,19,20};
-				Ke->StaticCondensation(3,&indices[0]);
+		int analysis_type;
+		parameters->FindParam(&analysis_type,AnalysisTypeEnum);
+		if(analysis_type==DiagnosticHorizAnalysisEnum){
+			int approximation;
+			inputs->GetInputValue(&approximation,ApproximationEnum);
+			if(approximation==HOFSApproximationEnum){
+				//Do nothing condensatino already done for Stokes part
 			}
-			else if(this->element_type==P1bubblecondensedEnum){
-				int size   = nodes[6]->GetNumberOfDofs(NoneApproximationEnum,GsetEnum);
-				int offset = 0;
-				for(int i=0;i<6;i++) offset+=nodes[i]->GetNumberOfDofs(NoneApproximationEnum,GsetEnum);
-				int* indices=xNew<int>(size);
-				for(int i=0;i<size;i++) indices[i] = offset+i;
-				Ke->StaticCondensation(size,indices);
-				xDelete<int>(indices);
+			else{
+				/*Condense if requested*/
+				if(this->element_type==MINIcondensedEnum){
+					int indices[3]={18,19,20};
+					Ke->StaticCondensation(3,&indices[0]);
+				}
+				else if(this->element_type==P1bubblecondensedEnum){
+					int size   = nodes[6]->GetNumberOfDofs(NoneApproximationEnum,GsetEnum);
+					int offset = 0;
+					for(int i=0;i<6;i++) offset+=nodes[i]->GetNumberOfDofs(NoneApproximationEnum,GsetEnum);
+					int* indices=xNew<int>(size);
+					for(int i=0;i<size;i++) indices[i] = offset+i;
+					Ke->StaticCondensation(size,indices);
+					xDelete<int>(indices);
+				}
 			}
 		}
@@ -570,36 +574,39 @@
 
 	if(pe){
-		/*StaticCondensation if requested*/
-		if(this->element_type==MINIcondensedEnum){
-			int approximation;
-			inputs->GetInputValue(&approximation,ApproximationEnum);
-			if(approximation==HOFSApproximationEnum){
-				//Do nothing, condensation already done in PVectorCoupling
+		int analysis_type;
+		parameters->FindParam(&analysis_type,AnalysisTypeEnum);
+		if(analysis_type==DiagnosticHorizAnalysisEnum){
+			/*StaticCondensation if requested*/
+			if(this->element_type==MINIcondensedEnum){
+				int approximation;
+				inputs->GetInputValue(&approximation,ApproximationEnum);
+				if(approximation==HOFSApproximationEnum){
+					//Do nothing, condensation already done in PVectorCoupling
+				}
+				else{
+					int indices[3]={18,19,20};
+
+					this->element_type=MINIEnum;
+					ElementMatrix* Ke = CreateKMatrixDiagnosticFS();
+					this->element_type=MINIcondensedEnum;
+
+					pe->StaticCondensation(Ke,3,&indices[0]);
+					delete Ke;
+				}
 			}
-			else{
-				int indices[3]={18,19,20};
-
-				this->element_type=MINIEnum;
-				ElementMatrix* Ke = CreateKMatrixDiagnosticFS();
-				this->element_type=MINIcondensedEnum;
-
-				pe->StaticCondensation(Ke,3,&indices[0]);
+			else if(this->element_type==P1bubblecondensedEnum){
+				int size   = nodes[6]->GetNumberOfDofs(NoneApproximationEnum,GsetEnum);
+				int offset = 0;
+				for(int i=0;i<6;i++) offset+=nodes[i]->GetNumberOfDofs(NoneApproximationEnum,GsetEnum);
+				int* indices=xNew<int>(size);
+				for(int i=0;i<size;i++) indices[i] = offset+i;
+
+				this->element_type=P1bubbleEnum;
+				ElementMatrix* Ke = CreateKMatrix();
+				this->element_type=P1bubblecondensedEnum;
+				pe->StaticCondensation(Ke,size,indices);
+				xDelete<int>(indices);
 				delete Ke;
 			}
-
-		}
-		else if(this->element_type==P1bubblecondensedEnum){
-			int size   = nodes[6]->GetNumberOfDofs(NoneApproximationEnum,GsetEnum);
-			int offset = 0;
-			for(int i=0;i<6;i++) offset+=nodes[i]->GetNumberOfDofs(NoneApproximationEnum,GsetEnum);
-			int* indices=xNew<int>(size);
-			for(int i=0;i<size;i++) indices[i] = offset+i;
-
-			this->element_type=P1bubbleEnum;
-			ElementMatrix* Ke = CreateKMatrix();
-			this->element_type=P1bubblecondensedEnum;
-			pe->StaticCondensation(Ke,size,indices);
-			xDelete<int>(indices);
-			delete Ke;
 		}
 
@@ -8440,5 +8447,5 @@
 	delete Ke;
 	ElementVector* pe3=CreatePVectorCouplingHOFS();
-	ElementVector* pe =new ElementVector(pe1,pe2);
+	ElementVector* pe =new ElementVector(pe1,pe2,pe3);
 
 	/*clean-up and return*/
