Index: /issm/trunk/src/c/objects/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Penta.cpp	(revision 3488)
+++ /issm/trunk/src/c/objects/Penta.cpp	(revision 3489)
@@ -57,22 +57,8 @@
 
 	int j;
-	int offset;
 	int penta_node_ids[6];
 	int penta_matice_id;
 	int penta_matpar_id;
 	int penta_numpar_id;
-	double penta_h[6];
-	double penta_s[6];
-	double penta_b[6];
-	double penta_k[6];
-	double penta_melting[6];
-	double penta_accumulation[6];
-	int    penta_friction_type;
-	double penta_p,penta_q;
-	int    penta_shelf;
-	bool   penta_onwater;
-	int    penta_onsurface;
-	int    penta_onbed;
-	int    penta_collapse;
 
 	/*id: */
@@ -91,33 +77,13 @@
 	this->hmatpar.Init(&penta_matpar_id,1);
 	this->hnumpar.Init(&penta_numpar_id,1);
-
-	/*properties: */
-	for(j=0;j<6;j++){
-
-		offset=(int)*(iomodel->elements+6*i+j)-1; //get index of this vertex, in C numbering. 
-		penta_h[j]= *(iomodel->thickness+offset); 
-		penta_s[j]= *(iomodel->surface+offset); 
-		penta_b[j]=*(iomodel->bed+offset);
-		penta_k[j]=*(iomodel->drag+offset);
-		penta_melting[j]=*(iomodel->melting+offset);
-		penta_accumulation[j]=*(iomodel->accumulation+offset);
-	}
-	penta_friction_type=(int)iomodel->drag_type;
-	penta_p=iomodel->p[i];
-	penta_q=iomodel->q[i];
-	penta_shelf=(int)*(iomodel->elementoniceshelf+i);
-	penta_onbed=(bool)*(iomodel->elementonbed+i);
-	penta_onsurface=(int)*(iomodel->elementonsurface+i);
-	penta_onwater=(bool)*(iomodel->elementonwater+i);
-
-	if (*(iomodel->elements_type+2*i+0)==MacAyealFormulationEnum()){ //elements of type 3 are macayeal type penta. we collapse the formulation on their base.
-		penta_collapse=1;
+	this->properties.Init(6,penta_node_ids,this->id,iomodel);
+
+	//elements of type 3 are macayeal type penta. we collapse the formulation on their base.
+	if (*(iomodel->elements_type+2*i+0)==MacAyealFormulationEnum()){ 
+		this->properties.collapse=1;
 	}
 	else{
-		penta_collapse=0;
-	}
-
-	this->properties.Init(6,penta_h, penta_s, penta_b, penta_k, penta_melting, penta_accumulation, NULL, penta_friction_type, penta_p, penta_q, penta_shelf, penta_onbed, penta_onwater, penta_onsurface, penta_collapse, UNDEF);
-
+		this->properties.collapse=0;
+	}
 
 }
