Index: /issm/branches/trunk-jpl-damage/src/c/classes/objects/Elements/Penta.cpp
===================================================================
--- /issm/branches/trunk-jpl-damage/src/c/classes/objects/Elements/Penta.cpp	(revision 13103)
+++ /issm/branches/trunk-jpl-damage/src/c/classes/objects/Elements/Penta.cpp	(revision 13104)
@@ -1555,4 +1555,5 @@
 	/*Go through all the input objects, and find the one corresponding to enum_type, if it exists: */
 	if (enum_type==MaterialsRheologyBbarEnum) input=this->matice->inputs->GetInput(MaterialsRheologyBEnum);
+	else if (enum_type==MaterialsRheologyZbarEnum) input=this->matice->inputs->GetInput(MaterialsRheologyZEnum);
 	else input=this->inputs->GetInput(enum_type);
 	//if (!input) _error_("Input " << EnumToStringx(enum_type) << " not found in penta->inputs"); why error out? if the requested input does not exist, we should still 
@@ -1667,4 +1668,5 @@
 					break;
 				case MaterialsRheologyBbarEnum:
+				case MaterialsRheologyZbarEnum:
 					/*Matice will take care of it*/ break;
 				default:
@@ -3230,4 +3232,7 @@
 			*presponse=this->matice->GetBbar();
 			break;
+		case MaterialsRheologyZbarEnum:
+			*presponse=this->matice->GetZbar();
+			break;
 		case VelEnum:
 			{
@@ -4347,4 +4352,5 @@
 				for(i=0;i<numdof;i++) B[i]=B_average;
 				this->matice->inputs->AddInput(new PentaP1Input(MaterialsRheologyBEnum,B));
+				this->matice->inputs->AddInput(new PentaP1Input(MaterialsRheologyZEnum,B));
 				break;
 			case ArrheniusEnum:
@@ -4355,4 +4361,5 @@
 				for(i=0;i<numdof;i++) B[i]=B_average;
 				this->matice->inputs->AddInput(new PentaP1Input(MaterialsRheologyBEnum,B));
+				this->matice->inputs->AddInput(new PentaP1Input(MaterialsRheologyZEnum,B));
 				break;
 			default:
@@ -4425,4 +4432,5 @@
 				for(i=0;i<numdof;i++) B[i]=B_average;
 				this->matice->inputs->AddInput(new PentaP1Input(MaterialsRheologyBEnum,B));
+				this->matice->inputs->AddInput(new PentaP1Input(MaterialsRheologyZEnum,B));
 				break;
 			case ArrheniusEnum:
@@ -4433,4 +4441,5 @@
 				for(i=0;i<numdof;i++) B[i]=B_average;
 				this->matice->inputs->AddInput(new PentaP1Input(MaterialsRheologyBEnum,B));
+				this->matice->inputs->AddInput(new PentaP1Input(MaterialsRheologyZEnum,B));
 				break;
 			default:
@@ -4540,4 +4549,7 @@
 	this->InputDepthAverageAtBase(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum,MaterialsEnum);
 
+	/*Depth Averaging Z*/
+	this->InputDepthAverageAtBase(MaterialsRheologyZEnum,MaterialsRheologyZbarEnum,MaterialsEnum);
+
 	/*Call Tria function*/
 	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
@@ -4547,4 +4559,7 @@
 	/*Delete B averaged*/
 	this->matice->inputs->DeleteInput(MaterialsRheologyBbarEnum);
+
+	/*Delete Z averaged*/
+	this->matice->inputs->DeleteInput(MaterialsRheologyZbarEnum);
 
 	/*clean up and return*/
@@ -6304,4 +6319,7 @@
 	this->InputDepthAverageAtBase(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum,MaterialsEnum);
 
+	/*Depth Averaging Z*/
+	this->InputDepthAverageAtBase(MaterialsRheologyZEnum,MaterialsRheologyZbarEnum,MaterialsEnum);
+
 	/*Call Tria function*/
 	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
@@ -6311,4 +6329,7 @@
 	/*Delete B averaged*/
 	this->matice->inputs->DeleteInput(MaterialsRheologyBbarEnum);
+
+	/*Delete Z averaged*/
+	this->matice->inputs->DeleteInput(MaterialsRheologyZbarEnum);
 
 	/*clean up and return*/
@@ -7860,4 +7881,7 @@
 	this->InputDepthAverageAtBase(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum,MaterialsEnum);
 
+	/*Depth Averaging Z*/
+	this->InputDepthAverageAtBase(MaterialsRheologyZEnum,MaterialsRheologyZbarEnum,MaterialsEnum);
+
 	/*Call Tria function*/
 	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
@@ -7867,4 +7891,7 @@
 	/*Delete B averaged*/
 	this->matice->inputs->DeleteInput(MaterialsRheologyBbarEnum);
+
+	/*Delete Z averaged*/
+	this->matice->inputs->DeleteInput(MaterialsRheologyZbarEnum);
 
 	/*clean up and return*/
