Index: ../trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp
===================================================================
--- ../trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp	(revision 18336)
+++ ../trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp	(revision 18337)
@@ -14,7 +14,6 @@
 	char**  requestedoutputs = NULL;
 
 	parameters->AddObject(iomodel->CopyConstantObject(FlowequationIsFSEnum));
-
 	parameters->AddObject(iomodel->CopyConstantObject(MasstransportIsfreesurfaceEnum));
 	parameters->AddObject(iomodel->CopyConstantObject(MasstransportHydrostaticAdjustmentEnum));
 	parameters->AddObject(iomodel->CopyConstantObject(MasstransportStabilizationEnum));
@@ -361,27 +360,34 @@
 					Bprime,dim,numnodes,0,
 					&Ke->values[0],1);
 
-		if(stabilization==2){
-			if(dim==1){
-				vel=fabs(vx)+1.e-8;
-				D[0]=h/(2*vel)*vx*vx;
-			}
-			else{
-				/*Streamline upwinding*/
-				vel=sqrt(vx*vx+vy*vy)+1.e-8;
-				D[0*dim+0]=h/(2*vel)*vx*vx;
-				D[1*dim+0]=h/(2*vel)*vy*vx;
-				D[0*dim+1]=h/(2*vel)*vx*vy;
-				D[1*dim+1]=h/(2*vel)*vy*vy;
-			}
+		switch(stabilization){
+			case 0:
+				/*Nothing to be onde*/
+				break;
+			case 1:
+				/*SSA*/
+				vxaverage_input->GetInputAverage(&vx);
+				if(dim==2) vyaverage_input->GetInputAverage(&vy);
+				D[0*dim+0]=h/2.0*fabs(vx);
+				if(dim==2) D[1*dim+1]=h/2.0*fabs(vy);
+				break;
+			case 2:
+				if(dim==1){
+					vel=fabs(vx)+1.e-8;
+					D[0]=h/(2*vel)*vx*vx;
+				}
+				else{
+					/*Streamline upwinding*/
+					vel=sqrt(vx*vx+vy*vy)+1.e-8;
+					D[0*dim+0]=h/(2*vel)*vx*vx;
+					D[1*dim+0]=h/(2*vel)*vy*vx;
+					D[0*dim+1]=h/(2*vel)*vx*vy;
+					D[1*dim+1]=h/(2*vel)*vy*vy;
+				}
+				break;
+			default:
+				_error_("Stabilization "<<stabilization<<" not supported yet");
 		}
-		else if(stabilization==1){
-			/*SSA*/
-			vxaverage_input->GetInputAverage(&vx);
-			if(dim==2) vyaverage_input->GetInputAverage(&vy);
-			D[0*dim+0]=h/2.0*fabs(vx);
-			if(dim==2) D[1*dim+1]=h/2.0*fabs(vy);
-		}
 		if(stabilization==1 || stabilization==2){
 			if(dim==1) D[0]=D_scalar*D[0];
 			else{
