Index: /issm/trunk/src/c/include/typedefs.h
===================================================================
--- /issm/trunk/src/c/include/typedefs.h	(revision 10142)
+++ /issm/trunk/src/c/include/typedefs.h	(revision 10143)
@@ -11,5 +11,4 @@
 #define SQRT3 1.732050807568877293527446341505872366942805253810380628055806979
 #define PI 3.141592653589793238462643383279502884197169399375105820974944592308
-#define YTS 365.0*24.0*3600.0
 
 #define NDOF1 1
@@ -18,3 +17,5 @@
 #define NDOF4 4
 
+#define DIM2 2
+#define DIM3 3
 #endif //ifndef _ISSMTYPEDEFS_H_
Index: /issm/trunk/src/c/modules/GroundingLineMigrationx/GroundingLineMigrationxUtils.cpp
===================================================================
--- /issm/trunk/src/c/modules/GroundingLineMigrationx/GroundingLineMigrationxUtils.cpp	(revision 10142)
+++ /issm/trunk/src/c/modules/GroundingLineMigrationx/GroundingLineMigrationxUtils.cpp	(revision 10143)
@@ -212,5 +212,5 @@
 	double* element_on_iceshelf=NULL;
 
-	/*Create  vector holding  all the elements IsOnShelf flags: */
+	/*Create  vector holding  all the elements IsFloating flags: */
 	vec_element_on_iceshelf=NewVec(elements->NumberOfElements(),true);
 
@@ -218,5 +218,5 @@
 	for(i=0;i<elements->Size();i++){
 		element=(Element*)elements->GetObjectByOffset(i);
-		VecSetValue(vec_element_on_iceshelf,element->Sid(),(int)element->IsOnShelf(),INSERT_VALUES);
+		VecSetValue(vec_element_on_iceshelf,element->Sid(),(int)element->IsFloating(),INSERT_VALUES);
 	}
 
@@ -248,5 +248,5 @@
 	VecToMPISerial(&nodes_on_iceshelf,vec_nodes_on_iceshelf);
 
-	/*Create  vector holding  all the elements IsOnShelf flags: */
+	/*Create  vector holding  all the elements IsFloating flags: */
 	vec_element_touching_iceshelf=NewVec(elements->NumberOfElements(),true);
 
@@ -339,5 +339,5 @@
 		node=(Node*)nodes->GetObjectByOffset(i);
 		if(node->InAnalysis(configuration_type)){
-			if(node->IsOnShelf()){
+			if(node->IsFloating()){
 				VecSetValue(nodes_on_iceshelf,node->Sid(),1.0,INSERT_VALUES);
 			}
Index: /issm/trunk/src/c/objects/Elements/Element.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Element.h	(revision 10142)
+++ /issm/trunk/src/c/objects/Elements/Element.h	(revision 10143)
@@ -33,5 +33,5 @@
 		virtual int    GetNodeIndex(Node* node)=0;
 		virtual int    Sid()=0;
-		virtual bool   IsOnShelf()=0; 
+		virtual bool   IsFloating()=0; 
 		virtual bool   IsNodeOnShelf()=0; 
 		virtual bool   IsNodeOnShelfFromFlags(double* flags)=0; 
Index: /issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 10142)
+++ /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 10143)
@@ -360,5 +360,5 @@
 
 	/* Basal friction can only be found at the base of an ice sheet: */
-	if (!IsOnBed() || IsOnShelf()){
+	if (!IsOnBed() || IsFloating()){
 		//empty friction: 
 		this->inputs->AddInput(new PentaVertexInput(BasalFrictionEnum,&basalfriction[0]));
@@ -1785,5 +1785,5 @@
 	for(i=0;i<numdof;i++) {
 		/*If shelf: hydrostatic equilibrium*/
-		if (this->nodes[i]->IsOnSheet()){
+		if (this->nodes[i]->IsGrounded()){
 			newsurface[i]=oldbed[i]+newthickness[i]; //surface = oldbed + newthickness
 			newbed[i]=oldbed[i];               //same bed: do nothing
@@ -1963,6 +1963,6 @@
 }
 /*}}}*/
-/*FUNCTION Penta::IsOnShelf {{{1*/
-bool   Penta::IsOnShelf(){
+/*FUNCTION Penta::IsFloating{{{1*/
+bool   Penta::IsFloating(){
 
 	bool onshelf;
@@ -1978,5 +1978,5 @@
 
 	for(i=0;i<6;i++){
-		if (nodes[i]->IsOnShelf()){
+		if (nodes[i]->IsFloating()){
 			shelf=true;
 			break;
@@ -3093,5 +3093,5 @@
 
 	/*Initialize Element matrix and return if necessary*/
-	if (!IsOnBed() || !IsOnShelf()) return NULL;
+	if (!IsOnBed() || !IsFloating()) return NULL;
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
 
@@ -3328,5 +3328,5 @@
 
 	/*Initialize Element matrix and return if necessary*/
-	if (!IsOnBed() || !IsOnShelf()) return NULL;
+	if (!IsOnBed() || !IsFloating()) return NULL;
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
 
@@ -3487,5 +3487,5 @@
 
 	/* Ice/ocean heat exchange flux on ice shelf base */
-	if (!IsOnBed() || !IsOnShelf()) return NULL;
+	if (!IsOnBed() || !IsFloating()) return NULL;
 
 	/*Retrieve all inputs and parameters*/
@@ -3543,5 +3543,5 @@
 
 	/* Geothermal flux on ice sheet base and basal friction */
-	if (!IsOnBed() || IsOnShelf()) return NULL;
+	if (!IsOnBed() || IsFloating()) return NULL;
 
 	/*Initialize Element vector*/
@@ -3715,5 +3715,5 @@
 
 	/* Ice/ocean heat exchange flux on ice shelf base */
-	if (!IsOnBed() || !IsOnShelf()) return NULL;
+	if (!IsOnBed() || !IsFloating()) return NULL;
 
 	/*Initialize Element vector*/
@@ -3774,5 +3774,5 @@
 
 	/* Geothermal flux on ice sheet base and basal friction */
-	if (!IsOnBed() || IsOnShelf()) return NULL;
+	if (!IsOnBed() || IsFloating()) return NULL;
 
 	/*Initialize Element vector*/
@@ -4244,5 +4244,5 @@
 
 	/*Gradient is 0 if on shelf or not on bed*/
-	if(IsOnShelf() || !IsOnBed()) return;
+	if(IsFloating() || !IsOnBed()) return;
 
 	/*Spawn tria*/
@@ -4270,5 +4270,5 @@
 
 	/*Gradient is 0 if on shelf or not on bed*/
-	if(IsOnShelf() || !IsOnBed()) return;
+	if(IsFloating() || !IsOnBed()) return;
 
 	/*Retrieve all inputs and parameters*/
@@ -4343,5 +4343,5 @@
 
 	/*Gradient is 0 if on shelf or not on bed*/
-	if(IsOnShelf() || !IsOnBed()) return;
+	if(IsFloating() || !IsOnBed()) return;
 
 	/*Retrieve all inputs and parameters*/
@@ -4803,5 +4803,5 @@
 
 	/*If on water, on shelf or not on bed, skip: */
-	if(IsOnWater()|| IsOnShelf() || !IsOnBed()) return 0;
+	if(IsOnWater()|| IsFloating() || !IsOnBed()) return 0;
 
 	tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria
@@ -4870,5 +4870,5 @@
 
 					/*build new bed and surface: */
-					if (this->IsOnShelf()){
+					if (this->IsFloating()){
 						/*hydrostatic equilibrium: */
 						double rho_ice,rho_water,di;
@@ -5101,5 +5101,5 @@
 
 	/*Initialize Element matrix and return if necessary*/
-	if(IsOnShelf() || !IsOnBed()) return NULL;
+	if(IsFloating() || !IsOnBed()) return NULL;
 	ElementMatrix* Ke1=new ElementMatrix(nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
 	ElementMatrix* Ke2=new ElementMatrix(nodes,NUMVERTICES,this->parameters,PattynApproximationEnum);
@@ -5297,5 +5297,5 @@
 	/*If on water or not Stokes, skip stiffness: */
 	inputs->GetInputValue(&approximation,ApproximationEnum);
-	if(IsOnShelf() || !IsOnBed()) return NULL;
+	if(IsFloating() || !IsOnBed()) return NULL;
 	ElementMatrix* Ke1=new ElementMatrix(this->nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
 	ElementMatrix* Ke2=new ElementMatrix(this->nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
@@ -5617,5 +5617,5 @@
 
 	/*Initialize Element matrix and return if necessary*/
-	if(IsOnShelf() || !IsOnBed()) return NULL;
+	if(IsFloating() || !IsOnBed()) return NULL;
 
 	/*Build a tria element using the 3 nodes of the base of the penta. Then use 
@@ -5761,5 +5761,5 @@
 
 	/*Initialize Element matrix and return if necessary*/
-	if(IsOnShelf() || !IsOnBed()) return NULL;
+	if(IsFloating() || !IsOnBed()) return NULL;
 
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,PattynApproximationEnum);
@@ -5927,5 +5927,5 @@
 	/*If on water or not Stokes, skip stiffness: */
 	inputs->GetInputValue(&approximation,ApproximationEnum);
-	if(IsOnShelf() || !IsOnBed() || (approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum &&  approximation!=PattynStokesApproximationEnum)) return NULL;
+	if(IsFloating() || !IsOnBed() || (approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum &&  approximation!=PattynStokesApproximationEnum)) return NULL;
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
 
@@ -6189,5 +6189,5 @@
 
 	/*Initialize Element vector and return if necessary*/
-	if(!IsOnBed() || IsOnShelf()) return NULL;
+	if(!IsOnBed() || IsFloating()) return NULL;
 	inputs->GetInputValue(&approximation,ApproximationEnum);
 	if(approximation!=MacAyealStokesApproximationEnum) return NULL;
@@ -6334,5 +6334,5 @@
 
 	/*Initialize Element vector and return if necessary*/
-	if(!IsOnBed() || IsOnShelf()) return NULL;
+	if(!IsOnBed() || IsFloating()) return NULL;
 	inputs->GetInputValue(&approximation,ApproximationEnum);
 	if(approximation!=PattynStokesApproximationEnum) return NULL;
@@ -6714,5 +6714,5 @@
 
 	/*Initialize Element vector and return if necessary*/
-	if(!IsOnBed() || !IsOnShelf()) return NULL;
+	if(!IsOnBed() || !IsFloating()) return NULL;
 	inputs->GetInputValue(&approximation,ApproximationEnum);
 	this->parameters->FindParam(&shelf_dampening,DiagnosticShelfDampeningEnum);
Index: /issm/trunk/src/c/objects/Elements/Penta.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.h	(revision 10142)
+++ /issm/trunk/src/c/objects/Elements/Penta.h	(revision 10143)
@@ -191,6 +191,6 @@
 		bool	  IsOnSurface(void);
 		bool	  IsOnBed(void);
-		bool    IsOnShelf(void); 
-		bool    IsNodeOnShelf(void); 
+		bool    IsFloating(void); 
+		bool    IsNodeOnShelf(); 
 		bool    IsNodeOnShelfFromFlags(double* flags);
 		bool    IsOnWater(void); 
Index: /issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 10142)
+++ /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 10143)
@@ -306,5 +306,5 @@
 	/*go through vertices, and update inputs, considering them to be TriaVertex type: */
 	for(i=0;i<3;i++){
-		if (nodes[i]->IsOnShelf()){
+		if (nodes[i]->IsFloating()){
 			/*This node is on the shelf. See if its bed is going under the bathymetry: */
 			if(b[i]<=ba[i]){ //<= because Neff being 0 when b=ba, drag will be 0 anyway.
@@ -1683,5 +1683,5 @@
 	for(i=0;i<numdof;i++) {
 		/*If shelf: hydrostatic equilibrium*/
-		if (this->nodes[i]->IsOnSheet()){
+		if (this->nodes[i]->IsGrounded()){
 			newsurface[i]=oldbed[i]+newthickness[i]; //surface = oldbed + newthickness
 			newbed[i]=oldbed[i];               //same bed: do nothing
@@ -1895,5 +1895,5 @@
 /*}}}*/
 /*FUNCTION Tria::IsOnShelf {{{1*/
-bool   Tria::IsOnShelf(){
+bool   Tria::IsFloating(){
 
 	bool shelf;
@@ -1909,5 +1909,5 @@
 
 	for(i=0;i<3;i++){
-		if (nodes[i]->IsOnShelf()){
+		if (nodes[i]->IsFloating()){
 			shelf=true;
 			break;
@@ -1991,5 +1991,5 @@
 	GetInputListOnVertices(&ba[0],BathymetryEnum);
 	for(i=0;i<3;i++){
-		isonshelf[i]=nodes[i]->IsOnShelf();
+		isonshelf[i]=nodes[i]->IsFloating();
 		if((nodes[i]->Sid()+1)==36)printf("MigrateGroundingLine: El %i Node %i shelf status %i\n",this->Id(),nodes[i]->Sid()+1,isonshelf[i]);
 	}
@@ -2032,5 +2032,5 @@
 	this->inputs->AddInput(new TriaVertexInput(BedEnum,&b[0]));
 	
-	for(i=0;i<3;i++) isonshelf[i]=nodes[i]->IsOnShelf();
+	for(i=0;i<3;i++) isonshelf[i]=nodes[i]->IsFloating();
 }
 /*}}}*/
@@ -2120,5 +2120,5 @@
 	/*go through vertices, and figure out which ones are on the ice sheet, and want to unground: */
 	for(i=0;i<3;i++){
-		if (!nodes[i]->IsOnShelf()){
+		if (!nodes[i]->IsFloating()){
 			
 			/*This node is on the sheet, near the grounding line. See if wants to unground. To 
@@ -2230,10 +2230,10 @@
 	elementonshelf=false;
 	for(i=0;i<NUMVERTICES;i++){
-		if(nodes[i]->IsOnShelf()){
+		if(nodes[i]->IsFloating()){
 			elementonshelf=true;
 			break;
 		}
 	}
-	if(!this->IsOnShelf() && elementonshelf==true)swap=1;
+	if(!this->IsFloating() && elementonshelf==true)swap=1;
     this->inputs->AddInput(new BoolInput(MaskElementonfloatingiceEnum,elementonshelf));
 	
@@ -2268,5 +2268,5 @@
 	/*go through vertices, and update inputs, considering them to be TriaVertex type: */
 	for(i=0;i<3;i++){
-		if (nodes[i]->IsOnShelf()){
+		if (nodes[i]->IsFloating()){
 			/*This node is on the shelf. See if its bed is going under the bathymetry: */
 			if(b[i]<=ba[i]){ //<= because Neff being 0 when b=ba, drag will be 0 anyway.
@@ -2544,5 +2544,5 @@
 	/*Initialize current status of nodes: */
 	for(i=0;i<3;i++){
-		shelfstatus[i]=nodes[i]->IsOnShelf();
+		shelfstatus[i]=nodes[i]->IsFloating();
 		if((nodes[i]->Sid()+1)==36) printf("UpdateShelfStatus: El %i Node %i shelf status %i\n",this->Id(),nodes[i]->Sid()+1,shelfstatus[i]);
 	}
@@ -2574,5 +2574,5 @@
 	elementonshelf=false;
 	for(i=0;i<3;i++){
-		if(nodes[i]->IsOnShelf()){
+		if(nodes[i]->IsFloating()){
 			elementonshelf=true;
 			break;
@@ -2999,5 +2999,5 @@
 
 	/*Initialize Element matrix and return if necessary*/
-	if(IsOnShelf()) return NULL;
+	if(IsFloating()) return NULL;
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
 
@@ -3632,5 +3632,5 @@
 	GaussTria  *gauss=NULL;
 
-	if(IsOnShelf())return;
+	if(IsFloating())return;
 
 	/*retrive parameters: */
@@ -3715,5 +3715,5 @@
 
 	/*Retrieve all inputs we will be needing: */
-	if(IsOnShelf())return;
+	if(IsFloating())return;
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
 	GetDofList1(&doflist1[0]);
@@ -5153,5 +5153,5 @@
 
 					/*build new bed and surface: */
-					if (this->IsOnShelf()){
+					if (this->IsFloating()){
 						/*hydrostatic equilibrium: */
 						double rho_ice,rho_water,di;
Index: /issm/trunk/src/c/objects/Elements/Tria.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.h	(revision 10142)
+++ /issm/trunk/src/c/objects/Elements/Tria.h	(revision 10143)
@@ -85,5 +85,5 @@
 		int    Sid();
 		bool   IsOnBed();
-		bool   IsOnShelf(); 
+		bool   IsFloating(); 
 		bool   IsNodeOnShelf(); 
 		bool   IsNodeOnShelfFromFlags(double* flags);
Index: /issm/trunk/src/c/objects/Node.cpp
===================================================================
--- /issm/trunk/src/c/objects/Node.cpp	(revision 10142)
+++ /issm/trunk/src/c/objects/Node.cpp	(revision 10143)
@@ -745,6 +745,6 @@
 }
 /*}}}*/
-/*FUNCTION Node::IsOnSheet {{{1*/
-int   Node::IsOnSheet(){
+/*FUNCTION Node::IsGrounded {{{1*/
+int   Node::IsGrounded(){
 
 	bool onsheet;
@@ -756,6 +756,6 @@
 }		
 /*}}}*/
-/*FUNCTION Node::IsOnShelf {{{1*/
-int   Node::IsOnShelf(){
+/*FUNCTION Node::IsFloating {{{1*/
+int   Node::IsFloating(){
 	
 	bool onshelf;
Index: /issm/trunk/src/c/objects/Node.h
===================================================================
--- /issm/trunk/src/c/objects/Node.h	(revision 10142)
+++ /issm/trunk/src/c/objects/Node.h	(revision 10143)
@@ -94,6 +94,6 @@
 		int   IsOnSurface();
 		void  FreezeDof(int dof);
-		int   IsOnShelf();
-		int   IsOnSheet();
+		int   IsFloating();
+		int   IsGrounded();
 		void  UpdateSpcs(double* ys);
 		void  VecMerge(Vec ug, double* vector_serial,int setnum);
