Index: /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 23903)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 23904)
@@ -4350,20 +4350,21 @@
 	if(!HasNodeOnSurface()) return;
 
-	int extrusioninput;
-	int indices[2];
-	IssmDouble value;
+	int        extrusioninput;
+	IssmDouble value,isonsurface;
 
 	this->parameters->FindParam(&extrusioninput,InputToExtrudeEnum);
 	Input* input = inputs->GetInput(extrusioninput); _assert_(input);
-	this->EdgeOnSurfaceIndices(&indices[0],&indices[1]);
+	Input* onsurf = inputs->GetInput(MeshVertexonsurfaceEnum); _assert_(onsurf);
 
 	GaussTria* gauss=new GaussTria();
-	for(int i=0;i<2;i++){
-		gauss->GaussNode(P1Enum,indices[i]);
-		input->GetInputValue(&value,gauss);
-		this->nodes[indices[i]]->ApplyConstraint(0,value);
+	for(int iv=0;iv<this->NumberofNodes(this->element_type);iv++){
+		gauss->GaussNode(this->element_type,iv);
+		onsurf->GetInputValue(&isonsurface,gauss);
+		if(isonsurface==1.){
+			input->GetInputValue(&value,gauss);
+			this->nodes[iv]->ApplyConstraint(0,value);
+		}
 	}
 	delete gauss;
-
 }
 /*}}}*/
