rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
IReducedModel.m
2  % interface specialization for a reduced model that can be used with the
3  % Greedy algorithm for basis generation.
4 
5  methods
6  function rm = IReducedModel(dmodel, bg_descr)
7  % function rm = IReducedModel(dmodel, bg_descr)
8  % constructor for this reduced model interface
9  %
10  % This constructor is forwarded to the IReducedModel base class.
11  if nargin == 1
12  bg_descr = [];
13  end
14  rm = rm@IReducedModel(dmodel, bg_descr);
15  end
16 
17  function reduced_data = gen_reduced_data(rmodel, detailed_data)
18  % function reduced_data = gen_reduced_data(rmodel, detailed_data)
19  % @copybrief .IReducedModel.gen_reduced_data()
20  %
21  % @copydetails .IReducedModel.gen_reduced_data()
22  %
23  % This method creates a Greedy.User.ReducedData object with a DataTree
24  % whose leafs are generated by
25  % 'rmodel.bg_descr.reduced_data_constructor'.
26  %
27  % Parameters:
28  % detailed_data: of type Greedy.User.IDetailedData
29  % rmodel: of type Greedy.User.IReducedModel
30  %
31  % Return values:
32  % reduced_data: of type Greedy.User.ReducedData
33 
34  reduced_data = Greedy.User.ReducedData(rmodel, detailed_data);
35  end
36 
37 % function set_M_on_tree(this, datatree)
38 
39 % tree_mode = isa(rmodel.M, 'DataTree.INode');
40 % tree_descr = get_leaf_description(datatree);
41 % for leaf_descr = tree_descr
42 % leaf = get(datatree, leaf_descr.basepath);
43 % if tree_mode
44 % leaf.M =
45 % end
46 % end
47 
48  end
49 
50  methods
51 
52  function rb_sim_data = rb_simulation(rmodel, reduced_data)
53  % function rb_sim_data = rb_simulation(rmodel, reduced_data)
54  % forwards the reduced simulation to the method rb_simulation_impl()
55  % after getting a suitable reduced data leaf element.
56  %
57  % @copydetails .IReducedModel.rb_simulation()
58  %
59  % Parameters:
60  % reduced_data: of type Greedy.User.ReducedData
61  %
62  reduced_data_leaf = get_leaf(reduced_data, rmodel);
63  rb_sim_data = rb_simulation_impl(rmodel, reduced_data_leaf);
64  end
65 
66  end
67 
68  methods (Abstract)
69 
70  % function rb_sim_data = rb_simulation_impl(rmodel, reduced_data)
71  % implementation of the reduced simulation
72  %
73  % Parameters:
74  % reduced_data: of type Greedy.User.IReducedDataNode
75  %
76  % Return values:
77  % rb_sim_data: structure holding the coefficient vectors of the reduced
78  % simulations and optional error estimators.
79  rb_sim_data = rb_simulation_impl(rmodel, reduced_data);
80  end
81 end
a default reduced data implementation which stores a data tree object copying the structure of a Gree...
Definition: ReducedData.m:19
Interface for leaf nodes of the DataTree in Greedy.User.ReducedData objects.
Definition: leaf.m:17
an interface specialization for detailed data objects used with the Greedy algorithm.
Definition: IDetailedData.m:19
Interface classes to be implemented by the Greedy.Algorithm user.
This is the interface for a reduced model providing methods to compute low dimensional reduced simula...
Definition: IReducedModel.m:17
Customizable implementation of an abstract greedy algorithm.
Definition: DuneRBLeafNode.m:1
interface specialization for a reduced model that can be used with the Greedy algorithm for basis gen...
Definition: IReducedModel.m:19