1 classdef PODEILeafNode < Greedy.DataTree.Detailed.ILeafNode
2 % tree node implementation
for a detailed data structure holding a reduced
3 % basis and a collateral reduced basis.
18 properties (Access =
private, Hidden=
true)
26 % constructor initializing the detailed data node
29 % both_active:
boolean flag specifying whether both basis trees are
30 % extended at the same time (c.f. Greedy.Plugin.PODEI)
31 rbeiddn = rbeiddn@Greedy.DataTree.Detailed.
ILeafNode(model_data);
33 rbeiddn.both_active = both_active;
37 function RB = get.RB(this)
41 function this = set.RB(this, value)
45 function siz = get_rb_size(this)
46 siz = get_rb_size(this.rb);
49 function siz = get_ei_size(this)
50 siz = get_ei_size(this.ei);
53 function node = get_active_leaf(this, model,
id)
54 % function node = get_active_leaf(this, model,
id)
55 % @copybrief DataTree::
INodeget_active_leaf()
57 % @copydetails DataTree::
INodeget_active_leaf()
60 % node: of type Greedy.DataTree.Detailed::
ILeafNode
67 node = get_active_leaf(this.rb, model,
id);
71 function [ot1, ot2, ot3] = offtime(this, rmodel)
72 [ot3, ot1, ot2] = offtime(this.rb, rmodel);
73 [ot1, ot2, temp] = offtime(this.ei, rmodel);
77 function delete_rb(this, index)
78 % function delete_rb(this, index)
79 % @copybrief Greedy.DataTree.Detailed::
RBLeafNodedelete_rb()
81 % @copydetails Greedy.DataTree.Detailed::
RBLeafNodedelete_rb()
82 delete_rb(this.rb, index);
87 % function value = get_field_on_active_child(this, fieldname, model,
id)
93 % if ~isequal(
id, 'rb')
94 % value = get_field_on_active_child(this.ei, fieldname, model,
id);
96 % if ~isequal(
id, 'ei')
97 % value = [value, get_field_on_active_child(this.rb, fieldname, model,
id)];
101 function propagate_stop_flag(this, flag, on_off)
107 set_stop_flag(this, flag, on_off);
109 propagate_stop_flag(this.ei, flag, on_off);
111 propagate_stop_flag(this.rb, flag, on_off);
114 function stopped_flags = stopped_on_active_child(this, flags, model,
id)
115 % function stopped_flags = stopped_on_active_child(this, flags, model,
id)
116 % @copybrief .Greedy.DataTree::
Infostopped_on_active_child()
118 % @copydetails .Greedy.DataTree::
Infostopped_on_active_child()
132 stopped_flags = stopped_on_active_child(this.ei, flags, model,
id);
134 if length(flags) == 1
135 stopped_flags =
false;
141 stopped_flags2 = stopped_on_active_child(this.rb, flags, model,
id);
142 stopped_flags3 = intersect(this.stop_flags, flags);
143 if length(flags) == 1
144 stopped_flags = stopped_flags | stopped_flags2 | ~isempty(stopped_flags3);
146 stopped_flags =
union(
union(stopped_flags, stopped_flags2), stopped_flags3);