2 % Reduced data implementation
for non-linear evolution problems with finite
3 % volume discretizations.
5 % See @ref DHO11
for details on the implementations of the reduced matrices
10 % reduced basis space only
14 % collateral reduced basis space only
18 % the collateral reduced basis space and the reduced basis space
21 %
this is not used at the moment
25 properties(Transient, Access=
private)
33 properties(Dependent, SetAccess=private)
34 % number of reduced basis vectors stored in this data node.
37 % number of collateral reduced basis vectors stored in this data node.
40 % number of collateral reduced basis vectors used for error estimation.
47 % Constructor for the generation of the reduced matrices and vectors.
59 copy_extract(rd, copy, rmodel);
61 fill_fields(rd, rmodel, detailed_data);
63 error('Did not find constructor for your arguments');
67 function conds = get_conds(this)
68 conds_rb = get_conds(this.rb_rd);
69 conds_ei = get_conds(this.ei_rd);
81 [LL_I, bb_I] = rb_operators(rmodel, detailed_data, decomp_mode);
87 function index = get_index(this,
id, mu, nt)
88 index = get_index(this.ei_rb_rd,
id, mu, nt);
91 function node = get(this, index)
92 node = get(this.ei_rb_rd, index);
97 function yesno = needs_subset_copy(this, rmodel)
98 % function yesno = needs_subset_copy(this, rmodel)
99 % @copybrief ::
GreedyUser.IReducedDataNode.needs_subset_copy()
101 % @copydetails ::
GreedyUser.IReducedDataNode.needs_subset_copy()
102 % This method always returns true, because it is only a container element
103 % with no data and can be copied very cheaply! A traversal over leafs in
104 % order to check whether referencing is possible, is too slow.
112 methods(Access=private)
114 function fill_fields(this, rmodel, detailed_data)
115 this.rmodel = rmodel;
117 this.ei_rd = create_tree(detailed_data.ei, this, [], [], [], []);
119 this.rb_rd = create_tree(detailed_data.rb, this, [], [], [], []);
122 this.detailed_ei_tree = detailed_data.ei;
123 this.mode = 'ei_rb_1';
124 this.ei_rb_rd = create_tree(detailed_data.rb, this, [], [], [], []);
125 this.detailed_ei_tree = [];
129 function copy_extract(this, copy, rmodel)
130 this.rmodel = rmodel;
132 this.ei_rd = create_tree(copy.ei_rd, this, [], [], [], []);
134 this.rb_rd = create_tree(copy.rb_rd, this, [], [], [], []);
135 this.mode = 'ce_ei_rb';
136 this.ei_rb_rd = create_tree(copy.ei_rb_rd, this, [], [], [], []);
144 function node = create_leaf_node(this, arg_node, basepath, mu_cube, tslice)
145 % function new_node = create_leaf_node(this, node, basepath, mu_cube, tslice)
146 % specialization method for
leaf elements as described in
147 %
DataTreeICreator.create_leaf_node().
149 % @copydetails ::
DataTreeICreator.create_leaf_node()
151 % There are seven modes for the creation of new
leaf elements:
156 % - 'ei_rb_2' creates a "mixed"
leaf node
160 % - 'ei_rb_1' At this stage, the "mixed"
leaf node tree should be of
161 % the same state as the pure reduced basis tree. If this differs
162 % from the collateral space, the "mixed" tree needs to be refined
163 % by attaching tree levels from the EI tree. This is initiated by
166 % extracts smaller reduced matrices and vectors.
168 % extracts smaller reduced matrices and vectors.
170 % (optionally) extracts smaller reduced matrices and vectors.
178 this.detailed_rb_leaf = arg_node;
179 this.reduced_rb_leaf = get(this.rb_rd, basepath);
180 this.mode = 'ei_rb_2';
182 node = create_tree(this.detailed_ei_tree,...
184 this.idsearch, mu_cube, tslice,...
187 this.detailed_rb_leaf = [];
188 this.reduced_rb_leaf = [];
189 this.mode = 'ei_rb_1';
191 reduced_ei_leaf = get(this.ei_rd, basepath);
192 detailed_ei_leaf = arg_node;
195 this.detailed_rb_leaf, ...
199 if needs_subset_copy(arg_node, this.rmodel)
205 if needs_subset_copy(arg_node, this.rmodel)
211 if needs_subset_copy(arg_node, this.rmodel)
221 function N = get.N(this)
223 N = create_scalar_tree(this.ei_rb_rd, @(x) x.N);
226 function M = get.M(this)
228 M = create_scalar_tree(this.ei_rb_rd, @(x) x.M);
231 function Mstrich = get.Mstrich(this)
233 Mstrich = create_scalar_tree(this.ei_rb_rd, @(x) x.Mstrich);
reduced model for non-linear evolution problems as given by a NonlinEvol.DetailedModel.
Implementation of a Greedy.User.IReducedDataNode storing reduced data depending on collateral reduc...
Interface for leaf nodes of the DataTree in Greedy.User.ReducedData objects.
Reduced basis implementation for non-linear evolution equations.
default implementation of the DataTree.ICreator interface
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...
function s1 = structcpy(s1, s2)
copies the fields of structure s2 into structure s1. If the field to be copied does not exist in s1 y...
Reduced data implementation for non-linear evolution problems with finite volume discretizations.
Reduced data implementation for non-linear evolution problems with finite volume discretizations.
Customizable implementation of an abstract greedy algorithm.
Implementation of a Greedy.User.IReducedDataNode storing reduced data depending on reduced basis sp...
Interface class for the generation and storage of reduced basis spaces as described in Module (M2)...