SwitchPartitioning
PURPOSE 
INPUT function new_u_g=SwitchPartitioning(u_g,destination,part,tpart,doflist);
SYNOPSIS 
function new_u_g=SwitchPartitioning(u_g,destination,part,tpart,doflist);
DESCRIPTION 
CROSS-REFERENCE INFORMATION 
This function calls:
This function is called by:
SOURCE CODE 
0001 function new_u_g=SwitchPartitioning(u_g,destination,part,tpart,doflist);
0002
0003
0004 gsize=length(u_g);
0005 if strcmpi(destination,'workspace'),
0006
0007
0008
0009 new_u_g=zeros(gsize,1);
0010
0011
0012 for i=1:length(doflist),
0013 dof=doflist(i);
0014 ind=dof:6:gsize; ind=ind(tpart);
0015 new_u_g(dof:6:gsize)=u_g(ind);
0016 end
0017 elseif strcmpi(destination,'cluster'),
0018
0019
0020
0021 new_u_g=zeros(gsize,1);
0022
0023 for i=1:length(doflist),
0024 dof=doflist(i);
0025 ind=dof:6:gsize; vector=u_g(ind);
0026 new_u_g(dof:6:gsize)=vector(part);
0027 end
0028 else
0029 error('SwitchPartitioning error message: only types of destination allowed are ''workspace'' or ''cluster''!');
0030 end
Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003