1 function [vel,lambda] = velocity_transport(glob, ~, params)
2 %
function [vel,lambda] = velocity_transport(glob, U, params)
4 %
function evaluating a
function in the list of global coordinates
5 % specified in the columns of glob. Result is a matrix of velocity
6 % vectors as columns of vel.
8 % Linear combination of components by coefficients then yields the
11 % Martin Drohmann 23.9.2009
15 if ~isempty(glob) && size(glob,1) < size(glob,2)
16 warning('coordinates in variable glob are given row-wise, but expected them to be column-wise');
24 decomp_mode = params.decomp_mode;
27 vel = 1; % single component factor 1
28 elseif decomp_mode == 1 % components:
30 vel{1} = zeros(length(glob),2);
31 vel{1}(:,1) = params.transport_x * ones(1,length(glob));
32 vel{1}(:,2) = params.transport_y * ones(1,length(glob));
33 else % decomp_mode = 0, complete:
34 vel = zeros(length(glob),2);
35 vel(:,1) = params.transport_x * ones(1,length(glob));
36 vel(:,2) = params.transport_y * ones(1,length(glob));
37 lambda = max(max(vel))^-1; % correct up to a factor