3 % method which modifies reduced_data, which is the data, that will
4 % be passed to the online-simulation algorithm.
6 % Typically,
this routine only does a submatrix extraction of the
'Nmax' sized
7 % offline-objects to produce
'N' sized objects
for the real simulation.
9 % Required fields of model:
10 % N : number of reduced basis vectors to choose
12 % Required fields of reduced_data:
13 % N : number of reduced basis vectors in the reduced_data,
14 % must be larger than model.N!!
16 % Bernard Haasdonk 27.2.2011
18 reduced_data_subset = reduced_data;
20 if reduced_data.N ~= model.N
21 % extract correct N-sized submatrices and subvectors from reduced_data
22 if model.N > reduced_data.N
23 error(
'N too large for current size of reduced basis!');
26 if isfield(reduced_data,
'AN_comp')
27 dummy = zeros(reduced_data.N);
30 reduced_data_subset.AN_comp = reduced_data.AN_comp(ind,:);
32 if isfield(reduced_data, 'fN_comp')
33 reduced_data_subset.fN_comp = reduced_data.fN_comp(1:N,:);
35 if isfield(reduced_data, 'lN_comp')
36 reduced_data_subset.lN_comp = reduced_data.lN_comp(1:N,:);
39 Q_f = size(reduced_data_subset.fN_comp,2);
40 Q_a = size(reduced_data_subset.AN_comp,2);
42 ind = reshape(1:reduced_data.N*Q_a,reduced_data.N,Q_a)';
44 ind = [(1:Q_f)'; ind(:) + Q_f];
45 reduced_data_subset.G = reduced_data.G(ind,ind);
47 reduced_data_subset.N = N;
function reduced_data_subset = lin_stat_reduced_data_subset(model, reduced_data)
method which modifies reduced_data, which is the data, that will be passed to the online-simulation a...
function reduced_data_subset = lin_evol_reduced_data_subset(model, reduced_data)
method which modifies reduced_data, which is the data, that will be passed to the online-simulation a...