1 function errs = fv_error(U1,U2,W, params)
2 %
function errs = fv_error(U1,U2,W, params);
4 %
function computing the error between the two time-dependent
5 % fv-functions in the columns of U1,U2. Result is a single value or
6 % sequence of values representing either the l2 differences of the
7 % temporal sequences or the energy error.
8 % correct Omega-integrals are computed by respecting the cell-areas
11 % required fields of model:
12 % error_norm: 'l2l2', 'l1l2', 'l2' or 'energy'
14 % plus additional fields required by fv_l2_error, fv_energy_error.
16 % Bernard Haasdonk 30.8.2006
18 if isequal(params.error_norm,'l2')
19 errs = fv_l2_error(U1,U2,W);
20 elseif isequal(params.error_norm,
'energy')
21 errs = fv_energy_error(U1,U2,W,params);
22 elseif isequal(params.error_norm, 'l2l2')
23 errs = fv_l2l2_error(U1,U2,W,params);
24 elseif isequal(params.error_norm, 'l1l2')
25 errs = fv_l1l2_error(U1,U2,W,params);
27 error('error_norm unknown!');