1 function [C1,C2] = estimate_lin_ds_bound_constants(model)
2 %
function [C1,C2] = estimate_lin_ds_bound_constants(model)
4 %
function estimating the constant
5 % @f$ C_1 \geq ||\exp(A(\mu) t)||_G @f$
for all t and
6 % @f$ C_2 \geq ||C(\mu)||_G @f$ by some random sets of @f$\mu@f$, t and
8 % These quantities are required
for a-posteriori error estimation
11 % Bernard Haasdonk 3.4.2009
16 nmu = model.estimate_lin_ds_nmu;
17 nX = model.estimate_lin_ds_nX;
18 nt = model.estimate_lin_ds_nt;
20 G = model.G_matrix_function_ptr(model);
22 X = rand(size(G,1),nX);
23 %Xnorm = sqrt(sum((G*X).*X,1));
24 X = X*sparse(1:nX,1:nX,Xnorm.^(-1));
25 Xnorm = sqrt(sum((G*X).*X,1));
26 %disp(
'check norm 1!')
29 M = rand_uniform(nmu,model.mu_ranges);
30 T = (0:nt)/nt * model.T;
32 % the following implementation with 2 loops is very bad matlab
33 % style. But I
do not yet see, how that can be vectorized easily...
37 model = model.set_mu(M(:,mui),model);
38 model.decomp_mode = 0; % complete
39 A = model.A_function_ptr(model);
40 C = model.C_function_ptr(model);
44 expAtX = expm(A*T(ti))*X ;
45 normAtX = sqrt(sum((G*expAtX).*expAtX,1));
58 normCX = sqrt(sum((G*CX).*CX,1));
60 normCX = sqrt(CX.*CX);