Index: issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
===================================================================
--- issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h	(revision 5155)
+++ issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h	(revision 5156)
@@ -174,5 +174,4 @@
 	CmMinDmpValueEnum,
 	CmNoiseDmpEnum,
-	CollapseEnum,
 	ConstantEnum,
 	ControlTypeEnum,
Index: issm/trunk/src/c/EnumDefinitions/EnumToString.cpp
===================================================================
--- issm/trunk/src/c/EnumDefinitions/EnumToString.cpp	(revision 5155)
+++ issm/trunk/src/c/EnumDefinitions/EnumToString.cpp	(revision 5156)
@@ -148,5 +148,4 @@
 		case CmMinDmpValueEnum : return "CmMinDmpValue";
 		case CmNoiseDmpEnum : return "CmNoiseDmp";
-		case CollapseEnum : return "Collapse";
 		case ConstantEnum : return "Constant";
 		case ControlTypeEnum : return "ControlType";
Index: issm/trunk/src/c/EnumDefinitions/StringToEnum.cpp
===================================================================
--- issm/trunk/src/c/EnumDefinitions/StringToEnum.cpp	(revision 5155)
+++ issm/trunk/src/c/EnumDefinitions/StringToEnum.cpp	(revision 5156)
@@ -146,5 +146,4 @@
 	else if (strcmp(name,"CmMinDmpValue")==0) return CmMinDmpValueEnum;
 	else if (strcmp(name,"CmNoiseDmp")==0) return CmNoiseDmpEnum;
-	else if (strcmp(name,"Collapse")==0) return CollapseEnum;
 	else if (strcmp(name,"Constant")==0) return ConstantEnum;
 	else if (strcmp(name,"ControlType")==0) return ControlTypeEnum;
Index: issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 5155)
+++ issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 5156)
@@ -675,12 +675,12 @@
 	bool onbed;
 	bool onwater;
-	bool collapse;
 	bool onsurface;
+	int  approximation;
 
 	/*recover some inputs: */
 	inputs->GetParameterValue(&onbed,ElementOnBedEnum);
 	inputs->GetParameterValue(&onwater,ElementOnWaterEnum);
-	inputs->GetParameterValue(&collapse,CollapseEnum);
 	inputs->GetParameterValue(&onsurface,ElementOnSurfaceEnum);
+	inputs->GetParameterValue(&approximation,ApproximationEnum);
 
 	/*If on water, return 0: */
@@ -688,10 +688,10 @@
 
 	/*Bail out if this element if:
-	 * -> Non collapsed and not on the surface
-	 * -> collapsed (2d model) and not on bed) */
-	if ((!collapse && !onsurface) || (collapse && !onbed)){
+	 * -> Not MacAyeal and not on the surface
+	 * -> MacAyeal (2d model) and not on bed) */
+	if ((approximation!=MacAyealApproximationEnum && !onsurface) || (approximation==MacAyealApproximationEnum && !onbed)){
 		return 0;
 	}
-	else if (collapse){
+	else if (approximation==MacAyealApproximationEnum){
 
 		/*This element should be collapsed into a tria element at its base. Create this tria element, 
@@ -1557,13 +1557,13 @@
 	/*inputs: */
 	bool onwater;
-	bool collapse;
 	bool onsurface;
 	bool onbed;
+	int  approximation;
 
 	/*retrieve inputs :*/
 	inputs->GetParameterValue(&onwater,ElementOnWaterEnum);
-	inputs->GetParameterValue(&collapse,CollapseEnum);
 	inputs->GetParameterValue(&onbed,ElementOnBedEnum);
 	inputs->GetParameterValue(&onsurface,ElementOnSurfaceEnum);
+	inputs->GetParameterValue(&approximation,ApproximationEnum);
 
 	/*If on water, return 0: */
@@ -1571,10 +1571,10 @@
 
 	/*Bail out if this element if:
-	 * -> Non collapsed and not on the surface
-	 * -> collapsed (2d model) and not on bed) */
-	if ((!collapse && !onsurface) || (collapse && !onbed)){
+	 * -> Non MacAyeal and not on the surface
+	 * -> MacAyeal (2d model) and not on bed) */
+	if ((approximation!=MacAyealApproximationEnum && !onsurface) || (MacAyealApproximationEnum && !onbed)){
 		return 0;
 	}
-	else if (collapse){
+	else if (MacAyealApproximationEnum){
 
 		/*This element should be collapsed into a tria element at its base. Create this tria element, 
@@ -1686,13 +1686,13 @@
 	/*inputs: */
 	bool onwater;
-	bool collapse;
 	bool onsurface;
 	bool onbed;
+	int  approximation;
 
 	/*retrieve inputs :*/
 	inputs->GetParameterValue(&onwater,ElementOnWaterEnum);
-	inputs->GetParameterValue(&collapse,CollapseEnum);
 	inputs->GetParameterValue(&onbed,ElementOnBedEnum);
 	inputs->GetParameterValue(&onsurface,ElementOnSurfaceEnum);
+	inputs->GetParameterValue(&approximation,ApproximationEnum);
 
 	/*If on water, return 0: */
@@ -1700,10 +1700,10 @@
 
 	/*Bail out if this element if:
-	 * -> Non collapsed and not on the surface
-	 * -> collapsed (2d model) and not on bed) */
-	if ((!collapse && !onsurface) || (collapse && !onbed)){
+	 * -> Non MacAyeal not on the surface
+	 * -> MacAyeal (2d model) and not on bed) */
+	if ((approximation!=MacAyealApproximationEnum && !onsurface) || (approximation==MacAyealApproximationEnum && !onbed)){
 		return 0;
 	}
-	else if (collapse){
+	else if (approximation==MacAyealApproximationEnum){
 
 		/*This element should be collapsed into a tria element at its base. Create this tria element, 
@@ -1900,12 +1900,10 @@
 	}
 
-	//elements of type 3 are macayeal type penta. we collapse the formulation on their base.
+	//Need to know the type of approximation for this element
 	if(iomodel->elements_type){
 		if (*(iomodel->elements_type+2*index+0)==MacAyealApproximationEnum){
-			this->inputs->AddInput(new BoolInput(CollapseEnum,true));
 			this->inputs->AddInput(new IntInput(ApproximationEnum,MacAyealApproximationEnum));
 		}
 		else{
-			this->inputs->AddInput(new BoolInput(CollapseEnum,false));
 			if (*(iomodel->elements_type+2*index+0)==PattynApproximationEnum){
 				this->inputs->AddInput(new IntInput(ApproximationEnum,PattynApproximationEnum));
@@ -2125,7 +2123,7 @@
 	/*inputs: */
 	bool onwater;
-	bool collapse;
 	bool onbed;
 	bool shelf;
+	int  approximation;
 	Input* vx_input=NULL;
 	Input* vy_input=NULL;
@@ -2135,7 +2133,7 @@
 	/*retrieve inputs :*/
 	inputs->GetParameterValue(&onwater,ElementOnWaterEnum);
-	inputs->GetParameterValue(&collapse,CollapseEnum);
 	inputs->GetParameterValue(&onbed,ElementOnBedEnum);
 	inputs->GetParameterValue(&shelf,ElementOnIceShelfEnum);
+	inputs->GetParameterValue(&approximation,ApproximationEnum);
 
 	/*retrieve some parameters: */
@@ -2149,10 +2147,10 @@
 	  the stiffness matrix. */
 
-	if ((collapse==1) && (onbed==0)){
+	if ((approximation==MacAyealApproximationEnum) && (onbed==0)){
 		/*This element should be collapsed, but this element is not on the bedrock, therefore all its 
 		 * dofs have already been frozen! Do nothing: */
 		return;
 	}
-	else if ((collapse==1) && (onbed==1)){
+	else if ((approximation==MacAyealApproximationEnum) && (onbed==1)){
 
 		/*This element should be collapsed into a tria element at its base. Create this tria element, 
@@ -2938,5 +2936,4 @@
 	Tria*  tria=NULL;
 
-
 	/*inputs: */
 	bool onwater;
@@ -3234,6 +3231,6 @@
 	/*inputs: */
 	bool onwater;
-	bool collapse;
 	bool onbed;
+	int  approximation;
 	Input* surface_input=NULL;
 	Input* thickness_input=NULL;
@@ -3241,20 +3238,20 @@
 	/*retrieve inputs :*/
 	inputs->GetParameterValue(&onwater,ElementOnWaterEnum);
-	inputs->GetParameterValue(&collapse,CollapseEnum);
 	inputs->GetParameterValue(&onbed,ElementOnBedEnum);
+	inputs->GetParameterValue(&approximation,ApproximationEnum);
 
 	/*If on water, skip load: */
 	if(onwater)return;
 
-	/*Figure out if this pentaelem is collapsed. If so, then bailout, except if it is at the 
+	/*Figure out if this pentaelem is Macayeal. If so, then bailout, except if it is at the 
 	  bedrock, in which case we spawn a tria element using the 3 first grids, and use it to build 
 	  the load vector. */
 
-	if ((collapse==1) && (onbed==0)){
+	if ((approximation==MacAyealApproximationEnum) && (onbed==0)){
 		/*This element should be collapsed, but this element is not on the bedrock, therefore all its 
 		 * dofs have already been frozen! Do nothing: */
 		return;
 	}
-	else if ((collapse==1) && (onbed==1)){
+	else if ((approximation==MacAyealApproximationEnum) && (onbed==1)){
 
 		/*This element should be collapsed into a tria element at its base. Create this tria element, 
@@ -3325,5 +3322,5 @@
 		} //for (ig1=0; ig1<num_area_gauss; ig1++)
 
-	} //else if ((collapse==1) && (onbed==1))
+	} //else if ((approximation==MacAyealApproximationEnum) && (onbed==1))
 
 	/*Add pe_g to global vector pg: */
@@ -3347,13 +3344,13 @@
 	/*inputs: */
 	bool onwater;
-	bool collapse;
 	bool onsurface;
 	bool onbed;
+	int  approximation;
 
 	/*retrieve inputs :*/
 	inputs->GetParameterValue(&onwater,ElementOnWaterEnum);
-	inputs->GetParameterValue(&collapse,CollapseEnum);
 	inputs->GetParameterValue(&onbed,ElementOnBedEnum);
 	inputs->GetParameterValue(&onsurface,ElementOnSurfaceEnum);
+	inputs->GetParameterValue(&approximation,ApproximationEnum);
 
 	/*If on water, skip: */
@@ -3361,10 +3358,10 @@
 
 	/*Bail out if this element if:
-	 * -> Non collapsed and not on the surface
-	 * -> collapsed (2d model) and not on bed) */
-	if ((!collapse && !onsurface) || (collapse && !onbed)){
+	 * -> Non MacAyeal and not on the surface
+	 * -> MacAyeal(2d model) and not on bed) */
+	if ((approximation!=MacAyealApproximationEnum && !onsurface) || (approximation==MacAyealApproximationEnum && !onbed)){
 		return;
 	}
-	else if (collapse){
+	else if (approximation==MacAyealApproximationEnum){
 
 		/*This element should be collapsed into a tria element at its base. Create this tria element, 
@@ -4736,17 +4733,17 @@
 	/*inputs: */
 	bool onwater;
-	bool collapse;
 	bool onbed;
+	int  approximation;
 
 	/*retrieve inputs :*/
 	inputs->GetParameterValue(&onwater,ElementOnWaterEnum);
-	inputs->GetParameterValue(&collapse,CollapseEnum);
 	inputs->GetParameterValue(&onbed,ElementOnBedEnum);
+	inputs->GetParameterValue(&approximation,ApproximationEnum);
 
 	/*If on water, skip: */
 	if(onwater)return;
 
-	if (collapse){
-		/*Bail out element if collapsed (2d) and not on bed*/
+	if (approximation==MacAyealApproximationEnum){
+		/*Bail out element if MacAyeal (2d) and not on bed*/
 		if (!onbed) return;
 
@@ -4894,12 +4891,13 @@
 
 	/*Inputs*/
-	bool    collapsed,onbed;
+	bool onbed;
+	int  approximation;
 
 	/*Recover inputs*/
-	inputs->GetParameterValue(&collapsed,CollapseEnum);
 	inputs->GetParameterValue(&onbed,ElementOnBedEnum);
+	inputs->GetParameterValue(&approximation,ApproximationEnum);
 
 	/*MacAyeal, everything is done by the element on bed*/
-	if (collapsed){
+	if (approximation==MacAyealApproximationEnum){
 		if (!onbed){
 			/*Do nothing. Element on bed will take care of it*/
