1 function Udirichlet = dirichlet_values_uplow(glob, params)
2 %
function Udirichlet = dirichlet_values_uplow(glob, params)
4 %
function computing dirichlet-values by pointwise evaluations
6 % required fields of params:
7 % dir_middle : y coordinate where upper and lower regions are separated
8 % c_dir_up, c_dir_low: upper and lower dirichlet value
10 % optional fields of params:
11 % mu_names : names of fields to be regarded as parameters in vector mu
13 % in
'coefficients' mode, the parameters in brackets are empty
17 if ~isempty(glob) && size(glob,1) < size(glob,2)
18 warning('coordinates in variable glob are given row-wise, but expected them to be column-wise');
24 decomp_mode = params.decomp_mode;
27 Udirichlet = [params.c_dir_low, params.c_dir_up];
29 i = (glob(:,2) <= params.dir_middle) ...
30 + (1-(glob(:,2)-params.dir_middle)./0.2) ...
31 .* (glob(:,2) >= params.dir_middle & glob(:,2) <= params.dir_middle + 0.2);
33 Udirichlet = {i, (1-i)};
34 elseif decomp_mode == 0
35 Udirichlet = params.c_dir_low * i + (1-i) * params.c_dir_up;