1 function coercivity_alpha = porsche_coercivity_alpha(model)
2 %
function coercivity_alpha = porsche_coercivity_alpha(model)
5 %
function calculating a lower bound \alpha_{LB}
for the coercivity
8 % - according to
"Evaluation of Flux Integral Outputs
9 % for the Reduced Basis Method" by Jens L. Eftang and Einar M. Rønquist,
10 % 2009 (equation (73)):
11 % \alpha_{LB}(\mu) = \frac{\lambda^- (\mu)}{\lambda^+(\mu)}
12 % - according to
"A Reduced Basis Element Method for the Steady Stokes
13 % Problem" by Lovgren, Maday, Ronquist, 2006 (equation (3.48)):
14 % \alpha_{LB}(\mu) = \lambda_{min}
16 % Implemented here is: \alpha_{LB}(\mu) = \frac{\lambda^- (\mu)}{\lambda^+(\mu)}
18 % Oliver Zeeb, 12.05.11
20 %Calculate the diffusivity matrices (K) for every macro-transformation,
21 %then calculate the eigenvalues of theses matrices. See also
22 %porsche_diffusivity_tensor_coefficients, whic does similar things, but
23 %without calculation the eigenvalues
26 % get the affine transformatins for every makrotriangle:
27 % e.g. the transformation from reference to original domain.
28 % macro points of the original domain:
29 pmacro_ref=model.pmacro; % macro points of the reference domain
30 pmacro_glob = model.pmacro; % macro points of the original/global domain
31 % first 7 points in pmacro_glob are the car points, all the others are
32 % points on the rectangular, so the first points have to be
33 % changed according to the values in model.mu_names
35 % set the macro_points according to the values in model.mu_names
36 for k=1:length(model.mu_names)
37 position_in_pmacro = str2double(model.mu_names{k}(2));
38 x_or_y = model.mu_names{k}(1);
44 error(
'unknown entry in model.mu_names');
47 mu_k = getfield(model, model.mu_names{k});
49 pmacro_glob(position_in_pmacro,x_or_y) = mu_k;
53 %
get all the transformations of the macrotriangles to the
54 % reference-triangle, calculate the K-Matrices and add them to the
57 for k=1:length(model.tmacro)
58 tria_pts_ref = pmacro_ref(model.tmacro(k,:),:);
59 tria_pts_glob = pmacro_glob(model.tmacro(k,:),:);
60 [C, G] = aff_trafo_coef(tria_pts_ref, tria_pts_glob);
64 %define the K-matrices (see equation (6.22) )
65 % K_o,k = eyes for potential flow!
66 K=det_G*G_inv*K_o*G_inv';
67 eigenvalue_min_K(k)=min(eig(K));
68 eigenvalue_max_K(k)=max(eig(K));
70 coercivity_alpha=min(eigenvalue_min_K)/max(eigenvalue_max_K);