3 %
function returning components, coefficients, and complete
4 %
operator for a linear output functional on fv discrete functions
6 %
'v * U' for a dof vector
'U' gives the desired output of the simulation
7 % assuming, that the output functional is given by
9 % ``int_{\Omega} f(u)dx``
11 % as an integral of a given analytical function multiplied with the
14 % Function supports affine decomposition, i.e. different operation modes
15 % guided by optional field decomp_mode in model. See also the
16 % contents.txt for general explanation
18 % Bernard Haasdonk 13.7.2006
20 % determine affine_decomposition_mode as integer
21 decomp_mode = model.decomp_mode;
24 if ~isempty(model_data)
25 grid = model_data.grid;
31 % simply forward coefficients of output_function
32 v = model.output_function_ptr([],model);
34 % simple quadrature quadrature of evaluation of fv function in the midpoints
35 f = model.output_function_ptr([grid.CX(:),grid.CY(:)],model);
39 v{q} = grid.A(:).*(f{q}(:));
42 % simple quadrature quadrature of evaluation of fv
function in the midpoints
43 f = model.output_function_ptr([grid.CX(:),grid.CY(:)],model);
44 % vector that realizes integral over domain of f times U
45 % s = \int_Omega f u = sum_e |e| f(c(e)) u(c(e)) = v * U
46 % hence v = (|e| f(c(e)))_e;
48 l2norm = sqrt(fv_inner_product(model, model_data, f,f));
function [ v , l2norm ] = fv_operators_output(model, model_data)
function returning components, coefficients, and complete operator for a linear output functional on ...