Index: /issm/trunk-jpl/src/c/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/c/Makefile.am	(revision 24934)
+++ /issm/trunk-jpl/src/c/Makefile.am	(revision 24935)
@@ -320,4 +320,5 @@
 	./classes/Inputs2/Inputs2.cpp \
 	./classes/Inputs2/BoolInput2.cpp \
+	./classes/Inputs2/DoubleInput2.cpp \
 	./classes/Inputs2/IntInput2.cpp \
 	./classes/Inputs2/ElementInput2.cpp \
Index: /issm/trunk-jpl/src/c/classes/Elements/Element.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Element.cpp	(revision 24934)
+++ /issm/trunk-jpl/src/c/classes/Elements/Element.cpp	(revision 24935)
@@ -1189,4 +1189,9 @@
 }/*}}}*/
 void       Element::GetInput2Value(int* pvalue,int inputenum){/*{{{*/
+
+	this->inputs2->GetInputValue(pvalue,inputenum,this->lid);
+
+}/*}}}*/
+void       Element::GetInput2Value(IssmDouble* pvalue,int inputenum){/*{{{*/
 
 	this->inputs2->GetInputValue(pvalue,inputenum,this->lid);
Index: /issm/trunk-jpl/src/c/classes/Elements/Element.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Element.h	(revision 24934)
+++ /issm/trunk-jpl/src/c/classes/Elements/Element.h	(revision 24935)
@@ -102,4 +102,5 @@
 		void               GetInput2Value(bool* pvalue,int enum_type);
 		void               GetInput2Value(int* pvalue,int enum_type);
+		void               GetInput2Value(IssmDouble* pvalue,int enum_type);
 		void               GetInputValue(IssmDouble* pvalue,Gauss* gauss,int enum_type);
 		Node*              GetNode(int nodeindex);
Index: /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 24934)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 24935)
@@ -5584,8 +5584,4 @@
 	bool computerigid = true;
 
-	/*recover computational flags: */
-	this->parameters->FindParam(&computerigid,SealevelriseRigidEnum);
-	if(!computerigid) return; //we are running eustatic solution only.
-
 	/*how many dofs are we working with here? */
 	this->parameters->FindParam(&gsize,MeshNumberofverticesEnum);
@@ -5650,4 +5646,7 @@
 	/*Add in inputs:*/
     this->inputs2->SetArrayInput(SealevelriseIndicesEnum,this->lid,indices,gsize);
+
+	/*Another quantity, area:*/
+	this->inputs2->SetDoubleInput(AreaEnum,this->lid,GetAreaSpherical());
 
 	return;
@@ -5741,5 +5740,5 @@
 	this->parameters->FindParam(&scaleoceanarea,SealevelriseOceanAreaScalingEnum);
 
-	/*recover elastic green function:*/
+	/*recover precomputed green function kernels:*/
 	DoubleVecParam* parameter = static_cast<DoubleVecParam*>(this->parameters->FindParamObject(SealevelriseGRigidEnum)); _assert_(parameter);
 	parameter->GetParameterValueByPointer(&G_rigid_precomputed,&M);
@@ -5756,6 +5755,7 @@
 	if(computerigid){this->inputs2->GetArrayPtr(SealevelriseIndicesEnum,this->lid,&indices,&dummy); _assert_(dummy==gsize);}
 
-	/*Compute area of element. Scale it by grounded fraction if not fully grounded: */
-	area=GetAreaSpherical();
+	/*Get area of element: precomputed in the sealevelrise_core_geometry:*/
+	this->GetInput2Value(&area,AreaEnum);
+
 	if(notfullygrounded){
 		IssmDouble phi=0;
@@ -5925,6 +5925,6 @@
 	/*}}}*/
 
-	/*Compute area of element. For now, we dont do partially grounded elements:*/
-	area=GetAreaSpherical();
+	/*Get area of element: precomputed in the sealevelrise_core_geometry:*/
+	this->GetInput2Value(&area,AreaEnum);
 
 	/*Compute bottom pressure change: */
@@ -6037,6 +6037,6 @@
 	S=0; for(int i=0;i<NUMVERTICES;i++) S+=Sg_old[this->vertices[i]->Sid()]/NUMVERTICES;
 
-	/*Compute area of element:*/
-	area=GetAreaSpherical();
+	/*Get area of element: precomputed in the sealevelrise_core_geometry:*/
+	this->GetInput2Value(&area,AreaEnum);
 
 	/*recover rigid and elastic green functions:*/
@@ -6140,6 +6140,6 @@
 	if(computerigid){this->inputs2->GetArrayPtr(SealevelriseIndicesEnum,this->lid,&indices,&dummy); _assert_(dummy==gsize);}
 
-	/*compute area of element:*/
-	area=GetAreaSpherical();
+	/*Get area of element: precomputed in the sealevelrise_core_geometry:*/
+	this->GetInput2Value(&area,AreaEnum);
 
 	/*figure out gravity center of our element (Cartesian): */
@@ -6184,4 +6184,8 @@
 	IssmDouble N_azim, E_azim;
 
+	/*we are going to use the result of these masks a lot: */
+	bool isiceonlyinelement=IsIceOnlyInElement();
+	bool isoceaninelement=IsOceanInElement();
+
 	for(int i=0;i<gsize;i++){
 
@@ -6215,5 +6219,5 @@
 
 		/*Add all components to the pUp solution vectors:*/
-		if(IsIceOnlyInElement()){
+		if(isiceonlyinelement){
 			Up[i]+=3*rho_ice/rho_earth*area/eartharea*I*U_elastic[i];
 			if(horiz){
@@ -6222,5 +6226,5 @@
 			}
 		}
-		else if(IsOceanInElement()) {
+		else if(isoceaninelement){
 			Up[i]+=3*rho_water/rho_earth*area/eartharea*S*U_elastic[i];
 			if(horiz){
Index: /issm/trunk-jpl/src/c/classes/Inputs2/DoubleInput2.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs2/DoubleInput2.cpp	(revision 24935)
+++ /issm/trunk-jpl/src/c/classes/Inputs2/DoubleInput2.cpp	(revision 24935)
@@ -0,0 +1,96 @@
+/*!\file DoubleInput2.c
+ * \brief: implementation of the DoubleInput2 object
+ */
+
+#ifdef HAVE_CONFIG_H
+	#include <config.h>
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "../classes.h"
+#include "../../shared/shared.h"
+#include "./DoubleInput2.h"
+
+/*DoubleInput2 constructors and destructor*/
+DoubleInput2::DoubleInput2(){/*{{{*/
+	this->size   = -1;
+	this->values = NULL;
+}
+/*}}}*/
+DoubleInput2::DoubleInput2(int size_in){/*{{{*/
+	_assert_(size_in>0);
+	_assert_(size_in<1e11);
+	this->size   = size_in;
+	this->values = xNew<IssmDouble>(size_in);
+}
+/*}}}*/
+DoubleInput2::~DoubleInput2(){/*{{{*/
+	xDelete<IssmDouble>(this->values);
+}
+/*}}}*/
+
+/*Object virtual functions definitions:*/
+Input2* DoubleInput2::copy() {/*{{{*/
+
+	DoubleInput2* output = new DoubleInput2(this->size);
+	xMemCpy<IssmDouble>(output->values,this->values,this->size);
+
+	return output;
+}
+/*}}}*/
+void DoubleInput2::DeepEcho(void){/*{{{*/
+
+	_printf_("DoubleInput2 Echo:\n");
+	_printf_("   Size:          "<<size<<"\n");
+	printarray(this->values,this->size);
+	//_printf_(setw(15)<<"   DoubleInput2 "<<setw(25)<<left<<EnumToStringx(this->enum_type)<<" "<<(value?"true":"false") << "\n");
+}
+/*}}}*/
+void DoubleInput2::Echo(void){/*{{{*/
+	this->DeepEcho();
+}
+/*}}}*/
+int  DoubleInput2::Id(void){ return -1; }/*{{{*/
+/*}}}*/
+void DoubleInput2::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/
+
+	MARSHALLING_ENUM(DoubleInput2Enum);
+
+	MARSHALLING(this->size);
+	if(this->size > 0){
+		MARSHALLING_DYNAMIC(this->values,IssmDouble,this->size)
+	}
+	else this->values = NULL;
+
+}
+/*}}}*/
+int  DoubleInput2::ObjectEnum(void){/*{{{*/
+
+	return DoubleInput2Enum;
+
+}
+/*}}}*/
+
+/*DoubleInput2 management*/
+void DoubleInput2::GetInput(IssmDouble* pvalue,int index){/*{{{*/
+
+	if(index<0){
+		printf("-------------- file: DoubleInput2.cpp line: %g\n",__LINE__); 
+	}
+	_assert_(index>=0); 
+	_assert_(index<this->size); 
+
+	*pvalue = this->values[index];
+}
+/*}}}*/
+void DoubleInput2::SetInput(int index,IssmDouble value){/*{{{*/
+
+	_assert_(index>=0); 
+	_assert_(index<this->size); 
+
+	this->values[index] = value;
+}
+/*}}}*/
+
+/*Object functions*/
Index: /issm/trunk-jpl/src/c/classes/Inputs2/DoubleInput2.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs2/DoubleInput2.h	(revision 24935)
+++ /issm/trunk-jpl/src/c/classes/Inputs2/DoubleInput2.h	(revision 24935)
@@ -0,0 +1,33 @@
+#ifndef _DOUBLEINPUT2_H_
+#define _DOUBLEINPUT2_H_
+
+/*Headers:*/
+#include "./Input2.h"
+
+class DoubleInput2: public Input2{
+
+	private:
+		int   size;
+		IssmDouble*  values;
+
+	public:
+		/*DoubleInput2 constructors, destructors: {{{*/
+		DoubleInput2();
+		DoubleInput2(int size_in);
+		~DoubleInput2();
+		/*}}}*/
+		/*Object virtual functions definitions:{{{ */
+		Input2 *copy();
+		void    DeepEcho();
+		void    Echo();
+		int     Id();
+		void    Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);
+		int     ObjectEnum();
+		/*}}}*/
+		/*DoubleInput2 management: {{{*/
+		void GetInput(IssmDouble* pvalue,int index);
+		void SetInput(int index,IssmDouble value);
+		/*}}}*/
+
+};
+#endif  /* _BOOLINPUT_H */
Index: /issm/trunk-jpl/src/c/classes/Inputs2/Inputs2.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs2/Inputs2.cpp	(revision 24934)
+++ /issm/trunk-jpl/src/c/classes/Inputs2/Inputs2.cpp	(revision 24935)
@@ -15,4 +15,5 @@
 #include "./BoolInput2.h"
 #include "./IntInput2.h"
+#include "./DoubleInput2.h"
 #include "./ElementInput2.h"
 #include "./SegInput2.h"
@@ -518,4 +519,23 @@
 	input->GetInput(pvalue,index);
 }/*}}}*/
+void Inputs2::GetInputValue(IssmDouble* pvalue,int enum_in,int index){/*{{{*/
+
+	/*Get input id*/
+	int id = EnumToIndex(enum_in);
+
+	/*Create it if necessary*/
+	if(this->inputs[id]){
+		if(this->inputs[id]->ObjectEnum()!=DoubleInput2Enum) _error_(EnumToStringx(this->inputs[id]->ObjectEnum())<<" cannot return a int");
+	}
+	else{
+		int* temp = xNew<int>(3);
+		_error_("Input "<<EnumToStringx(enum_in)<<" not found");
+	}
+
+	/*Set input*/
+	DoubleInput2* input = xDynamicCast<DoubleInput2*>(this->inputs[id]);
+	input->GetInput(pvalue,index);
+
+}/*}}}*/
 void Inputs2::ResultInterpolation(int* pinterpolation,int* pnodesperelement,int* parray_size, int output_enum){/*{{{*/
 
@@ -568,4 +588,21 @@
 	input->SetInput(index,value);
 }/*}}}*/
+void Inputs2::SetDoubleInput(int enum_in,int index,IssmDouble value){/*{{{*/
+
+	/*Get input id*/
+	int id = EnumToIndex(enum_in);
+
+	/*Create it if necessary*/
+	if(this->inputs[id]){
+		if(this->inputs[id]->ObjectEnum()!=DoubleInput2Enum) _error_("cannot add a double to a "<<EnumToStringx(this->inputs[id]->ObjectEnum()));
+	}
+	else{
+		this->inputs[id] = new DoubleInput2(this->numberofelements_local);
+	}
+
+	/*Set input*/
+	DoubleInput2* input = xDynamicCast<DoubleInput2*>(this->inputs[id]);
+	input->SetInput(index,value);
+}/*}}}*/
 void Inputs2::SetArrayInput(int enum_in,int row,IssmDouble* values,int numlayers){/*{{{*/
 
Index: /issm/trunk-jpl/src/c/classes/Inputs2/Inputs2.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs2/Inputs2.h	(revision 24934)
+++ /issm/trunk-jpl/src/c/classes/Inputs2/Inputs2.h	(revision 24935)
@@ -66,7 +66,9 @@
 		void  GetInputValue(bool* pvalue,int enum_in,int index);
 		void  GetInputValue(int*  pvalue,int enum_in,int index);
+		void  GetInputValue(IssmDouble*  pvalue,int enum_in,int index);
 		void  ResultInterpolation(int* pinterpolation,int*nodesperelement,int* parray_size, int output_enum);
 		void  SetInput(int enum_in,int index,bool value);
 		void  SetInput(int enum_in,int index,int value);
+		void  SetDoubleInput(int enum_in,int index,IssmDouble value);
 		void  SetTransientInput(int enum_in,IssmDouble* times,int numtimes);
 		TransientInput2* SetDatasetTransientInput(int enum_in,int id,IssmDouble* times,int numtimes);
Index: /issm/trunk-jpl/src/c/shared/Enum/Enum.vim
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/Enum.vim	(revision 24934)
+++ /issm/trunk-jpl/src/c/shared/Enum/Enum.vim	(revision 24935)
@@ -804,4 +804,5 @@
 syn keyword cConstant SurfaceAbsMisfitEnum
 syn keyword cConstant SurfaceAbsVelMisfitEnum
+syn keyword cConstant AreaEnum
 syn keyword cConstant SurfaceAreaEnum
 syn keyword cConstant SurfaceAverageVelMisfitEnum
@@ -979,4 +980,5 @@
 syn keyword cConstant BoolInput2Enum
 syn keyword cConstant IntInput2Enum
+syn keyword cConstant DoubleInput2Enum
 syn keyword cConstant BoolParamEnum
 syn keyword cConstant BoundaryEnum
@@ -1353,4 +1355,5 @@
 syn keyword cType Definition
 syn keyword cType DependentObject
+syn keyword cType DoubleInput2
 syn keyword cType DoubleMatArrayParam
 syn keyword cType DoubleMatParam
Index: /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 24934)
+++ /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 24935)
@@ -802,4 +802,5 @@
 	SurfaceAbsMisfitEnum,
 	SurfaceAbsVelMisfitEnum,
+	AreaEnum,
 	SurfaceAreaEnum,
 	SurfaceAverageVelMisfitEnum,
@@ -979,4 +980,5 @@
 	BoolInput2Enum,
 	IntInput2Enum,
+	DoubleInput2Enum,
 	BoolParamEnum,
 	BoundaryEnum,
Index: /issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 24934)
+++ /issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 24935)
@@ -806,4 +806,5 @@
 		case SurfaceAbsMisfitEnum : return "SurfaceAbsMisfit";
 		case SurfaceAbsVelMisfitEnum : return "SurfaceAbsVelMisfit";
+		case AreaEnum : return "Area";
 		case SurfaceAreaEnum : return "SurfaceArea";
 		case SurfaceAverageVelMisfitEnum : return "SurfaceAverageVelMisfit";
@@ -981,4 +982,5 @@
 		case BoolInput2Enum : return "BoolInput2";
 		case IntInput2Enum : return "IntInput2";
+		case DoubleInput2Enum : return "DoubleInput2";
 		case BoolParamEnum : return "BoolParam";
 		case BoundaryEnum : return "Boundary";
Index: /issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 24934)
+++ /issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 24935)
@@ -824,4 +824,5 @@
 	      else if (strcmp(name,"SurfaceAbsMisfit")==0) return SurfaceAbsMisfitEnum;
 	      else if (strcmp(name,"SurfaceAbsVelMisfit")==0) return SurfaceAbsVelMisfitEnum;
+	      else if (strcmp(name,"Area")==0) return AreaEnum;
 	      else if (strcmp(name,"SurfaceArea")==0) return SurfaceAreaEnum;
 	      else if (strcmp(name,"SurfaceAverageVelMisfit")==0) return SurfaceAverageVelMisfitEnum;
@@ -874,9 +875,9 @@
 	      else if (strcmp(name,"Outputdefinition12")==0) return Outputdefinition12Enum;
 	      else if (strcmp(name,"Outputdefinition13")==0) return Outputdefinition13Enum;
-	      else if (strcmp(name,"Outputdefinition14")==0) return Outputdefinition14Enum;
          else stage=8;
    }
    if(stage==8){
-	      if (strcmp(name,"Outputdefinition15")==0) return Outputdefinition15Enum;
+	      if (strcmp(name,"Outputdefinition14")==0) return Outputdefinition14Enum;
+	      else if (strcmp(name,"Outputdefinition15")==0) return Outputdefinition15Enum;
 	      else if (strcmp(name,"Outputdefinition16")==0) return Outputdefinition16Enum;
 	      else if (strcmp(name,"Outputdefinition17")==0) return Outputdefinition17Enum;
@@ -997,12 +998,13 @@
 	      else if (strcmp(name,"BasalforcingsPico")==0) return BasalforcingsPicoEnum;
 	      else if (strcmp(name,"BeckmannGoosseFloatingMeltRate")==0) return BeckmannGoosseFloatingMeltRateEnum;
-	      else if (strcmp(name,"BedSlopeSolution")==0) return BedSlopeSolutionEnum;
          else stage=9;
    }
    if(stage==9){
-	      if (strcmp(name,"BoolExternalResult")==0) return BoolExternalResultEnum;
+	      if (strcmp(name,"BedSlopeSolution")==0) return BedSlopeSolutionEnum;
+	      else if (strcmp(name,"BoolExternalResult")==0) return BoolExternalResultEnum;
 	      else if (strcmp(name,"BoolInput")==0) return BoolInputEnum;
 	      else if (strcmp(name,"BoolInput2")==0) return BoolInput2Enum;
 	      else if (strcmp(name,"IntInput2")==0) return IntInput2Enum;
+	      else if (strcmp(name,"DoubleInput2")==0) return DoubleInput2Enum;
 	      else if (strcmp(name,"BoolParam")==0) return BoolParamEnum;
 	      else if (strcmp(name,"Boundary")==0) return BoundaryEnum;
@@ -1119,10 +1121,10 @@
 	      else if (strcmp(name,"IceMass")==0) return IceMassEnum;
 	      else if (strcmp(name,"IceMassScaled")==0) return IceMassScaledEnum;
-	      else if (strcmp(name,"IceVolumeAboveFloatation")==0) return IceVolumeAboveFloatationEnum;
-	      else if (strcmp(name,"IceVolumeAboveFloatationScaled")==0) return IceVolumeAboveFloatationScaledEnum;
          else stage=10;
    }
    if(stage==10){
-	      if (strcmp(name,"IceVolume")==0) return IceVolumeEnum;
+	      if (strcmp(name,"IceVolumeAboveFloatation")==0) return IceVolumeAboveFloatationEnum;
+	      else if (strcmp(name,"IceVolumeAboveFloatationScaled")==0) return IceVolumeAboveFloatationScaledEnum;
+	      else if (strcmp(name,"IceVolume")==0) return IceVolumeEnum;
 	      else if (strcmp(name,"IceVolumeScaled")==0) return IceVolumeScaledEnum;
 	      else if (strcmp(name,"IcefrontMassFlux")==0) return IcefrontMassFluxEnum;
@@ -1242,10 +1244,10 @@
 	      else if (strcmp(name,"Penpair")==0) return PenpairEnum;
 	      else if (strcmp(name,"Penta")==0) return PentaEnum;
-	      else if (strcmp(name,"PentaInput")==0) return PentaInputEnum;
-	      else if (strcmp(name,"Profiler")==0) return ProfilerEnum;
          else stage=11;
    }
    if(stage==11){
-	      if (strcmp(name,"ProfilingCurrentFlops")==0) return ProfilingCurrentFlopsEnum;
+	      if (strcmp(name,"PentaInput")==0) return PentaInputEnum;
+	      else if (strcmp(name,"Profiler")==0) return ProfilerEnum;
+	      else if (strcmp(name,"ProfilingCurrentFlops")==0) return ProfilingCurrentFlopsEnum;
 	      else if (strcmp(name,"ProfilingCurrentMem")==0) return ProfilingCurrentMemEnum;
 	      else if (strcmp(name,"ProfilingSolutionTime")==0) return ProfilingSolutionTimeEnum;
