1 function model = comsol_ThermalBlock3D_model(varargin)
2 %
function model = comsol_ThermalBlock3D_model(varargin)
4 % This
function defines the Comsol-3D-
ThermalBlock-Model and adds the
5 % necessary fields to the model!
11 %%%%%%%%%%%%%%%%%%%%%%%%%%
12 % CHOOSE THE MODEL HERE!!!
13 %%%%%%%%%%%%%%%%%%%%%%%%%%
16 model=gen_rbmatlab_model_from_comsol_model('ThermalBlock_3D_5x5x5_LinLagr_Einfluss_unten_3Params');
17 %model=gen_rbmatlab_model_from_comsol_model('ThermalBlock_3D_5x5x5_LinLagr_Einfluss_unten_8Params');
18 %model=gen_rbmatlab_model_from_comsol_model('ThermalBlock_3D_5x5x5_LinLagr_Einfluss_unten_125Params');
20 model=gen_rbmatlab_model_from_comsol_model(varargin{1});
23 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
24 %%% RB_GENERATION_MODE
25 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26 model.RB_generation_mode =
'greedy_uniform_fixed';
27 model.RB_numintervals = 3 * ones(size(model.RB_numintervals));
35 %set initial mu and mu_ranges
36 length_mu = length(get_mu(model));
37 model.mu_ranges = cell(length_mu,1);
41 model.mu_ranges{k} = [mu_min, mu_max];
43 model=set_mu(model, ones(1,length_mu)*(mu_min+mu_max)/2);
45 model.get_inner_product_matrix = @(detailed_data)detailed_data.inner_product_matrices.L2;
46 model.RB_stop_epsilon = 1e-12;
47 model.RB_stop_Nmax = 20;
49 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
51 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
54 model.operators = @comsol_ThermalBlock3D_operators;
55 model.comsol_calculate_inner_product_matrices = @comsol_ThermalBlock3D_calculate_inner_product_matrices;
56 model.operators_output = @comsol_ThermalBlock3D_operators_output;
57 model.compute_output_functional = 1;
59 %error estimation quantities
60 model.coercivity_alpha = @(model) min(get_mu(model));
61 model.coercivity_alpha_LB = min(min(cell2mat(model.mu_ranges)));