rbmatlab  1.13.10
 All Classes Namespaces Files Functions Variables Groups Pages
nonlin_evol_model_default.m
1 function model=nonlin_evol_model_default
2 
3 % localized explicit operator
4 model.L_E_local_ptr = @fv_explicit_space;
5 % localized implicit operator
6 model.L_I_local_ptr = @fv_implicit_space;
7 
8 model.fv_expl_conv_weight = 0.0;
9 model.fv_expl_diff_weight = 0.0;
10 model.fv_expl_react_weight = 0.0;
11 
12 model.fv_impl_conv_weight = 0.0;
13 model.fv_impl_diff_weight = 0.0;
14 model.fv_impl_react_weight = 0.0;
15 % implicit operators algorithm
16 model.implicit_operators_algorithm = @fv_operators_implicit;
17 model.operators_diff_implicit = @fv_operators_zero;
18 model.operators_conv_implicit = @fv_operators_zero;
19 model.operators_neumann_implicit = @fv_operators_zero;
20 
21 % init values algorithm
22 model.init_values_algorithm = @fv_init_values;
23 % name of function in rbmatlab/datafunc/init_values/
24 model.init_values_ptr = @init_values_homogeneous;
25 model.c_init = 0;
26 
27 model.filecache_ignore_fields_in_model = {'N','Nmax','M',...
28  'filecache_ignore_fields_in_model',...
29  'filecache_ignore_fields_in_detailed_data',...
30  'M_by_N_ratio'};
31 model.filecache_ignore_fields_in_detailed_data = {'RB_info'};
32 
33 model.filecache_velocity_matrixfile_extract = 0;
34 
35 % - assembling of decomposed initial data
36 model.rb_init_values = @rb_init_values_default;
37 % - detailed simulation
38 model.detailed_simulation = @nonlin_evol_detailed_simulation;
39 % - detailed simulation with empirical interpolated discretization operator
40 model.detailed_ei_simulation = @nonlin_evol_detailed_ei_simulation;
41 % - detailed simulation with empirical interpolated projected on rb space discretization operator
42 model.detailed_ei_rb_proj_simulation = @nonlin_evol_detailed_ei_rb_proj_simulation;
43 % - generation of model data
44 model.gen_model_data = @nonlin_evol_gen_model_data;
45 % - generation of detailed data
46 model.gen_detailed_data = @nonlin_evol_gen_detailed_data;
47 % - generation of online data
48 model.gen_reduced_data = @nonlin_evol_gen_reduced_data;
49 % - a reduced simulation
50 model.rb_simulation = @nonlin_evol_rb_simulation;
51 % - assembling of decomposed operators
52 model.rb_operators = @nonlin_evol_rb_operators;
53 % - plot detailed data
54 model.plot_detailed_data = @nonlin_evol_plot_detailed_data;
55 model.plot_sim_data = @nonlin_evol_plot_sim_data;
56 model.rb_reconstruction = @rb_reconstruction_default;
57 
58 model.rb_init_data_basis = @RB_init_data_basis;
59 
60 model.inner_product_matrix_algorithm = @fv_inner_product_matrix;
61 model.inner_product = @fv_inner_product;
62 model.reduced_data_subset = @nonlin_evol_reduced_data_subset;
63 model.get_inner_product_matrix = @(detailed_data) detailed_data.W;
64 model.get_rb_from_detailed_data = @(detailed_data) detailed_data.RB;
65 model.set_rb_in_detailed_data = @(detailed_data,RB) ...
66  setfield(detailed_data,'RB', RB);
67 model.get_dofs_from_sim_data = @(sim_data) sim_data.U;
68 model.get_estimators_from_sim_data = @(sim_data) sim_data.Delta;
69 model.get_estimator_from_sim_data = @(sim_data) sim_data.Delta(end);
70 model.PCA_fixspace = @PCA_fixspace;
71 model.cached_detailed_simulation = @cached_detailed_simulation;
72 model.save_detailed_simulations = @save_detailed_simulations;
73 model.load_detailed_simulation = @load_detailed_simulation;
74 model.set_mu = @set_mu_default;
75 model.set_time = @set_time_default;
76 model.get_mu = @get_mu_default;
77 model.get_rb_size = @get_rb_size_default;
78 model.laplacian_ptr = @(glob, U, model) U;
79 model.laplacian_derivative_ptr = @(glob, U, model) ones(length(U),1);
80 
81 model.l2_error_sequence_algorithm = @fv_l2_error;
82 model.linfty_error_sequence_algorithm = @fv_linfty_error;
83 model.error_algorithm = @fv_error;
84 model.error_norm = 'l2l2';
85 model.relative_error = false;
86 model.enable_error_estimator = 1;
87 
88 model.RB_generation_mode = 'greedy_uniform_fixed';
89 % choose extension method
90 model.RB_extension_algorithm = @RB_extension_PCA_fixspace;
91 % 'RB_extension_max_error_snapshot'};
92 model.RB_stop_timeout = 2*60*60; % 2 hour
93 
94 model.RB_error_indicator = 'error';
95 
96 model.RB_val_rand_seed = 1234;
97 model.RB_M_val_size = 10;
98 model.RB_refinement_theta = 0.05;
99 model.RB_stop_max_refinement_level = 15;
100 
101 model.separate_CRBs = false;
102 
103 model.data_const_in_time = 1;
104 model.local_stencil_size = 1; % number of neighbour steps for
105  % extended eind set
106 
107 model.linfty_error_sequence_algorithm = @fv_linfty_error;
108 model.l2_error_sequence_algorithm = @fv_l2_error;
109 
110 model.implicit_nonlinear = false;
111 
112 model.newton_solver = false;
113 model.newton_epsilon = 1e-11;
114 
115 model.geometry_transformation = 'none';
116