5 %
function making an rb reconstruciton
for t-partition models.
6 % In t-partition there is an overlap at the border of time-partitions. At
7 % the border the initial value of the next t-partition is discarded and the
8 % last timestep solution of the foregoing t-partition is kept.
12 % Markus Dihlmann 15.02.2011
14 base_model = model.base_model;
16 nr_t_parts = length(sim_data.t_part_sim_data); %number of t-partitions
18 t_part_sim_data = sim_data.t_part_sim_data;
20 %rb_reconstruction of the sim_data in every partition
21 for ind = 1:nr_t_parts
22 t_part_sim_data{ind} = rb_reconstruction(base_model, detailed_data.t_part_detailed_data{ind},t_part_sim_data{ind});
25 %putting together global sim_data cutting off first step in each partition
26 %(except initial partition);
27 sim_data.U = t_part_sim_data{1}.U;
30 if ~model.transition_model
31 for ind = 2:nr_t_parts
32 len=size(t_part_sim_data{ind}.U,2);
33 sim_data.U = [sim_data.U,t_part_sim_data{ind}.U(:,2:len)];
36 for ind = 2:nr_t_parts
37 sim_data.U = [sim_data.U,t_part_sim_data{ind}.U];
43 sim_data.t_part_sim_data = t_part_sim_data;