Index: /issm/trunk-jpl/src/c/cores/depthaverage_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/cores/depthaverage_core.cpp	(revision 21071)
+++ /issm/trunk-jpl/src/c/cores/depthaverage_core.cpp	(revision 21072)
@@ -12,9 +12,24 @@
 void depthaverage_core(FemModel* femmodel){
 
-	if(VerboseSolution()) _printf0_("depth averaging...\n");
+	if(VerboseSolution()) _printf0_("depth averaging solution...\n");
 
-	/*Call on core computations: */
-	femmodel->SetCurrentConfiguration(DepthAverageAnalysisEnum);
-	solutionsequence_linear(femmodel);
+	/*Get parameters*/
+	femmodel->parameters->FindParam(&domaintype,DomainTypeEnum);
+	femmodel->parameters->FindParam(&elementtype,MeshElementtypeEnum);
 
+	/*If this is a 2D horizontal domain, return (no need to extrude)*/
+	if(domaintype==Domain2DhorizontalEnum) return;
+
+	/*Special method for Penta, otherwise call solution sequence*/
+	if(elementtype==PentaEnum){
+		int inputenum,input_average_enum;
+		femmodel->parameters->FindParam(&inputenum,InputToDepthaverageInEnum);
+		femmodel->parameters->FindParam(&input_average_enum,InputToDepthaverageOutEnum);
+		InputDepthAverageAtBasex(femmodel,inputenum,input_average_enum);
+	}
+	else{
+		/*Call on core computations: */
+		femmodel->SetCurrentConfiguration(DepthAverageAnalysisEnum);
+		solutionsequence_linear(femmodel);
+	}
 }
