4 % Demo of SCM (coercive constant)
7 % David Kreplin 05.01.2015
12 model.gen_model_data=@lin_stat_gen_model_data;
13 model_data = model.gen_model_data(model);
15 operator=@ (model) model.operators(model,model_data);
16 innerproduct_matrix = model.get_inner_product_matrix(model_data);
20 params.NumberOfParameters = 1000;
22 params.max_iterations=100;
24 params.dirichlet_gids = model_data.df_info.dirichlet_gids;
25 params.type='coercive';
30 SCM_data=SCM(model,params,operator,innerproduct_matrix);
31 %Alternative (see documentation): SCM_data=SCM(model,params,model_data);
35 innerproduct_matrix = model.get_inner_product_matrix(model_data);
36 innerproduct_matrix = remove_dirichlet(innerproduct_matrix,0,params.dirichlet_gids);
37 fprintf('Results:\ncoercive constant upper bound lower bound (scm coercive constant)\n');
39 mu = rand_uniform(1,model.mu_ranges);
40 model = set_mu(model,mu);
42 [A,~] = model.operators(model,model_data);
43 A=remove_dirichlet(A,0,params.dirichlet_gids);
44 coer=eigs(A,innerproduct_matrix,1,'sm');
45 alpha_UB = SCMonline(mu,model,operator,SCM_data,'ub');
47 alpha_LB = SCMonline(mu,model,operator,SCM_data,'lb');
48 %alpha_LB = SCMonline(mu,model,model_data,SCM_data);
50 fprintf('%f %f %f\n',coer,alpha_UB,alpha_LB);
52 rmserror = rmserror+(coer-alpha_LB)^2;
53 maderror = maderror + abs(coer-alpha_LB);
55 rmserror = sqrt(rmserror/20)
56 maderror = maderror/20
64 function A=remove_dirichlet(A,mode,I)
function descr = thermalblock_model_hp(params)
Thermal Block example similar as described in the book of A.T. patera and G. Rozza (just one paramete...
function scm_coercive_demo()
scm_coercive_demo()