2 % a test model doing nothing
4 % In
this detailed model only the name of the called member
function is
5 % printed. Such it enables to set-up
Greedy algorithms and check wether the
6 % functions are called in the correct order.
9 enable_error_estimator =
false;
11 reduced_data_constructor =
'';
13 stencil_mode =
'edge';
15 local_stencil_size = 1;
19 function rm =
ReducedModel(detailed_model, bg_descr, crb_enabled)
20 %
function rm =
ReducedModel(detailed_model, bg_descr, crb_enabled)
23 if nargin == 1 || isempty(bg_descr)
27 % this implements a copy constructor if necessary...
30 if isfield(bg_descr, 'reduced_data_constructor')
31 rm.reduced_data_constructor = bg_descr.reduced_data_constructor;
35 rm.crb_enabled = crb_enabled;
39 function reduced_data = gen_reduced_data(this, detailed_data)
40 % function reduced_data = gen_reduced_data(this, detailed_data)
44 disp('calling reduced_data');
45 if isempty(this.reduced_data_constructor)
48 reduced_data = this.reduced_data_constructor(this, detailed_data);
52 function reduced_data = extract_reduced_data_subset(this, reduced_data)
53 % function reduced_data = extract_reduced_data_subset(this, reduced_data)
57 disp('calling extract_reduced_data_subset');
61 function rb_sim_data = rb_simulation(this, reduced_data)
62 % function rb_sim_data = rb_simulation(this, reduced_data)
66 disp('calling rb_simulation');
67 rb_sim_data.a = zeros(1, this.detailed_model.descr.nt);
70 function a0 = rb_init_values(this, dummy)
71 % function a0 = rb_init_values(this, dummy)
74 disp('calling rb_init_values');
78 function rb_sim_data = rb_reconstruction(this, detailed_data, rb_sim_data)
79 % function rb_sim_data = rb_reconstruction(this, detailed_data, rb_sim_data)
83 disp('calling rb_reconstruction');
84 rb_sim_data.U = zeros(detailed_data.model_data.grid.nelements, this.detailed_model.descr.nt);
87 function c = copy(this)
88 % function c = copy(this)
92 % c: an
object of type
Test.
ReducedModel which is a deep copy of this
object.
99 function Delta = get_estimators_from_sim_data(sim_data)
100 disp('calling get_estimators_from_sim_data');
104 function Delta = get_estimator_from_sim_data(sim_data)
105 disp('calling get_estimator from sim_data');
109 function U = get_dofs_from_sim_data(sim_data)
function a0 = rb_init_values_separable(IReducedModel rmodel,Greedy.DataTree.Detailed.RBLeafNode detailed_data, decomp_mode)
function computing initial values for a reduced simulation.
a test model doing nothing
Test reduced basis implementation.
This is the interface for a reduced model providing methods to compute low dimensional reduced simula...
Customizable implementation of an abstract greedy algorithm.