rbmatlab  1.13.10
 All Classes Namespaces Files Functions Variables Groups Pages
eop_theta_functional.m
Go to the documentation of this file.
1 function y = eop_theta_functional(U, v)
2 % sim_data.y = eop_theta_functional(sim_data.U, v)
3 %
4 % this function realises the evaluation of the functional
5 % l(P^M;\mu) = -1/|\Omega_0|*int_{\Omega_0}\frac{\partial P^M}{\partial t}(x) dx
6 % with \Omega_0 being a subset of \Omega.
7 %
8 % sim_data being the result of a lin_evol_detailed_simulation and v being
9 % the riest-representant of the theta-functional aquired via
10 % [v, ~] = model.operators_output(model, model_data);
11 % with model.name_output_functional = 'theta'
12 
13 % Dominik Garmatter 26.03 2012
14 
15 dP_dt = zeros(size(U,1),size(U,2)-1);
16 % it is \frac{\partial P}{\partial t}\approx\frac{P^k-P^(k-1)}{\delta t},
17 % so the following matrix is formed
18 for i = 1 : size(dP_dt,2)
19  dP_dt(:,i) = U(:,i+1) - U(:,i);
20 end
21 
22 y = (v(:)') * dP_dt; % evaluates the functional
23 
24 end