rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
fv_l2_error.m
Go to the documentation of this file.
1 function l2_error = fv_l2_error(U1,U2,W)
2 %function l2_error = fv_l2_error(U1,U2,W)
3 % function computing the l2-error between the two fv-functions or function
4 % sequences in U1,U2.
5 %
6 % Parameters:
7 % U1: matrix of column vectors representing finite volume function dof
8 % sequence of first function
9 % U2: matrix of column vectors representing finite volume function dof
10 % sequence of second function
11 % W: mass matrix for L^2 scalar product such that
12 % `u^t W v = \langle u, v \rangle_{L^2}`
13 %
14 % Return values:
15 % l2_error: a single value or sequence of values corresponding to the
16 % column-differences between U1 and U2 correct Omega-integrals are
17 % computed.
18 
19 % Bernard Haasdonk 20.7.2006
20 
21 l2_error = sqrt(sum(W * ((U1-U2).^2)));
22 
23 
function l2_error = fv_l2_error(U1, U2, W)
function computing the l2-error between the two fv-functions or function sequences in U1...
Definition: fv_l2_error.m:17