3 %
function evaluating a
function in the list of global coordinates
4 % specified in the columns of
'glob'.
6 % The result is a matrix of flux vector results as columns of flux.
8 % The
function is given by
function pointer to components and coefficients
9 % required fields of params:
10 % conv_flux_coefficients_ptr: Function must
11 % allow call
'flux = f(params)' Return is a vector of length
12 %
'Q' with (parameter dependent) coefficients in flux.
13 % conv_flux_components_ptr: Functions must
14 % allow call
'flux = f(glob,U,params)' Return of components is
15 % a cell array of matrices of the same size as
'glob' with the
16 % point values of the flux.
18 % Linear combination of components by coefficients then yields the
19 % complete evaluation.
21 % Bernard Haasdonk 27.8.2009
23 % determine affine_decomposition_mode as integer
26 if ~isempty(glob) && size(glob,1) < size(glob,2)
27 warning('coordinates in variable glob are given row-wise, but expected them to be column-wise');
33 decomp_mode = params.decomp_mode;
36 flux = params.conv_flux_coefficients_ptr(params);
37 elseif decomp_mode == 1; % components
38 flux = params.conv_flux_components_ptr(glob,params);
39 else % decomp_mode = 0, complete
40 flux_coefficients = params.conv_flux_coefficients_ptr(params);
41 flux_components = params.conv_flux_components_ptr(glob,params);
42 flux = lincomb_sequence(flux_components,flux_coefficients);
function flux = conv_flux_affine_decomposed(glob, U, params)
function evaluating a function in the list of global coordinates specified in the columns of glob...