1 function [LL_I, bb_I] = nonlin_evol_rb_operators(model, detailed_data, reduced_data)
2 %
function [LL_I, bb_I] = nonlin_evol_rb_operators(model, detailed_data, reduced_data)
4 %
function computing the time-dependent reduced basis
operator and
5 % vector. If the decomposition mode is
'coefficients', the detailed
6 % data are superfluous, can (and should
for H-independence) be empty.
8 % required fields of model
9 % implicit_operators_algorithm: name of function for computing the
10 % L_I,b_I-operators with arguments (grid, params)
11 % example fv_operators_implicit
12 % inner_product_name: name of inner-product function for
13 % discrete function l2-scalar-product
15 % Function supports affine decomposition, i.e. different operation modes
16 % guided by optional field affine_decomp_mode in params. See also the
17 % contents.txt for general explanation
19 % optional fields of params:
20 % mu_names : names of fields to be regarded as parameters in vector mu
21 % affine_decomp_mode: operation mode of the function
22 % 'complete' (default): no parameter dependence or decomposition is
23 % performed. output is as described above.
24 % 'components': For each output argument a cell array of output
25 % arguments is returned representing the q-th component
26 % independent of the parameters given in mu_names
27 % 'coefficients': For each output argument a cell array of output
28 % arguments is returned representing the q-th coefficient
29 % dependent of the parameters given in mu_names
31 % In 'coefficients' mode the detailed data is empty.
33 % Bernard Haasdonk 23.7.2006
35 % determine affine_decomposition_mode as integer
36 %decomp_mode = get_affine_decomp_mode(model);
38 decomp_mode = model.decomp_mode;
40 if decomp_mode ==0 % complete: simple projection on RB
44 RBtranspA = detailed_data.RB' * A;
46 % if isequal(params.model_type, 'implicit_nonaffine_linear')
47 % L_I = detailed_data.implicit_operator;
48 % b_I = detailed_data.implicit_constant;
50 [L_I, b_I] = model.implicit_operators_algorithm(model, detailed_data);
53 % apply all operator contributions to RB:
54 L_I_RB = L_I * detailed_data.RB;
56 % fill output quantities
58 LL_I = RBtranspA * L_I_RB;
61 bb_I = RBtranspA * b_I;
63 elseif decomp_mode == 1
65 if model.newton_solver || model.implicit_nonlinear
66 disp('what is the use of the flag implicit_nonlinear ??');
67 % [dummy, b_I{1}] = fv_operators_diff_implicit(model, detailed_data, [], []);
71 [L_I, b_I] = model.implicit_operators_algorithm(model, ...
78 RB = detailed_data.RB;
84 % init output quantities
87 bb_I(:) = {zeros(Nmax,1)};
90 LL_I(:) = {zeros(Nmax,Nmax)};
92 % apply all operator contributions to RB:
93 L_I_RB = cell(Q_L_I,1);
94 L_I_RB(:) = {zeros(size(RB))};
96 L_I_RB{q}(:,:)= L_I{q} * RB;
99 % fill output quantities
102 LL_I{q} = RBtranspA * L_I_RB{q};
107 bb_I{q} = RBtranspA * b_I{q};
110 else % decomp_mode== 2 -> coefficients
112 [L_I, b_I] = model.implicit_operators_algorithm(model, []);
114 % rb-operator coefficients can simply be forwarded