Index: ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
===================================================================
--- ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 18811)
+++ ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 18812)
@@ -493,6 +493,12 @@
 	MassconEnum,
 	MassconNameEnum,
 	MassconLevelsetEnum,
+	MassconaxpbyEnum,
+	MassconaxpbyNameEnum,
+	MassconaxpbyNamexEnum,
+	MassconaxpbyNameyEnum,
+	MassconaxpbyAlphaEnum,
+	MassconaxpbyBetaEnum,
 	NodeSIdEnum,
 	VectorParamEnum,
 	RiftfrontEnum,
Index: ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
===================================================================
--- ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 18811)
+++ ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 18812)
@@ -490,6 +490,12 @@
 		case MassconEnum : return "Masscon";
 		case MassconNameEnum : return "MassconName";
 		case MassconLevelsetEnum : return "MassconLevelset";
+		case MassconaxpbyEnum : return "Massconaxpby";
+		case MassconaxpbyNameEnum : return "MassconaxpbyName";
+		case MassconaxpbyNamexEnum : return "MassconaxpbyNamex";
+		case MassconaxpbyNameyEnum : return "MassconaxpbyNamey";
+		case MassconaxpbyAlphaEnum : return "MassconaxpbyAlpha";
+		case MassconaxpbyBetaEnum : return "MassconaxpbyBeta";
 		case NodeSIdEnum : return "NodeSId";
 		case VectorParamEnum : return "VectorParam";
 		case RiftfrontEnum : return "Riftfront";
Index: ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
===================================================================
--- ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 18811)
+++ ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 18812)
@@ -499,16 +499,22 @@
 	      else if (strcmp(name,"Masscon")==0) return MassconEnum;
 	      else if (strcmp(name,"MassconName")==0) return MassconNameEnum;
 	      else if (strcmp(name,"MassconLevelset")==0) return MassconLevelsetEnum;
-	      else if (strcmp(name,"NodeSId")==0) return NodeSIdEnum;
+	      else if (strcmp(name,"Massconaxpby")==0) return MassconaxpbyEnum;
+	      else if (strcmp(name,"MassconaxpbyName")==0) return MassconaxpbyNameEnum;
+	      else if (strcmp(name,"MassconaxpbyNamex")==0) return MassconaxpbyNamexEnum;
+	      else if (strcmp(name,"MassconaxpbyNamey")==0) return MassconaxpbyNameyEnum;
+	      else if (strcmp(name,"MassconaxpbyAlpha")==0) return MassconaxpbyAlphaEnum;
+	      else if (strcmp(name,"MassconaxpbyBeta")==0) return MassconaxpbyBetaEnum;
+         else stage=5;
+   }
+   if(stage==5){
+	      if (strcmp(name,"NodeSId")==0) return NodeSIdEnum;
 	      else if (strcmp(name,"VectorParam")==0) return VectorParamEnum;
 	      else if (strcmp(name,"Riftfront")==0) return RiftfrontEnum;
 	      else if (strcmp(name,"RiftfrontType")==0) return RiftfrontTypeEnum;
 	      else if (strcmp(name,"Segment")==0) return SegmentEnum;
 	      else if (strcmp(name,"SegmentRiftfront")==0) return SegmentRiftfrontEnum;
-         else stage=5;
-   }
-   if(stage==5){
-	      if (strcmp(name,"SpcDynamic")==0) return SpcDynamicEnum;
+	      else if (strcmp(name,"SpcDynamic")==0) return SpcDynamicEnum;
 	      else if (strcmp(name,"SpcStatic")==0) return SpcStaticEnum;
 	      else if (strcmp(name,"SpcTransient")==0) return SpcTransientEnum;
 	      else if (strcmp(name,"StringArrayParam")==0) return StringArrayParamEnum;
@@ -622,16 +628,16 @@
 	      else if (strcmp(name,"StrainRatezz")==0) return StrainRatezzEnum;
 	      else if (strcmp(name,"Divergence")==0) return DivergenceEnum;
 	      else if (strcmp(name,"MaxDivergence")==0) return MaxDivergenceEnum;
-	      else if (strcmp(name,"GiaCrossSectionShape")==0) return GiaCrossSectionShapeEnum;
+         else stage=6;
+   }
+   if(stage==6){
+	      if (strcmp(name,"GiaCrossSectionShape")==0) return GiaCrossSectionShapeEnum;
 	      else if (strcmp(name,"GiadWdt")==0) return GiadWdtEnum;
 	      else if (strcmp(name,"GiaW")==0) return GiaWEnum;
 	      else if (strcmp(name,"P0")==0) return P0Enum;
 	      else if (strcmp(name,"P1")==0) return P1Enum;
 	      else if (strcmp(name,"P1DG")==0) return P1DGEnum;
-         else stage=6;
-   }
-   if(stage==6){
-	      if (strcmp(name,"P1bubble")==0) return P1bubbleEnum;
+	      else if (strcmp(name,"P1bubble")==0) return P1bubbleEnum;
 	      else if (strcmp(name,"P1bubblecondensed")==0) return P1bubblecondensedEnum;
 	      else if (strcmp(name,"P2")==0) return P2Enum;
 	      else if (strcmp(name,"P2bubble")==0) return P2bubbleEnum;
@@ -745,16 +751,16 @@
 	      else if (strcmp(name,"MpiSparse")==0) return MpiSparseEnum;
 	      else if (strcmp(name,"Seq")==0) return SeqEnum;
 	      else if (strcmp(name,"Mpi")==0) return MpiEnum;
-	      else if (strcmp(name,"Mumps")==0) return MumpsEnum;
+         else stage=7;
+   }
+   if(stage==7){
+	      if (strcmp(name,"Mumps")==0) return MumpsEnum;
 	      else if (strcmp(name,"Gsl")==0) return GslEnum;
 	      else if (strcmp(name,"Option")==0) return OptionEnum;
 	      else if (strcmp(name,"GenericOption")==0) return GenericOptionEnum;
 	      else if (strcmp(name,"OptionCell")==0) return OptionCellEnum;
 	      else if (strcmp(name,"OptionStruct")==0) return OptionStructEnum;
-         else stage=7;
-   }
-   if(stage==7){
-	      if (strcmp(name,"Cuffey")==0) return CuffeyEnum;
+	      else if (strcmp(name,"Cuffey")==0) return CuffeyEnum;
 	      else if (strcmp(name,"Paterson")==0) return PatersonEnum;
 	      else if (strcmp(name,"Arrhenius")==0) return ArrheniusEnum;
 	      else if (strcmp(name,"LliboutryDuval")==0) return LliboutryDuvalEnum;
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/CreateOutputDefinitions.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/CreateOutputDefinitions.cpp	(revision 18811)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/CreateOutputDefinitions.cpp	(revision 18812)
@@ -147,6 +147,44 @@
 				xDelete<int>(masscon_levelset_N_s);
 				/*}}}*/
 			}
+			else if (output_definition_enums[i]==MassconaxpbyEnum){
+				/*Deal with masscon combinations: {{{*/
+				
+				/*masscon variables: */
+				char**       masscon_name_s             = NULL;    
+				char**       masscon_namex_s             = NULL;    
+				char**       masscon_namey_s             = NULL;    
+				IssmDouble*  masscon_alpha_s     = NULL;
+				IssmDouble*  masscon_beta_s     = NULL;
+				int          num;
+
+				/*Fetch names and multiplicators, etc ... (see src/m/classes/masscon_axpby.m): */
+				iomodel->FetchMultipleData(&masscon_name_s,&num,MassconaxpbyNameEnum);
+				iomodel->FetchMultipleData(&masscon_namex_s,&num,MassconaxpbyNamexEnum);
+				iomodel->FetchMultipleData(&masscon_namey_s,&num,MassconaxpbyNameyEnum);
+				iomodel->FetchMultipleData(&masscon_alpha_s,&num,MassconaxpbyAlphaEnum);
+				iomodel->FetchMultipleData(&masscon_beta_s,&num,MassconaxpbyBetaEnum);
+				for(j=0;j<num;j++){
+
+					/*Create a masscon axpyb object: */
+					output_definitions->AddObject(new Massconaxpby(masscon_name_s[j],masscon_namex_s[j],masscon_namey_s[j],masscon_alpha_s[j],masscon_beta_s[j]));
+
+				}
+
+				/*Free ressources:*/
+				for(j=0;j<num;j++){
+					char* string=NULL;
+					string = masscon_name_s[j];    xDelete<char>(string);
+					string = masscon_namex_s[j];    xDelete<char>(string);
+					string = masscon_namey_s[j];    xDelete<char>(string);
+				}
+				xDelete<char*>(masscon_name_s);
+				xDelete<char*>(masscon_namex_s);
+				xDelete<char*>(masscon_namey_s);
+				xDelete<IssmDouble>(masscon_alpha_s);
+				xDelete<IssmDouble>(masscon_beta_s);
+				/*}}}*/
+			}
 			else _error_("output definition enum " << output_definition_enums[i] << "not supported yet!");
 		}
 	}
Index: ../trunk-jpl/src/c/classes/classes.h
===================================================================
--- ../trunk-jpl/src/c/classes/classes.h	(revision 18811)
+++ ../trunk-jpl/src/c/classes/classes.h	(revision 18812)
@@ -19,6 +19,7 @@
 #include "./Massfluxatgate.h"
 #include "./Misfit.h"
 #include "./Masscon.h"
+#include "./Massconaxpby.h"
 
 /*Constraints: */
 #include "./Constraints/Constraints.h"
Index: ../trunk-jpl/src/c/classes/IoModel.h
===================================================================
--- ../trunk-jpl/src/c/classes/IoModel.h	(revision 18811)
+++ ../trunk-jpl/src/c/classes/IoModel.h	(revision 18812)
@@ -85,6 +85,7 @@
 		void        FetchMultipleData(IssmDouble*** pmatrixarray,int** pmdims,int** pndims, int* pnumrecords,int data_enum);
 		void        FetchMultipleData(int*** pmatrices,int** pmdims,int** pndims, int* pnumrecords,int data_enum);
 		void        FetchMultipleData(int** pvector, int* pnum_instances,int data_enum);
+		void        FetchMultipleData(IssmDouble** pvector, int* pnum_instances,int data_enum);
 		void        FetchData(Option **poption,int data_enum);
 		void        FetchData(int num,...);
 		void        FetchDataToInput(Elements* elements,int vector_enum);
Index: ../trunk-jpl/src/c/classes/Massconaxpby.h
===================================================================
--- ../trunk-jpl/src/c/classes/Massconaxpby.h	(revision 0)
+++ ../trunk-jpl/src/c/classes/Massconaxpby.h	(revision 18812)
@@ -0,0 +1,109 @@
+/*!\file Massconaxpby.h
+ * \brief: header file for Massconaxpby object
+ */
+
+#ifndef _MASSCON_AXPBY_H_
+#define _MASSCON_AXPBY_H_
+
+/*Headers:*/
+/*{{{*/
+#include "./Definition.h"
+#include "../datastructures/datastructures.h"
+#include "./Elements/Element.h"
+#include "./Elements/Elements.h"
+#include "./FemModel.h"
+#include "../classes/Params/Parameters.h"
+IssmDouble OutputDefinitionsResponsex(FemModel* femmodel,const char* output_string);
+/*}}}*/
+class Massconaxpby: public Object, public Definition{
+
+	public: 
+
+		char*       name;
+		char*       namex;
+		char*       namey;
+		IssmDouble  alpha;
+		IssmDouble  beta;
+		
+		/*Massconaxpby constructors, destructors :*/
+		Massconaxpby(){/*{{{*/
+
+			this->name = NULL;
+			this->namex = NULL;
+			this->namey = NULL;
+			this->alpha=UNDEF;
+			this->beta=UNDEF;
+
+		}
+		/*}}}*/
+		Massconaxpby(char* in_name,char* in_namex, char* in_namey, IssmDouble in_alpha,IssmDouble in_beta){ /*{{{*/
+
+			this->name   = xNew<char>(strlen(in_name)+1);
+			xMemCpy<char>(this->name,in_name,strlen(in_name)+1);
+
+			this->namex   = xNew<char>(strlen(in_namex)+1);
+			xMemCpy<char>(this->namex,in_namex,strlen(in_namex)+1);
+			
+			this->namey   = xNew<char>(strlen(in_namey)+1);
+			xMemCpy<char>(this->namey,in_namey,strlen(in_namey)+1);
+
+			this->alpha=in_alpha;
+			this->beta=in_beta;
+
+		}
+		/*}}}*/
+		~Massconaxpby(){/*{{{*/
+			if(this->name)xDelete(this->name); 
+			if(this->namex)xDelete(this->namex); 
+			if(this->namey)xDelete(this->namey); 
+		}
+		/*}}}*/
+		/*Object virtual function resolutoin: */
+		void Echo(void){/*{{{*/
+			_printf_(" Massconaxpby: " << this->name << "\n");
+			_printf_("    namex: " << this->namex << "\n");
+			_printf_("    namey: " << this->namey << "\n");
+			_printf_("    alpha: " << this->alpha << "\n");
+			_printf_("    beta: " << this->beta << "\n");
+		}
+		/*}}}*/
+		void DeepEcho(void){/*{{{*/
+			this->Echo();
+		}
+		/*}}}*/
+		int Id(void){/*{{{*/
+			return -1;
+		}
+		/*}}}*/
+		int ObjectEnum(void){/*{{{*/
+			return MassconaxpbyEnum;
+		}
+		/*}}}*/
+		Object* copy() {/*{{{*/
+			Massconaxpby* mf = new Massconaxpby(this->name,this->namex,this->namey, this->alpha, this->beta);
+			return (Object*) mf;
+		}
+		/*}}}*/
+		/*Definition virtual function resolutoin: */
+		char* Name(){/*{{{*/
+
+			char* name2=xNew<char>(strlen(this->name)+1);
+			xMemCpy(name2,this->name,strlen(this->name)+1);
+
+			return name2;
+		}
+		/*}}}*/
+		 IssmDouble Response(FemModel* femmodel){/*{{{*/
+
+			 IssmDouble xresponse,yresponse;
+
+			 /*Get response from both masscons: */
+			 xresponse=OutputDefinitionsResponsex(femmodel,this->namex);
+			 yresponse=OutputDefinitionsResponsex(femmodel,this->namey);
+
+			 return this->alpha*xresponse+this->beta*yresponse;
+		 }
+			/*}}}*/
+};
+
+#endif  /* _MASSCON_H_ */
Index: ../trunk-jpl/src/m/classes/massconaxpby.m
===================================================================
--- ../trunk-jpl/src/m/classes/massconaxpby.m	(revision 0)
+++ ../trunk-jpl/src/m/classes/massconaxpby.m	(revision 18812)
@@ -0,0 +1,76 @@
+%MASSCONAXPBY class definition
+%
+%   Usage:
+%      massconaxpby=massconaxpby();
+%      massconsumaxpby=massconaxpby('name','MassCon58+35','namex','MassCon58','alpha',.5,'namey','MassCon35','beta',.5); 
+% 
+%   where name is the name of the massconaxpby object, namex is the name of the first masscon, namey the name of the second masscon and alpha,beta the 
+%         multiplicators. The meaning of axpby here is: resulting masscon is the linear combination (alpha *x + beta * y) 
+%         of two masscons.
+%
+%   See also: MASSCON
+
+classdef massconaxpby
+	properties (SetAccess=public)
+		%masscon axpby
+		name              = '';
+		namex              = '';
+		namey              = '';
+		alpha              = NaN;
+		beta              = NaN;
+	end
+	
+	methods
+		function obj = massconaxpby(varargin) % {{{
+			if nargin==0,
+				obj=setdefaultparameters(obj);
+			else
+				%use provided options to change fields
+				options=pairoptions(varargin{:});
+
+				%get names
+				obj.name=getfieldvalue(options,'name','');
+				obj.namex=getfieldvalue(options,'namex');
+				obj.namey=getfieldvalue(options,'namey');
+
+				%get multiplicators: 
+				obj.alpha=getfieldvalue(options,'alpha');
+				obj.beta=getfieldvalue(options,'beta');
+
+
+			end
+		end % }}}
+		function obj = setdefaultparameters(obj) % {{{
+		end % }}}
+		function md = checkconsistency(obj,md,solution,analyses) % {{{
+
+			if ~ischar(obj.name), error('masscon error message: ''name'' field should be a string!'); end
+			if ~ischar(obj.namex), error('masscon error message: ''namex'' field should be a string!'); end
+			if ~ischar(obj.namey), error('masscon error message: ''namey'' field should be a string!'); end
+
+			md = checkfield(md,'fieldname','obj.alpha','field',obj.alpha,'NaN',1,'size',[1 1]);
+			md = checkfield(md,'fieldname','obj.betaa','field',obj.beta,'NaN',1,'size',[1 1]);
+
+		end % }}}
+		function md = disp(obj) % {{{
+		
+			disp(sprintf('   Misfit:\n'));
+
+			fielddisplay(obj,'name','name');
+			fielddisplay(obj,'namex','identifier for the first masscon');
+			fielddisplay(obj,'alpha','first masscon multiplicator');
+			fielddisplay(obj,'namey','identifier for the second masscon');
+			fielddisplay(obj,'beta','second masscon multiplicator');
+
+		end % }}}
+		function md = marshall(obj,md,fid) % {{{
+
+		WriteData(fid,'object',obj,'fieldname','name','format','String');
+		WriteData(fid,'object',obj,'fieldname','namex','format','String');
+		WriteData(fid,'object',obj,'fieldname','namey','format','String');
+		WriteData(fid,'object',obj,'fieldname','alpha','format','Double');
+		WriteData(fid,'object',obj,'fieldname','beta','format','Double');
+
+		end % }}}
+	end
+end
Index: ../trunk-jpl/src/m/enum/MassconaxpbyEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/MassconaxpbyEnum.m	(revision 0)
+++ ../trunk-jpl/src/m/enum/MassconaxpbyEnum.m	(revision 18812)
@@ -0,0 +1,11 @@
+function macro=MassconaxpbyEnum()
+%MASSCONAXPBYENUM - Enum of Massconaxpby
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
+%            Please read src/c/shared/Enum/README for more information
+%
+%   Usage:
+%      macro=MassconaxpbyEnum()
+
+macro=StringToEnum('Massconaxpby');
Index: ../trunk-jpl/src/m/enum/MassconaxpbyNameEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/MassconaxpbyNameEnum.m	(revision 0)
+++ ../trunk-jpl/src/m/enum/MassconaxpbyNameEnum.m	(revision 18812)
@@ -0,0 +1,11 @@
+function macro=MassconaxpbyNameEnum()
+%MASSCONAXPBYNAMEENUM - Enum of MassconaxpbyName
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
+%            Please read src/c/shared/Enum/README for more information
+%
+%   Usage:
+%      macro=MassconaxpbyNameEnum()
+
+macro=StringToEnum('MassconaxpbyName');
Index: ../trunk-jpl/src/m/enum/MassconaxpbyNamexEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/MassconaxpbyNamexEnum.m	(revision 0)
+++ ../trunk-jpl/src/m/enum/MassconaxpbyNamexEnum.m	(revision 18812)
@@ -0,0 +1,11 @@
+function macro=MassconaxpbyNamexEnum()
+%MASSCONAXPBYNAMEXENUM - Enum of MassconaxpbyNamex
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
+%            Please read src/c/shared/Enum/README for more information
+%
+%   Usage:
+%      macro=MassconaxpbyNamexEnum()
+
+macro=StringToEnum('MassconaxpbyNamex');
Index: ../trunk-jpl/src/m/enum/MassconaxpbyBetaEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/MassconaxpbyBetaEnum.m	(revision 0)
+++ ../trunk-jpl/src/m/enum/MassconaxpbyBetaEnum.m	(revision 18812)
@@ -0,0 +1,11 @@
+function macro=MassconaxpbyBetaEnum()
+%MASSCONAXPBYBETAENUM - Enum of MassconaxpbyBeta
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
+%            Please read src/c/shared/Enum/README for more information
+%
+%   Usage:
+%      macro=MassconaxpbyBetaEnum()
+
+macro=StringToEnum('MassconaxpbyBeta');
Index: ../trunk-jpl/src/m/enum/EnumDefinitions.py
===================================================================
--- ../trunk-jpl/src/m/enum/EnumDefinitions.py	(revision 18811)
+++ ../trunk-jpl/src/m/enum/EnumDefinitions.py	(revision 18812)
@@ -482,6 +482,12 @@
 def MassconEnum(): return StringToEnum("Masscon")[0]
 def MassconNameEnum(): return StringToEnum("MassconName")[0]
 def MassconLevelsetEnum(): return StringToEnum("MassconLevelset")[0]
+def MassconaxpbyEnum(): return StringToEnum("Massconaxpby")[0]
+def MassconaxpbyNameEnum(): return StringToEnum("MassconaxpbyName")[0]
+def MassconaxpbyNamexEnum(): return StringToEnum("MassconaxpbyNamex")[0]
+def MassconaxpbyNameyEnum(): return StringToEnum("MassconaxpbyNamey")[0]
+def MassconaxpbyAlphaEnum(): return StringToEnum("MassconaxpbyAlpha")[0]
+def MassconaxpbyBetaEnum(): return StringToEnum("MassconaxpbyBeta")[0]
 def NodeSIdEnum(): return StringToEnum("NodeSId")[0]
 def VectorParamEnum(): return StringToEnum("VectorParam")[0]
 def RiftfrontEnum(): return StringToEnum("Riftfront")[0]
Index: ../trunk-jpl/src/m/enum/MassconaxpbyAlphaEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/MassconaxpbyAlphaEnum.m	(revision 0)
+++ ../trunk-jpl/src/m/enum/MassconaxpbyAlphaEnum.m	(revision 18812)
@@ -0,0 +1,11 @@
+function macro=MassconaxpbyAlphaEnum()
+%MASSCONAXPBYALPHAENUM - Enum of MassconaxpbyAlpha
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
+%            Please read src/c/shared/Enum/README for more information
+%
+%   Usage:
+%      macro=MassconaxpbyAlphaEnum()
+
+macro=StringToEnum('MassconaxpbyAlpha');
Index: ../trunk-jpl/src/m/enum/MassconaxpbyNameyEnum.m
===================================================================
--- ../trunk-jpl/src/m/enum/MassconaxpbyNameyEnum.m	(revision 0)
+++ ../trunk-jpl/src/m/enum/MassconaxpbyNameyEnum.m	(revision 18812)
@@ -0,0 +1,11 @@
+function macro=MassconaxpbyNameyEnum()
+%MASSCONAXPBYNAMEYENUM - Enum of MassconaxpbyNamey
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/shared/Enum/Synchronize.sh
+%            Please read src/c/shared/Enum/README for more information
+%
+%   Usage:
+%      macro=MassconaxpbyNameyEnum()
+
+macro=StringToEnum('MassconaxpbyNamey');
