Index: issm/trunk/src/m/qmu/setupdesign/QmuSetupDesign.m
===================================================================
--- issm/trunk/src/m/qmu/setupdesign/QmuSetupDesign.m	(revision 5196)
+++ issm/trunk/src/m/qmu/setupdesign/QmuSetupDesign.m	(revision 5197)
@@ -1,59 +1,46 @@
 function dvar=QmuSetupDesign(dvar,variables,params,varargin)
+
+%recover model
+for i=1:length(varargin)
+    if strcmp(class(varargin{i}),'model')
+        md=varargin{i};
+        break;
+    end
+end
+
 
 %get descriptor
 descriptor=variables.descriptor;
 
-%loop on descriptor
-if strcmpi(descriptor,'RhoIce')
+%decide whether this is a distributed variable, which will drive whether we expand it into npart values,
+%or if we just carry it forward as is. 
 
-	dvar=setuprhoice(dvar,variables,params,varargin{:});
+switch descriptor,
+case {'RhoIce','RhoWater','HeatCapacity','ThermalConductivity','Gravity'},
 
-elseif strcmpi(descriptor,'RhoWater')
+	dvar(end+1)=variables;
 
-	dvar=setuprhowater(dvar,variables,params,varargin{:});
+case {'Thickness','Surface','Bed','DragCoefficient'},
 
-elseif strcmpi(descriptor,'HeatCapacity')
+	if length(variables.stddev)>md.npart,
+		error('QmuSetupDesign error message: stddev should be either a scalar or a ''npart'' length vector');
+	end
 
-	dvar=setupheatcapacity(dvar,variables,params,varargin{:});
+	%ok, dealing with semi-discrete distributed variable. Distribute according to how many 
+	%partitions we want
 
-elseif strcmpi(descriptor,'ThermalConductivity')
+	for j=1:md.npart
+		dvar(end+1)           =variables;
+		dvar(end  ).descriptor=sprintf('%s%d',variables.descriptor,j);
+		if length(variables.stddev)>1,
+			dvar(end  ).stddev=variables.stddev(j);
+		end
+	end
 
-	dvar=setupthermalconductivity(dvar,variables,params,varargin{:});
-
-elseif strcmpi(descriptor,'Gravity')
-
-	dvar=setupgravity(dvar,variables,params,varargin{:});
-
-elseif strcmpi(descriptor,'Thickness')
-
-	dvar=setupthickness(dvar,variables,params,varargin{:});
-
-elseif strcmpi(descriptor,'Surface')
-
-	dvar=setupsurface(dvar,variables,params,varargin{:});
-
-elseif strcmpi(descriptor,'Bed')
-
-	dvar=setupbed(dvar,variables,params,varargin{:});
-
-elseif strcmpi(descriptor,'DragCoefficient')
-
-	dvar=setupdrag(dvar,variables,params,varargin{:});
-
-elseif strncmpi(descriptor,'DragCoefficientNode',9)
-
-	dvar=setupdrag_node(dvar,variables,params,varargin{:});
-
-elseif strncmpi(descriptor,'ThicknessNode',14)
-
-	dvar=setupthickness_node(dvar,variables,params,varargin{:});
-
-elseif strcmpi(descriptor,'RiftsFriction')
-
+case {'RiftsFriction'},
+	
 	dvar=setupriftsfriction(dvar,variables,params,varargin{:});
 
-else
+otherwise
 	error(['QmuSetupDesign warning message: could not find ' descriptor ' setup design function']);
 end
-
-end
Index: issm/trunk/src/m/qmu/setupdesign/setupbed.m
===================================================================
--- issm/trunk/src/m/qmu/setupdesign/setupbed.m	(revision 5196)
+++ 	(revision )
@@ -1,27 +1,0 @@
-function dvar=setupbed(dvar,variables,params,varargin)
-
-for i=1:length(varargin)
-    if strcmp(class(varargin{i}),'model')
-        md=varargin{i};
-        break;
-    end
-end
-%capture stddev:
-stddev=variables.stddev;
-
-if length(stddev)>md.npart,
-	error('setupbed error message: stddev should be either a scalar or a ''npart'' length vector');
-end
-
-%ok, dealing with semi-discrete distributed variable. Distribute according to how many 
-%partitions we want
-
-for j=1:md.npart
-	dvar(end+1)           =variables;
-	dvar(end  ).descriptor=sprintf('%s%d',variables.descriptor,j);
-	if length(stddev)>1,
-		dvar(end  ).stddev=stddev(j);
-	end
-end
-	
-end
Index: issm/trunk/src/m/qmu/setupdesign/setupdrag.m
===================================================================
--- issm/trunk/src/m/qmu/setupdesign/setupdrag.m	(revision 5196)
+++ 	(revision )
@@ -1,28 +1,0 @@
-function dvar=setupdrag(dvar,variables,params,varargin)
-
-for i=1:length(varargin)
-    if strcmp(class(varargin{i}),'model')
-        md=varargin{i};
-        break;
-    end
-end
-
-%capture stddev:
-stddev=variables.stddev;
-
-if length(stddev)>md.npart,
-	error('setupdrag error message: stddev should be either a scalar or a ''npart'' length vector');
-end
-
-%ok, dealing with semi-discrete distributed variable. Distribute according to how many 
-%partitions we want
-
-for j=1:md.npart
-	dvar(end+1)           =variables;
-	dvar(end  ).descriptor=sprintf('%s%d',variables.descriptor,j);
-	if length(stddev)>1,
-		dvar(end  ).stddev=stddev(j);
-	end
-end
-
-end
Index: issm/trunk/src/m/qmu/setupdesign/setupdrag_node.m
===================================================================
--- issm/trunk/src/m/qmu/setupdesign/setupdrag_node.m	(revision 5196)
+++ 	(revision )
@@ -1,35 +1,0 @@
-function dvar=setupdrag_node(dvar,variables,params,varargin)
-
-for i=1:length(varargin)
-    if strcmp(class(varargin{i}),'model')
-        md=varargin{i};
-        break;
-    end
-end
-
-%first, recover  id of node: 
-descriptor=variables.descriptor();
-node=descriptor(10:end);
-
-%this variable we are trying to setup for qmu analysis is shadowing 
-%a variable in another pool of distributed variables. Ex: drag_node2 should 
-%owershadow the drag2 parameter. So go through the dvars, and figure out 
-%if the drag was already distributed. If not, error out. It so, then 
-%plug drag_nodei variable into the i'th variable of the distributed drag.
-
-
-found=0;
-for i=1:numel(dvar),
-	if strcmpi(dvar(i).descriptor,['drag' num2str(node)]),
-		found=i;
-		break;
-	end
-end
-if found==0,
-	error('setupdrag_node error message: could not find distributed drag parameters!');
-end
-
-%overshadow dvar(found) variable.
-variables.descriptor=['drag' num2str(node)];
-dvar(found)=variables;
-
Index: issm/trunk/src/m/qmu/setupdesign/setupgravity.m
===================================================================
--- issm/trunk/src/m/qmu/setupdesign/setupgravity.m	(revision 5196)
+++ 	(revision )
@@ -1,5 +1,0 @@
-function dvar=setupgravity(dvar,variables,params,varargin)
-
-dvar(end+1)=variables;
-
-end
Index: issm/trunk/src/m/qmu/setupdesign/setupheatcapacity.m
===================================================================
--- issm/trunk/src/m/qmu/setupdesign/setupheatcapacity.m	(revision 5196)
+++ 	(revision )
@@ -1,5 +1,0 @@
-function dvar=setupheatcapacity(dvar,variables,params,varargin)
-
-dvar(end+1)=variables;
-
-end
Index: issm/trunk/src/m/qmu/setupdesign/setuprhoice.m
===================================================================
--- issm/trunk/src/m/qmu/setupdesign/setuprhoice.m	(revision 5196)
+++ 	(revision )
@@ -1,5 +1,0 @@
-function dvar=setuprhoice(dvar,variables,params,varargin)
-
-dvar(end+1)=variables;
-
-end
Index: issm/trunk/src/m/qmu/setupdesign/setuprhowater.m
===================================================================
--- issm/trunk/src/m/qmu/setupdesign/setuprhowater.m	(revision 5196)
+++ 	(revision )
@@ -1,5 +1,0 @@
-function dvar=setuprhowater(dvar,variables,params,varargin)
-
-dvar(end+1)=variables;
-
-end
Index: issm/trunk/src/m/qmu/setupdesign/setupsurface.m
===================================================================
--- issm/trunk/src/m/qmu/setupdesign/setupsurface.m	(revision 5196)
+++ 	(revision )
@@ -1,27 +1,0 @@
-function dvar=setupsurface(dvar,variables,params,varargin)
-
-for i=1:length(varargin)
-    if strcmp(class(varargin{i}),'model')
-        md=varargin{i};
-        break;
-    end
-end
-%capture stddev:
-stddev=variables.stddev;
-
-if length(stddev)>md.npart,
-	error('setupsurface error message: stddev should be either a scalar or a ''npart'' length vector');
-end
-
-%ok, dealing with semi-discrete distributed variable. Distribute according to how many 
-%partitions we want
-
-for j=1:md.npart
-	dvar(end+1)           =variables;
-	dvar(end  ).descriptor=sprintf('%s%d',variables.descriptor,j);
-	if length(stddev)>1,
-		dvar(end  ).stddev=stddev(j);
-	end
-end
-	
-end
Index: issm/trunk/src/m/qmu/setupdesign/setupthermalconductivity.m
===================================================================
--- issm/trunk/src/m/qmu/setupdesign/setupthermalconductivity.m	(revision 5196)
+++ 	(revision )
@@ -1,5 +1,0 @@
-function dvar=setupthermalconductivity(dvar,variables,params,varargin)
-
-dvar(end+1)=variables;
-
-end
Index: issm/trunk/src/m/qmu/setupdesign/setupthickness.m
===================================================================
--- issm/trunk/src/m/qmu/setupdesign/setupthickness.m	(revision 5196)
+++ 	(revision )
@@ -1,27 +1,0 @@
-function dvar=setupthickness(dvar,variables,params,varargin)
-
-for i=1:length(varargin)
-    if strcmp(class(varargin{i}),'model')
-        md=varargin{i};
-        break;
-    end
-end
-%capture stddev:
-stddev=variables.stddev;
-
-if length(stddev)>md.npart,
-	error('setupthickness error message: stddev should be either a scalar or a ''npart'' length vector');
-end
-
-%ok, dealing with semi-discrete distributed variable. Distribute according to how many 
-%partitions we want
-
-for j=1:md.npart
-	dvar(end+1)           =variables;
-	dvar(end  ).descriptor=sprintf('%s%d',variables.descriptor,j);
-	if length(stddev)>1,
-		dvar(end  ).stddev=stddev(j);
-	end
-end
-	
-end
Index: issm/trunk/src/m/qmu/setupdesign/setupthickness_node.m
===================================================================
--- issm/trunk/src/m/qmu/setupdesign/setupthickness_node.m	(revision 5196)
+++ 	(revision )
@@ -1,34 +1,0 @@
-function dvar=setupthickness_node(dvar,variables,params,varargin)
-
-for i=1:length(varargin)
-    if strcmp(class(varargin{i}),'model')
-        md=varargin{i};
-        break;
-    end
-end
-
-%first, recover  id of node: 
-descriptor=variables.descriptor();
-node=descriptor(15:end);
-
-%this variable we are trying to setup for qmu analysis is shadowing 
-%a variable in another pool of distributed variables. Ex: thickness_node2 should 
-%owershadow the thickness2 parameter. So go through the dvars, and figure out 
-%if the thickness was already distributed. If not, error out. It so, then 
-%plug thickness_nodei variable into the i'th variable of the distributed thickness.
-
-
-found=0;
-for i=1:numel(dvar),
-	if strcmpi(dvar(i).descriptor,['thickness' num2str(node)]),
-		found=i;
-		break;
-	end
-end
-if found==0,
-	error('setupthickness_node error message: could not find distributed thickness parameters!');
-end
-
-%overshadow dvar(found) variable.
-variables.descriptor=['thickness' num2str(node)];
-dvar(found)=variables;
