4 %
function which computes the space-time norm ||u|| = sqrt(sum_k <u^k,u^k>)
5 % with u^k a timeslice, i.e. a column of a respective
function, and <.,.>
6 % being the discrete L2-SP. With two inputfuntions you compute the error
7 % ||fd_function1 - fd_function2|| and with one of them being zero you
8 % compute the norm of the other.
10 % fd_function1 and fd_function2 have to have the same size and they are
11 % assumed to be in matrix-form, i.e. one column represents the
function in
14 % grid is
for example model_data.grid
16 % Dominik Garmatter 27.07 2012
18 A = speye(grid.nvertices)*1/grid.nvertices; % mass matrix of the discrete L2-SP
19 C = fd_function1-fd_function2;
23 skalarproduct = C(:,i)'*A*C(:,i);
24 norm_build = norm_build + skalarproduct;
26 norm = sqrt(norm_build);
function norm = eop_space_time_norm(fd_function1, fd_function2,gridbase grid, unused1)
norm = eop_space_time_norm(fd_function1, fd_function2, grid, ~)