1 function diffusivity = diffusivity_homogeneous(glob, U, params)
2 %
function diffusivity = diffusivity_homogeneous(glob, U, params)
4 %
function computing the diffusivity pointwise evaluation in the point
5 % sequences indicated by global coordinates in the columns of the matrix glob.
6 % It returns a homogeneous diffusion coefficient.
8 % required fields of params:
9 % k : scalar scaling factor
11 % generated fields of diffusivity:
12 % epsilon: upper bound on diffusivity value
13 % K: vector with diffusivity values
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;
26 diffusivity.epsilon = 0;
28 if decomp_mode == 2 % decomp_mode ==2, single component
29 diffusivity = params.k;
30 elseif decomp_mode == 0
31 diffusivity.epsilon = params.k;
32 diffusivity.K = params.k * ones(length(glob),1);
33 elseif decomp_mode == 1
35 % single component independent whether k in mu
37 d.K = ones(length(glob),1);
40 error(
'unknown decomp mode');