Index: /issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 4266)
+++ /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 4267)
@@ -27,5 +27,4 @@
 	this->matpar=NULL;
 	this->neighbors=NULL;
-	this->collapse=NULL;
 	
 	this->inputs=NULL;
@@ -39,5 +38,4 @@
 	delete results;
 	this->parameters=NULL;
-	xfree((void**)&collapse);
 }
 /*}}}*/
@@ -81,7 +79,4 @@
 	this->inputs=new Inputs();
 	this->results=new Results();
-
-	//collpase flags
-	collapse=(bool*)xcalloc(nummodels,sizeof(bool));
 
 }
@@ -154,6 +149,4 @@
 	printf("   results\n");
 	results->DeepEcho();
-	printf("   collapse: \n   ");
-	for(i=0;i<numanalyses;i++)printf("%s|",collapse[i]?"true":"false");
 	return;
 }
@@ -175,5 +168,4 @@
 
 	/*allocate dynamic memory: */
-	collapse=(bool*)xmalloc(numanalyses*sizeof(bool));
 	InitHookNodes(numanalyses);
 
@@ -194,7 +186,4 @@
 	results=(Results*)DataSetDemarshallRaw(&marshalled_dataset); 
 
-	/*demarshall internal parameters: */
-	memcpy(collapse,marshalled_dataset,numanalyses*sizeof(bool));marshalled_dataset+=numanalyses*sizeof(bool);
-
 	/*parameters: may not exist even yet, so let Configure handle it: */
 	this->parameters=NULL;
@@ -264,7 +253,4 @@
 	marshalled_dataset+=marshalled_results_size;
 
-	/*marshall internal parameters: */
-	memcpy(marshalled_dataset,collapse,numanalyses*sizeof(bool));marshalled_dataset+=numanalyses*sizeof(bool);
-
 	/*parameters: don't do anything about it. parameters are marshalled somewhere else!*/
 
@@ -291,5 +277,4 @@
 		+inputs->MarshallSize()
 		+results->MarshallSize()
-		+numanalyses*sizeof(bool)
 		+sizeof(int); //sizeof(int) for enum type
 }
@@ -854,15 +839,12 @@
 
 	/*Just branch to the correct InputUpdateFromSolution generator, according to the type of analysis we are carrying out: */
-	if (analysis_type==DiagnosticAnalysisEnum){
-		if (sub_analysis_type==HorizAnalysisEnum){
-			GetSolutionFromInputsDiagnosticHoriz(solution);
-		}
-		else if(sub_analysis_type==VertAnalysisEnum){
-			GetSolutionFromInputsDiagnosticVert(solution);
-		}
-		else if(sub_analysis_type==StokesAnalysisEnum){
-			GetSolutionFromInputsDiagnosticStokes(solution);
-		}
-		else ISSMERROR("sub_analysis: %i (%s) not supported yet",sub_analysis_type,EnumAsString(sub_analysis_type));
+	if (analysis_type==DiagnosticHorizAnalysisEnum){
+		GetSolutionFromInputsDiagnosticHoriz(solution);
+	}
+	else if(analysis_type==DiagnosticVertAnalysisEnum){
+		GetSolutionFromInputsDiagnosticVert(solution);
+	}
+	else if(analysis_type==DiagnosticStokesAnalysisEnum){
+		GetSolutionFromInputsDiagnosticStokes(solution);
 	}
 	else{
@@ -1717,10 +1699,8 @@
 	//elements of type 3 are macayeal type penta. we collapse the formulation on their base.
 	if(iomodel->elements_type){
-		if (*(iomodel->elements_type+2*index+0)==MacAyealFormulationEnum){ 
-			collapse[analysis_counter]=true;
-		}
-		else{
-			collapse[analysis_counter]=false;
-		}
+		if (*(iomodel->elements_type+2*index+0)==MacAyealFormulationEnum) 
+		 this->inputs->AddInput(new BoolInput(CollapseEnum,true));
+		else
+		 this->inputs->AddInput(new BoolInput(CollapseEnum,false));
 	}
 }
Index: /issm/trunk/src/c/objects/Elements/Penta.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.h	(revision 4266)
+++ /issm/trunk/src/c/objects/Elements/Penta.h	(revision 4267)
@@ -37,7 +37,4 @@
 		Inputs      *inputs;
 		Results      *results;
-
-		/*internal parameters: */
-		bool        *collapse; //collapse elements, depending on analysis_type
 
 		/*Penta constructors and destructor: {{{1*/
