rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
fv_estimate_coercivity_alpha.m
1 function [alpha] = fv_estimate_coercivity_alpha(grid,model)
2 %function [alpha] = fv_estimate_coercivity_alpha(grid,model)
3 %
4 % function decomposing L_I = Id + Delta t * M_I and
5 % estimating the coercivity constant alpha(mu) of M_I
6 % as required for the energy error-estimate in th RB
7 % simulation.
8 %
9 % in case of advdiff should it be the diffusivity constant
10 
11 % Bernard Haasdonk 20.7.2006
12 
13 model.t = 0;
14 model.dt = model.T / model.nt;
15 
16 [L_I_diff, bdir_I_diff] = fv_operators_diff_implicit(grid,model);
17 
18 [L_I_conv, bdir_I_conv] = fv_operators_conv_implicit(grid,model);
19 
20 [L_I_neu, bneu_I] = fv_operators_neuman_implicit(grid,model);
21 
22 M_I = L_I_diff + L_I_conv + L_I_neu; % latter two are zero!
23 
24 % alternative:
25 %[L_I,L_E,b] = ...
26 % operators_conv_diff(grid,model); % independent of U!!
27 %M_I = (L_I-speye(size(L_I)))/model.dt;
28 
29 if model.verbose > 9
30  disp('estimating coercivity alpha:')
31 end;
32 alpha = abs(eigs(M_I,1,'SM'));
33 if parmas.verbose > 9
34  disp(['alpha = ',num2str(alpha)]);
35 end;
36 
37 
38 
function r = verbose(level, message, messageId)
This function displays messages depending on a message-id and/or a level. Aditionally you can set/res...
Definition: verbose.m:17