1 function U0=t_part_initial_cond_POD(model, detailed_data)
2 %
function U0=t_part_initial_cond_POD(model, detailed_data)
4 %
function calculates the
final time step solutions
for all parameters used
for generating the
5 % forgoing partition basis.
6 % Then a POD over all these solutions is done and the
7 % model.basis_vector_overlap first modes are taken a initial basis
for the
10 % Markus Dihlmann 25.02.2011
12 disp(
'calculating POD of initial data training set')
16 t_part_ind = model.t_part_for_simulation - 1;
18 U0 = RB_init_data_basis(model, detailed_data);
21 mu_set = detailed_data.t_part_detailed_data{t_part_ind}.RB_info.mu_sequence;
25 for i = 1:size(mu_set,2)
26 if ~isnan(mu_set(1,i))
27 if ~ispartof(mu_set(:,i), mus_done)
28 %detailed_simulation of mu
29 mus_done = [mus_done, mu_set(:,i)];
30 model = set_mu(model, mu_set(:,i));
31 sim_data = detailed_simulation(model, detailed_data);
33 U_last = sim_data.U(:,end);
40 U0 = PCA_fixspace(U0(:,2:end), U_init, detailed_data.W, model.basis_vector_overlap);
48 function ret = ispartof(mu, M)
54 while (ret==0)&&(l<=len)