Index: /issm/branches/trunk-larour-SLPS2022/src/c/analyses/MmemasstransportAnalysis.cpp
===================================================================
--- /issm/branches/trunk-larour-SLPS2022/src/c/analyses/MmemasstransportAnalysis.cpp	(revision 27094)
+++ /issm/branches/trunk-larour-SLPS2022/src/c/analyses/MmemasstransportAnalysis.cpp	(revision 27095)
@@ -1,3 +1,3 @@
-#include "./MmemasstransporttransportAnalysis.h"
+#include "./MmemasstransportAnalysis.h"
 #include <math.h>
 #include "../toolkits/toolkits.h"
@@ -8,17 +8,17 @@
 
 /*Model processing*/
-void MmemasstransporttransportAnalysis::CreateConstraints(Constraints* constraints,IoModel* iomodel){/*{{{*/
+void MmemasstransportAnalysis::CreateConstraints(Constraints* constraints,IoModel* iomodel){/*{{{*/
 	/*No constraints*/
 }/*}}}*/
-void MmemasstransporttransportAnalysis::CreateLoads(Loads* loads, IoModel* iomodel){/*{{{*/
+void MmemasstransportAnalysis::CreateLoads(Loads* loads, IoModel* iomodel){/*{{{*/
 	/*No loads*/
 }/*}}}*/
-void MmemasstransporttransportAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/
-	::CreateNodes(nodes,iomodel,MmemasstransporttransportAnalysisEnum,P1Enum);
+void MmemasstransportAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/
+	::CreateNodes(nodes,iomodel,MmemasstransportAnalysisEnum,P1Enum);
 }/*}}}*/
-int  MmemasstransporttransportAnalysis::DofsPerNode(int** doflist,int domaintype,int approximation){/*{{{*/
+int  MmemasstransportAnalysis::DofsPerNode(int** doflist,int domaintype,int approximation){/*{{{*/
 	return 3;
 }/*}}}*/
-void MmemasstransporttransportAnalysis::UpdateElements(Elements* elements,Inputs* inputs,IoModel* iomodel,int analysis_counter,int analysis_type){/*{{{*/
+void MmemasstransportAnalysis::UpdateElements(Elements* elements,Inputs* inputs,IoModel* iomodel,int analysis_counter,int analysis_type){/*{{{*/
 
 	int  nature=0;
@@ -36,64 +36,68 @@
 
 	/*Plug inputs into element:*/
-	iomodel->FetchDataToInput(inputs,elements,"md.mmemasstransport.deltathickness", MmemasstransportDeltathicknessEnum);
+	iomodel->FetchDataToInput(inputs,elements,"md.geometry.thickness",ThicknessEnum);
+	iomodel->FetchDataToInput(inputs,elements,"md.geometry.surface",SurfaceEnum);
+	iomodel->FetchDataToInput(inputs,elements,"md.geometry.base",BaseEnum);
+	iomodel->FetchDataToInput(inputs,elements,"md.initialization.sealevel",SealevelEnum,0);
+	iomodel->FetchDataToInput(inputs,elements,"md.mask.ice_levelset",MaskIceLevelsetEnum);
+	iomodel->FetchDataToInput(inputs,elements,"md.mask.ocean_levelset",MaskOceanLevelsetEnum);
+	iomodel->FetchDataToInput(inputs,elements,"md.mmemasstransport.thickness", MmemasstransportThicknessEnum);
 
 	/*Initialize sea level cumulated sea level loads :*/
-	iomodel->ConstantToInput(inputs,elements,0.,AccumulatedDeltaThicknessEnum,P0Enum);
-	iomodel->ConstantToInput(inputs,elements,0.,OldAccumulatedDeltaThicknessEnum,P0Enum);
+	iomodel->ConstantToInput(inputs,elements,0.,AccumulatedDeltaIceThicknessEnum,P1Enum);
+	iomodel->ConstantToInput(inputs,elements,0.,OldAccumulatedDeltaIceThicknessEnum,P1Enum);
 
 }/*}}}*/
-void MmemasstransporttransportAnalysis::UpdateParameters(Parameters* parameters,IoModel* iomodel,int solution_enum,int analysis_enum){/*{{{*/
+void MmemasstransportAnalysis::UpdateParameters(Parameters* parameters,IoModel* iomodel,int solution_enum,int analysis_enum){/*{{{*/
 
 	int     numoutputs;
 	char**  requestedoutputs = NULL;
 
-	/*Deal with multi-model ensembles: {{{*/
-
 	int nids,npart,nel;
-	IssmDouble* modelids=NULL; 
+	IssmDouble* ids=NULL; 
 	IssmDouble* partition = NULL;
 
 	iomodel->FetchData(&nel,"md.mesh.numberofelements");
-	iomodel->FetchData(&modelids,&nids,NULL,"md.mmemasstransport.modelids");
-	parameters->AddObject(new DoubleParam(MmemasstransportModelidsEnum,modelids,nids,1));
+	iomodel->FetchData(&ids,&nids,NULL,"md.mmemasstransport.ids");
+	//_printf_("nids: " << nids << "\n"); for(int i=0;i<nids;i++)_printf_(ids[i] << "|");  _printf_("\n");
+	parameters->AddObject(new DoubleMatParam(MmemasstransportModelidsEnum,ids,nids,1));
 	iomodel->FetchData(&partition,&npart,NULL,"md.mmemasstransport.partition");
 	if (npart!=nel)_error_("MmemasstransportAnalysis:UpdateParameters: partition vector should be distributed over elements, not vertices!");
-	parameters->AddObject(new DoubleParam(MmemasstransportPartitionEnum,partition,nel,1));
+	parameters->AddObject(new DoubleMatParam(MmemasstransportPartitionEnum,partition,nel,1));
 	
-	xDelete<IssmDouble>(modelids);
+	xDelete<IssmDouble>(ids);
 	xDelete<IssmDouble>(partition);
-
-	} /*}}}*/
-	/*Requested outputs {{{*/
-	iomodel->FindConstant(&requestedoutputs,&numoutputs,"md.solidearth.requested_outputs");
-	if(numoutputs)parameters->AddObject(new StringArrayParam(SealevelchangeRequestedOutputsEnum,requestedoutputs,numoutputs));
-	iomodel->DeleteData(&requestedoutputs,numoutputs,"md.solidearth.requested_outputs");
-	/*}}}*/
+	
+	/*Requested outputs*/
+	iomodel->FindConstant(&requestedoutputs,&numoutputs,"md.mmemasstransport.requested_outputs");
+	parameters->AddObject(new IntParam(MmemasstransportNumRequestedOutputsEnum,numoutputs));
+	if(numoutputs)parameters->AddObject(new StringArrayParam(MmemasstransportRequestedOutputsEnum,requestedoutputs,numoutputs));
+	iomodel->DeleteData(&requestedoutputs,numoutputs,"md.mmemasstransport.requested_outputs");
 
 }/*}}}*/
 
 /*Finite Element Analysis*/
-void           MmemasstransporttransportAnalysis::Core(FemModel* femmodel){/*{{{*/
+void           MmemasstransportAnalysis::Core(FemModel* femmodel){/*{{{*/
 	_error_("not implemented");
 }/*}}}*/
-void           MmemasstransporttransportAnalysis::PreCore(FemModel* femmodel){/*{{{*/
+void           MmemasstransportAnalysis::PreCore(FemModel* femmodel){/*{{{*/
 	_error_("not implemented");
 }/*}}}*/
-ElementVector* MmemasstransporttransportAnalysis::CreateDVector(Element* element){/*{{{*/
+ElementVector* MmemasstransportAnalysis::CreateDVector(Element* element){/*{{{*/
 	/*Default, return NULL*/
 	return NULL;
 }/*}}}*/
-ElementMatrix* MmemasstransporttransportAnalysis::CreateJacobianMatrix(Element* element){/*{{{*/
+ElementMatrix* MmemasstransportAnalysis::CreateJacobianMatrix(Element* element){/*{{{*/
 _error_("Not implemented");
 }/*}}}*/
-ElementMatrix* MmemasstransporttransportAnalysis::CreateKMatrix(Element* element){/*{{{*/
+ElementMatrix* MmemasstransportAnalysis::CreateKMatrix(Element* element){/*{{{*/
 	_error_("not implemented yet");
 }/*}}}*/
-ElementVector* MmemasstransporttransportAnalysis::CreatePVector(Element* element){/*{{{*/
+ElementVector* MmemasstransportAnalysis::CreatePVector(Element* element){/*{{{*/
 _error_("not implemented yet");
 }/*}}}*/
-void           MmemasstransporttransportAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/
+void           MmemasstransportAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/
 
-	/*retrieve thickness from MmemasstransporttransportAnalysis spcs in our element:*/
+	/*retrieve thickness from MmemasstransportAnalysis spcs in our element:*/
 
 	IssmDouble h;
@@ -107,5 +111,5 @@
 	/*Get dof list and inputs */
 	element->GetDofList(&doflist,NoneApproximationEnum,GsetEnum);
-	Input* dh_input=element->GetInput(MmemasstransportDeltathicknessEnum); _assert_(h_input);
+	Input* h_input=element->GetInput(MmemasstransportThicknessEnum); _assert_(h_input);
 
 	/*Ok, we have the thickness in inputs, fill in solution */
@@ -113,6 +117,6 @@
 	for(int i=0;i<numnodes;i++){
 		gauss->GaussVertex(i);
-		dh_input->GetInputValue(&dh,gauss);
-		values[i+0]=dh;
+		h_input->GetInputValue(&h,gauss);
+		values[i+0]=h;
 	}
 
@@ -125,8 +129,8 @@
 	xDelete<IssmDouble>(values);
 }/*}}}*/
-void           MmemasstransporttransportAnalysis::GradientJ(Vector<IssmDouble>* gradient,Element*  element,int control_type,int control_interp,int control_index){/*{{{*/
+void           MmemasstransportAnalysis::GradientJ(Vector<IssmDouble>* gradient,Element*  element,int control_type,int control_interp,int control_index){/*{{{*/
 	_error_("Not implemented yet");
 }/*}}}*/
-void           MmemasstransporttransportAnalysis::InputUpdateFromSolution(IssmDouble* solution,Element* element){/*{{{*/
+void           MmemasstransportAnalysis::InputUpdateFromSolution(IssmDouble* solution,Element* element){/*{{{*/
 
 	int         i,domaintype;
@@ -154,5 +158,5 @@
 	}
 
-	/*Add bp, dsl and str as inputs to the tria element: */
+	/*Add thickness as inputs to the tria element: */
 	element->AddInput(ThicknessEnum,h,P1Enum);
 
@@ -163,5 +167,5 @@
 
 }/*}}}*/
-void           MmemasstransporttransportAnalysis::UpdateConstraints(FemModel* femmodel){/*{{{*/
+void           MmemasstransportAnalysis::UpdateConstraints(FemModel* femmodel){/*{{{*/
 	/*Default, do nothing*/
 	return;
Index: /issm/branches/trunk-larour-SLPS2022/src/c/classes/Profiler.h
===================================================================
--- /issm/branches/trunk-larour-SLPS2022/src/c/classes/Profiler.h	(revision 27094)
+++ /issm/branches/trunk-larour-SLPS2022/src/c/classes/Profiler.h	(revision 27095)
@@ -22,19 +22,20 @@
 #define MOVINGFRONTCORE		9 /*Profiling MOVINGFRONT */
 #define MASSTRANSPORTCORE	10 /*Profiling MASSTRANSPORT */
-#define OCEANTRANSPORTCORE	11 /*Profiling OCEANTRANSPORT */
-#define SMBCORE				12 /*Profiling SMB */
-#define GROUNDINGLINECORE	13 /*Profiling GROUDINGLINE MIGRATION */
-#define ESACORE				14 /*Profiling ESA */
-#define SLRCORE				15 /*Profiling SLR */
-#define SAMPLINGCORE	16 /*Profiling SAMPLING */
-#define MPISERIAL				17 /*Profiling MPISerial */
-#define SEDLOOP				18 /*Profiling MPISerial */
-#define SEDMatrix				19 /*Profiling MPISerial */
-#define SEDUpdate				20 /*Profiling MPISerial */
-#define EPLLOOP				21 /*Profiling MPISerial */
-#define EPLMasking			22 /*Profiling MPISerial */
-#define EPLMatrices			23 /*Profiling MPISerial */
-#define EPLUpdate				24 /*Profiling MPISerial */
-#define MAXPROFSIZE			25 /*Used to initialize static arrays*/
+#define MMEMASSTRANSPORTCORE 11 /*Profiling MMEMASSTRANSPORT */
+#define OCEANTRANSPORTCORE	12 /*Profiling OCEANTRANSPORT */
+#define SMBCORE				13 /*Profiling SMB */
+#define GROUNDINGLINECORE	14 /*Profiling GROUDINGLINE MIGRATION */
+#define ESACORE				15/*Profiling ESA */
+#define SLRCORE				16 /*Profiling SLR */
+#define SAMPLINGCORE	17 /*Profiling SAMPLING */
+#define MPISERIAL				18 /*Profiling MPISerial */
+#define SEDLOOP				19 /*Profiling MPISerial */
+#define SEDMatrix				20 /*Profiling MPISerial */
+#define SEDUpdate				21 /*Profiling MPISerial */
+#define EPLLOOP				22 /*Profiling MPISerial */
+#define EPLMasking			23 /*Profiling MPISerial */
+#define EPLMatrices			24 /*Profiling MPISerial */
+#define EPLUpdate				25 /*Profiling MPISerial */
+#define MAXPROFSIZE			26 /*Used to initialize static arrays*/
 
 class Profiler: public Object{
Index: /issm/branches/trunk-larour-SLPS2022/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp
===================================================================
--- /issm/branches/trunk-larour-SLPS2022/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp	(revision 27094)
+++ /issm/branches/trunk-larour-SLPS2022/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp	(revision 27095)
@@ -162,20 +162,20 @@
 
 	/*Here, we put all the code that cannot be handled any other place: */
-	if (strncmp(root,"SurfaceloadModelid",18)==0){ //surface load in solid earth class {{{
+	if (strncmp(root,"MmemasstransportThickness",25)==0){ //surface load in solid earth class {{{
 
 		if(VerboseQmu()){
-			_printf0_("      SurfaceloadModelid MME, with ids: ");
+			_printf0_("      Masstransport Thickness MME with ids: ");
 			for (int i=0;i<npart;i++)_printf0_((int)distributed_values[i] << " ");
 			_printf0_("\n");
 		}
 
-		if (femmodel->inputs->GetInputObjectEnum(MasstransportSpcthicknessEnum)==DatasetInputEnum)
-			MmeToInput(femmodel,distributed_values,variable_partition,npart,MasstransportSpcthicknessEnum, P0Enum);
+		if (femmodel->inputs->GetInputObjectEnum(MmemasstransportThicknessEnum)==DatasetInputEnum)
+			MmeToInputx(femmodel,distributed_values,variable_partition,npart,MmemasstransportThicknessEnum, P0Enum);
 
 		if (femmodel->inputs->GetInputObjectEnum(MaskIceLevelsetEnum)==DatasetInputEnum)
-			MmeToInput(femmodel,distributed_values,variable_partition,npart,MaskIceLevelsetEnum, P1Enum);
+			MmeToInputx(femmodel,distributed_values,variable_partition,npart,MaskIceLevelsetEnum, P1Enum);
 
 		if (femmodel->inputs->GetInputObjectEnum(MaskOceanLevelsetEnum)==DatasetInputEnum)
-			MmeToInput(femmodel,distributed_values,variable_partition,npart,MaskOceanLevelsetEnum, P1Enum);
+			MmeToInputx(femmodel,distributed_values,variable_partition,npart,MaskOceanLevelsetEnum, P1Enum);
 
 	} /*}}}*/
@@ -183,5 +183,5 @@
 
 }	//}}}
-void  MmeToInput(FemModel* femmodel,IssmDouble* distributed_values,IssmDouble* variable_partition,int npart,int rootenum, int interpolationenum){ /*{{{*/
+void  MmeToInputx(FemModel* femmodel,IssmDouble* distributed_values,IssmDouble* variable_partition,int npart,int rootenum, int interpolationenum){ /*{{{*/
 
 	TransientInput* transientinput  = NULL;
@@ -201,5 +201,5 @@
 	transientinput->GetAllTimes(&times,&N);
 	femmodel->inputs->SetTransientInput(DummyEnum,times,N);
-	transientinput2 = femmodel->inputs->GetTransientInput(DummyEnum);
+	transientinput2 = femmodel->inputs->GetTransientInput(DummyEnum); transientinput2->Configure(femmodel->parameters);
 
 	for(Object* & object : femmodel->elements->objects){
@@ -239,6 +239,4 @@
 	femmodel->inputs->ChangeEnum(DummyEnum,rootenum);
 
-	//reconfigure:
-	transientinput2->Configure(femmodel->parameters);
 }	//}}}
 void  InputScaleFromDakotax(FemModel* femmodel,IssmDouble* distributed_values,IssmDouble* partition, int npart, int nt, int name){ /*{{{*/
Index: /issm/branches/trunk-larour-SLPS2022/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.h
===================================================================
--- /issm/branches/trunk-larour-SLPS2022/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.h	(revision 27094)
+++ /issm/branches/trunk-larour-SLPS2022/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.h	(revision 27095)
@@ -10,5 +10,5 @@
 void  InputUpdateFromDakotax(FemModel* femmodel,double* variables,char* *variables_descriptors,int numvariables);
 void  InputUpdateSpecialtyCode(FemModel* femmodel,IssmDouble* distributed_values,IssmDouble* variable_partition,int npart,char* root);
-void  MmeToInput(FemModel* femmodel,IssmDouble* distributed_values,IssmDouble* variable_partition,int npart,int rootenum, int interpolationenum);
+void  MmeToInputx(FemModel* femmodel,IssmDouble* distributed_values,IssmDouble* variable_partition,int npart,int rootenum, int interpolationenum);
 void InputScaleFromDakotax(FemModel* femmodel,IssmDouble* distributed_values,IssmDouble* partition, int npart, int nt, int name);
 
Index: /issm/branches/trunk-larour-SLPS2022/src/c/modules/ModelProcessorx/CreateParameters.cpp
===================================================================
--- /issm/branches/trunk-larour-SLPS2022/src/c/modules/ModelProcessorx/CreateParameters.cpp	(revision 27094)
+++ /issm/branches/trunk-larour-SLPS2022/src/c/modules/ModelProcessorx/CreateParameters.cpp	(revision 27095)
@@ -78,4 +78,5 @@
 		parameters->AddObject(iomodel->CopyConstantObject("md.transient.isstressbalance",TransientIsstressbalanceEnum));
 		parameters->AddObject(iomodel->CopyConstantObject("md.transient.ismasstransport",TransientIsmasstransportEnum));
+		parameters->AddObject(iomodel->CopyConstantObject("md.transient.ismmemasstransport",TransientIsmmemasstransportEnum));
 		parameters->AddObject(iomodel->CopyConstantObject("md.transient.isoceantransport",TransientIsoceantransportEnum));
 		parameters->AddObject(iomodel->CopyConstantObject("md.transient.issmb",TransientIssmbEnum));
Index: /issm/branches/trunk-larour-SLPS2022/src/c/modules/UpdateMmesx/UpdateMmesx.cpp
===================================================================
--- /issm/branches/trunk-larour-SLPS2022/src/c/modules/UpdateMmesx/UpdateMmesx.cpp	(revision 27094)
+++ /issm/branches/trunk-larour-SLPS2022/src/c/modules/UpdateMmesx/UpdateMmesx.cpp	(revision 27095)
@@ -5,4 +5,5 @@
 #include "./UpdateMmesx.h"
 #include "../MmeToInputFromIdx/MmeToInputFromIdx.h"
+#include "../InputUpdateFromDakotax/InputUpdateFromDakotax.h"
 
 void  UpdateMmesx(FemModel* femmodel){ 
@@ -35,7 +36,7 @@
 		MmeToInputFromIdx(femmodel->inputs,femmodel->elements,femmodel->parameters,modelid-1,OceantransportSpcstrEnum, P0Enum);
 	} /*}}}*/
-	if (femmodel->inputs->Exist(MmemasstransportThicknessEnum) && femmodel->inputs->GetInputObjectEnum(MmemasstransportThicknessEnum)==DatasetInputEnum){ /*{{{*/
+	/*Deal with solid earth ice loads: {{{*/
+	if (femmodel->inputs->Exist(MmemasstransportThicknessEnum) && femmodel->inputs->GetInputObjectEnum(MmemasstransportThicknessEnum)==DatasetInputEnum){ 
 	
-		/*Deal with solid earth ice loads: */
 
 		int nids;
@@ -46,12 +47,13 @@
 		femmodel->parameters->FindParam(&modelids,&nids,NULL,MmemasstransportModelidsEnum);
 		femmodel->parameters->FindParam(&partition,NULL,NULL,MmemasstransportPartitionEnum);
+		//_printf_("modelids: " << nids << "|ids:" << modelids[0] << "|" << modelids[1] << "|" << modelids[2] << "|\n");
 
-		MmeToInput(femmodel,modelids,partition,nids,MmemasstransportThicknessEnum, P0Enum);
+		MmeToInputx(femmodel,modelids,partition,nids,MmemasstransportThicknessEnum, P0Enum);
 
 		if (femmodel->inputs->GetInputObjectEnum(MaskIceLevelsetEnum)==DatasetInputEnum)
-			MmeToInput(femmodel,modelids,partition,nids,MaskIceLevelsetEnum, P1Enum);
+			MmeToInputx(femmodel,modelids,partition,nids,MaskIceLevelsetEnum, P1Enum);
 
 		if (femmodel->inputs->GetInputObjectEnum(MaskOceanLevelsetEnum)==DatasetInputEnum)
-			MmeToInput(femmodel,modelids,partition,nids,MaskOceanLevelsetEnum, P1Enum);
+			MmeToInputx(femmodel,modelids,partition,nids,MaskOceanLevelsetEnum, P1Enum);
 
 		/*free ressources:*/
