rbmatlab  1.13.10
 All Classes Namespaces Files Functions Variables Groups Pages
List of all members | Public Member Functions | Public Attributes | Protected Member Functions
Greedy.DataTree.Detailed.INode Class Referenceabstract

Detailed Description

Interface class for general data tree nodes storing detailed data returned by Greedy.Interface.gen_detailed_data()

Usually every Greedy.Interface instance creates a new node in the detailed data tree with new reduced basis functions or a logging information about the steps taken by the Greedy.Interface node.

Definition at line 20 of file INode.m.

Inheritance diagram for Greedy.DataTree.Detailed.INode:
Inheritance graph
[legend]
Collaboration diagram for Greedy.DataTree.Detailed.INode:
Collaboration graph
[legend]

Public Member Functions

function  set_rb (RB)
 sets the reduced basis space
 
function RB = get_rb ()
 returns the reduced basis space
 
function  snapshot (id, id_text, snapshot_description)
 creates a copy of the Greedy.Info element of the subtree rooted by this node and stores it in a history.
 
function sl = get_snapshot_length (id)
 returns the number of history entries stored for a specific id.
 
function fs = format_snapshot (id, indices)
 retuns a formatted structure of a history item for several indices
 
virtual function siz = get_rb_size ()
 returns the size of the reduced basis stored in this tree.
 
virtual function DataTree.IdMapNode siz = get_ei_size ()
 returns the size of the collateral reduced basis stored in this tree.
 
virtual function [
ot1 ,
ot2 ,
ot3 ] = 
offtime (IReducedModel rmodel)
 returns up to three different offline time measurements
 
- Public Member Functions inherited from DataTree.INode
virtual function INode
data = 
get (index)
 Access to a child of the current node.
 
virtual function index = get_index (id, mu, nt)
 Obtains the leaf index vector that best fits the child description given by the three arguments.
 
virtual function DataTree.INode tree = create_tree (DataTree.ICreator creator, ids, mu_cube, tslice, basepath)
 Creates a new tree from a subtree specified by ids, parameter and time index regions.
 
virtual function
children = 
length ()
 Returns the number of children of the node.
 
virtual function this = set (index, value)
 Sets a child at the given path in the tree hierarchy.
 
function  leaf_func (funcptr, ids, mu_cube, tslice)
 applies a function to all leafs of a DataTree
 
function tree = create_scalar_tree (funcptr, ids, mu_cube, tslice)
 copies the current trees with different leafs. These leafs are computes by a function returning scalar values.
 
function
start_index = 
traverse_start ()
 Start iterator for a full traverse of the DataTree.
 
function
next_index = 
traverse_next (this_index)
 iterator for a full traverse of the DataTree.
 
function
description = 
get_active_leaf_description (IModel model, ids)
 returns an enumeration of all leaves' basepath index vectors with a description of their parents.
 
function
description = 
get_leaf_description (ids, mu_cube, tslice)
 returns an enumeration of all leaves' basepath index vectors with a description of their parents.
 
function tstop = index_valid_till (index)
 Returns the last valid time step index of a time slice.
 
function INode data = get_by_description (id, mu, nt)
 A combination of get_index() and get()
 
function
active_leaf_index = 
get_active_leaf_index (IModel model, id)
 retuns the leaf element index for the current IDetailedModel configuration.
 
function DataTree.LeafNode
active_leaf = 
get_active_leaf (IModel model, id)
 retuns the leaf element for the current IDetailedModel configuration.
 
function  display (fn, basepath, name)
 overwrites the standard display method for DataTree objects
 
function lines = disp_node (basepath, fn)
 returns a cell array of strings with information on the node.
 
- Public Member Functions inherited from Greedy.DataTree.Info
function  append_field (fieldname, value)
 appends a value to an information field storing a vector
 
function  set_field (fieldname, value)
 sets an information field
 
function value = get_field (fieldname, default)
 returns the value of an information field
 
function value = get_field_on_active_child (fieldname,IModel model, id)
 returns the value of an information field from the active leaf node
 
function  set_fields (other, fns)
 copies fields from another struct
 
function  set_stop_flag (flag, on_off)
 sets the stop flag in this node
 
function  propagate_stop_flag (flag, on_off)
 updates the stop flag in all children nodes of the current one.
 
function
stopped_flags = 
stopped_on_active_child (flags,IModel model, id)
 returns stop flags set on the active child
 
function
stopped_flags = 
stopped_on_any_child (flags)
 returns stop flags set on any child of the current node
 
function
stopped_flags = 
stopped_on_all_leafs (flags)
 returns stop flags set on all children nodes of the current node
 

Public Attributes

 history
 storage of history entries (c.f. snapshot() and format_snapshot() )
 
- Public Attributes inherited from Greedy.DataTree.Info
 fields = "[]"
 a dynamically growing structure of information fields
 
 stop_flags = {""}
 a cell array of strings describing why the generation of this node terminated.
 

Protected Member Functions

function  snapshot_children (id, id_text, snapshot_description)
 forward the snapshot generation to the children
 
function
children = 
gather_children_format_snapshot (id, indices)
 helper function called by format_snapshot()
 

Member Function Documentation

function fs = Greedy.DataTree.Detailed.INode.format_snapshot (   id,
  indices 
)

retuns a formatted structure of a history item for several indices

Todo:
: rewrite
Parameters
idid
indicesindices
Return values
fsfs
Generated fields of fs:
  • id —  id
  • descr —  descr
  • history —  history
  • children —  children

Definition at line 157 of file INode.m.

function children = Greedy.DataTree.Detailed.INode.gather_children_format_snapshot (   id,
  indices 
)
protected

helper function called by format_snapshot()

Parameters
idid
indicesindices
Return values
childrenchildren

Definition at line 214 of file INode.m.

function DataTree.IdMapNode siz = Greedy.DataTree.Detailed.INode.get_ei_size ( )
pure virtual

returns the size of the collateral reduced basis stored in this tree.

Return values
siza tree of nodes which are objects of stored collateral reduced basis spaces \({\cal W}^{{\cal L}_h}_{\text{red}}\) for operators \({\cal L}_h\)

Implemented in Greedy.DataTree.Detailed.EILeafNode, Greedy.DataTree.Detailed.PODEILeafNode, Greedy.DataTree.Detailed.DuneRBLeafNode, Greedy.DataTree.Detailed.RBLeafNode, TwoPhaseFlow.DetailedLeafNode, Greedy.DataTree.Detailed.InfoNode, and Greedy.DataTree.Detailed.IdMapNode.

function RB = Greedy.DataTree.Detailed.INode.get_rb ( )

returns the reduced basis space

Todo:
is this correct or should it be in a specialization?
Return values
RBRB

Definition at line 71 of file INode.m.

function siz = Greedy.DataTree.Detailed.INode.get_rb_size ( )
pure virtual

returns the size of the reduced basis stored in this tree.

Return values
sizdimension of stored reduced basis space \({\cal W}_{\text{red}}\)

Implemented in Greedy.DataTree.Detailed.EILeafNode, Greedy.DataTree.Detailed.PODEILeafNode, Greedy.DataTree.Detailed.DuneRBLeafNode, Greedy.DataTree.Detailed.InfoNode, TwoPhaseFlow.DetailedLeafNode, Greedy.DataTree.Detailed.RBLeafNode, and Greedy.DataTree.Detailed.IdMapNode.

function sl = Greedy.DataTree.Detailed.INode.get_snapshot_length (   id)

returns the number of history entries stored for a specific id.

Parameters
idhistory ID
Return values
slnumber of history entries

Definition at line 139 of file INode.m.

function [ ot1 , ot2 , ot3 ] = Greedy.DataTree.Detailed.INode.offtime ( IReducedModel  rmodel)
pure virtual

returns up to three different offline time measurements

Parameters
rmodelobject specifying how the reduced simulations can be computed.
Return values
ot1ot1
ot2ot2
ot3ot3

Implemented in Greedy.DataTree.Detailed.PODEILeafNode, Greedy.DataTree.Detailed.EILeafNode, TwoPhaseFlow.DetailedLeafNode, Greedy.DataTree.Detailed.InfoNode, Greedy.DataTree.Detailed.DuneRBLeafNode, Greedy.DataTree.Detailed.RBLeafNode, and Greedy.DataTree.Detailed.IdMapNode.

function Greedy.DataTree.Detailed.INode.set_rb (   RB)

sets the reduced basis space

Todo:
is this correct or should it be in a specialization?
Parameters
RBRB

Definition at line 58 of file INode.m.

function Greedy.DataTree.Detailed.INode.snapshot (   id,
  id_text,
  snapshot_description 
)

creates a copy of the Greedy.Info element of the subtree rooted by this node and stores it in a history.

The history is organized by short ID strings to whom a longer description text should be attached. Furthermore every history entry can be decribed by a Matlab struct. A Date tag is added automatically.

A use-case for this feature is the Greedy.TrainingSetAdaptation class which refines the training parameter space several times. At all these time instants it creates a new history entry.

Parameters
idthe id string under which the history entry shall be stored.
id_texta descriptive text for the id. This is only used at the first time a history entry for the id is created.
snapshot_descriptiona description of the history entry with arbitrary content.

Definition at line 87 of file INode.m.

function Greedy.DataTree.Detailed.INode.snapshot_children (   id,
  id_text,
  snapshot_description 
)
protected

forward the snapshot generation to the children

Parameters
idid
id_textid text
snapshot_descriptionsnapshot description

Definition at line 199 of file INode.m.


The documentation for this class was generated from the following file: