1 function Udirichlet = dirichlet_values_leftright(glob, params)
2 %
function Udirichlet = dirichlet_values_leftright(glob, params)
4 %
function computing dirichlet-values by pointwise evaluations
6 % required fields of params:
7 % dir_middle : x coordinate where left and right regions are separated
8 % c_dir_left : left dirichlet value
9 % c_dir_right : right dirichlet value
11 % optional fields of params:
12 % mu_names : names of fields to be regarded as parameters in vector mu
14 % in
'coefficients' mode, the parameters in brackets are empty
18 if ~isempty(glob) && size(glob,1) < size(glob,2)
19 warning('coordinates in variable glob are given row-wise, but expected them to be column-wise');
25 decomp_mode = params.decomp_mode;
29 Udirichlet = [params.c_dir_left, params.c_dir_right];
31 i = (glob(:,1) <= params.dir_middle);
33 Udirichlet = {i, (1-i)};
34 elseif decomp_mode == 0
35 Udirichlet = params.c_dir_left * i + (1-i) * params.c_dir_right;