1 function U0 = init_values_homogeneous(glob,params)
2 %
function U0 = init_values_homogeneous(glob,params)
4 %
function constructing the initial values of the convection diffusion
5 % problem in the specified global points glob and parameters.
6 % It returns a constant
function scaled by a scalar params.c_init.
8 % required fields in params
9 % c_init: constant
for homogeneous initial data to be returned
11 % in
'coefficient' mode the model_data structure is empty
13 % Bernard Haasdonk 22.7.2006
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');
25 error('wrong number of parameters!');
28 % affine decomposition is supported by init_data, so automatically
31 decomp_mode = params.decomp_mode;
35 elseif decomp_mode == 0
36 U0 = params.c_init * ones(length(glob),1);
37 elseif decomp_mode == 1
38 U0 = { ones(length(glob),1) };
40 error([
'decomp_mode number ', params.decomp_mode,
' is unknown.']);