rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
List of all members | Public Member Functions | Public Attributes
Postprocess.StochasticAssessment.Output Class Reference

Detailed Description

result class for computations executed by an Postprocess.StochasticAssessment.Assessment object.

This class provides methods to transform and visualize the gathered data for publication in LaTeX/Tikz documents.

Definition at line 19 of file Output.m.

Inheritance diagram for Postprocess.StochasticAssessment.Output:
Inheritance graph
[legend]
Collaboration diagram for Postprocess.StochasticAssessment.Output:
Collaboration graph
[legend]

Public Member Functions

 Output (values,Postprocess.StochasticAssessment.Assessment assessment)
 Constructor. More...
 
function  plot_landscape ()
 plots a two dimensional error landscape in case of two dimensional plot_fields More...
 
function  print_table (datafile)
 prints out a CSV table with gathered data. More...
 
function  print_landscape (datafile, fieldname)
 equivalent to the plot_landscape() function put prints out a table which can be interpreted e.g. by pgfplots/Tikz. More...
 
function  print_3d_curve (datafile, fieldname)
 equivalent to the print_landscape() function put prints out a table which can be interpreted for a 3d-curve plot e.g. by pgfplots/Tikz. More...
 
function slic = get_slice (fieldname, cell_range, struct_range)
 helper function slicing a field in the values attribute More...
 
function rslice = reduce_slice (red_func, fieldname, cell_range, struct_range, direction)
 extends the get_slice() function by also applying a reduction function on each matrix entry. More...
 
function  merge (Postprocess.StochasticAssessment.Output other)
 helper function merging this Output object with another one. More...
 

Public Attributes

 values
 values computed by Postprocess.StochasticAssessment.Assessment More...
 
 rd_conds
 cell array of all condition numbers of reduced simulaton system matrices.
 
 rtime_est = {""}
 time for the computation of the error estimator. By default this is not set. More...
 
Assessment assessment
 the object with which the values are generated More...
 
 error_bound = 1
 maxmimum error values to be plotted. Above this values error display is cropped. More...
 
 estimator_bound = 100
 maxmimum estimator values to be plotted. Above this values error display is cropped. More...
 
 stab_limit = 1e-2
 define stability-region as error being smaller than sqrt(diffmax * area), e.g. diffmax = 4, area = 2e-7 stability region More...
 

Constructor & Destructor Documentation

Postprocess.StochasticAssessment.Output.Output (   values,
Postprocess.StochasticAssessment.Assessment  assessment 
)

Constructor.

Parameters
valuesthe structure with the gathered data by the Postprocess.StochasticAssessment.Assessment object
assessmentthe generating object

Definition at line 116 of file Output.m.

Member Function Documentation

function slic = Postprocess.StochasticAssessment.Output.get_slice (   fieldname,
  cell_range,
  struct_range 
)

helper function slicing a field in the values attribute

Parameters
fieldnamename of the field in the values attributed to be sliced
cell_rangecell indices to be extracted from the field. If empty all cell entries are returned Default: []
struct_rangeUsually the values attribute is a cell of structure arrays. arrays. This range defines a slice in the structure array. If empty all array entries are returned. Default: []
Return values
slicthe sliced values attribute

Definition at line 431 of file Output.m.

Here is the caller graph for this function:

function Postprocess.StochasticAssessment.Output.merge ( Postprocess.StochasticAssessment.Output  other)

helper function merging this Output object with another one.

The following rules apply during merging
  1. If values.max_Delta is all Inf, copy max_Delta and max_Delta_ind from other.
  2. If values.max_err is all Inf, copy max_err and max_err_ind from other.
  3. If one of rconds, dconds or rtime_est is empty, copy it from other
  4. If one of rtime, rrtime or dtime is set to all-NaN, copy it from other
  5. If this and other have valid rtime (i.e. not-Nan) and only one of both has computed estimators, compute rtime_est by subtracting one from the other.
Parameters
otheranother object to be merged into this one.
Required fields of other:
  • values —  values
  • assessment.compute_estimates —  assessment.compute estimates
  • rtime_est —  rtime est
  • rd_conds —  rd conds

Definition at line 508 of file Output.m.

function Postprocess.StochasticAssessment.Output.plot_landscape ( )

plots a two dimensional error landscape in case of two dimensional plot_fields

Used attributes

Definition at line 133 of file Output.m.

Here is the call graph for this function:

function Postprocess.StochasticAssessment.Output.print_3d_curve (   datafile,
  fieldname 
)

equivalent to the print_landscape() function put prints out a table which can be interpreted for a 3d-curve plot e.g. by pgfplots/Tikz.

This function can be used to display certain curves on the error landscape generated by print_landscape().

An example for a pgfplots graphics that can interpret the table output is shown in the following code snippet:

\begin{axis}[zmode=log,log basis z=10,axis on top,
view={-50}{-30}, axis lines=box,
xlabel={$N$}, ylabel={$M$},
zlabel={$\eta_{N,M,M'}$}]
\addplot3[mark=0]
table[x=N, y=M, z=error] {error_curve.dat};
Parameters
datafilea string specifying the path and filename of the data table to be stored
fieldnamethe fieldname in the values attribute that shall be plotted Default: max_err

Definition at line 382 of file Output.m.

Here is the call graph for this function:

function Postprocess.StochasticAssessment.Output.print_landscape (   datafile,
  fieldname 
)

equivalent to the plot_landscape() function put prints out a table which can be interpreted e.g. by pgfplots/Tikz.

An example for a pgfplots graphics that can interpret the table output is shown in the following code snippet:

\begin{axis}[zmode=log,log basis z=10,axis on top,
view={-50}{-30}, axis lines=box,
xlabel={$N$}, ylabel={$M$},
zlabel={$\eta_{N,M,M'}$}]
\addplot3[surf]
table[x=N, y=M, z=error] {error_landscape.dat};
Parameters
datafilea string specifying the path and filename of the data table to be stored
fieldnamethe fieldname in the values attribute that shall be plotted Default: max_err

Definition at line 340 of file Output.m.

Here is the call graph for this function:

function Postprocess.StochasticAssessment.Output.print_table (   datafile)

prints out a CSV table with gathered data.

An example for a pgfplotstable graphic that can interpret the table output is shown in the following code snippet:

\pgfplotstabletypeset[
font={\footnotesize},
columns={dim1,dim2,{time_avg},{err_max},{offtime_total}},
columns/{dim1}/.style={
column name={N},
\ifnum\pgfplotstablerow=0
\fi
},
columns/{dim2}/.style={
column name={M},
\ifnum\pgfplotstablerow=0
\fi
},
},
columns/{time_avg}/.style={
column name={\o-run--time[s]}
},
columns/{err_max}/.style={
column name={max. error}
},
columns/{offtime_total}/.style={
column name={offline time[h]},
divide by=3600
},
every even row/.style={
before row={\rowcolor[gray]{0.9}}},
every head row/.style={
before row=\toprule,after row=\midrule},
every last row/.style={
after row=\bottomrule},
display columns/2/.style={dec sep align},
display columns/3/.style={zerofill,precision=2},
empty cells with={\ensuremath{-}}
]{table.dat};

This function prints out a table with data for the average, min and max values of

  • reduced simulation time,
  • reduced simulation reconstruction time,
  • reduced simulation error estimator computation time,
  • maximum error estimator and the
  • maximum "true" error Furthermore, the offline time is printed out split up into
  • the total time spent in the offline phase,
  • the time spent for (pre-)computation of detailed simulations
  • the time spent in the EI-greedy algorithm
  • the time spent in the reduced basis generation algorithm
Parameters
datafilea string specifying the path and filename of the data table to be stored

Definition at line 196 of file Output.m.

Here is the call graph for this function:

function rslice = Postprocess.StochasticAssessment.Output.reduce_slice (   red_func,
  fieldname,
  cell_range,
  struct_range,
  direction 
)

extends the get_slice() function by also applying a reduction function on each matrix entry.

Parameters
red_funcfunction pointer who is applied to each matrix entry in the slice, e.g. '@max or @mean'
fieldnamename of the field in the values attributed to be sliced
cell_rangecell indices to be extracted from the field. If empty all cell entries are returned. Default: []
struct_rangeUsually the values attribute is a cell of structure arrays. arrays. This range defines a slice in the structure array. If empty all array entries are returned. Default: []
directioninteger specifying in which direction a matrix shall be reduced. In case it is equal to 2, the matrix is transposed before red_func is applied. Default: 1
Return values
rslicethe sliced and reduced values attribute

Definition at line 462 of file Output.m.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Postprocess.StochasticAssessment.Output.assessment

the object with which the values are generated

Todo:
Maybe we should cache this, too...

Definition at line 64 of file Output.m.

Postprocess.StochasticAssessment.Output.error_bound = 1

maxmimum error values to be plotted. Above this values error display is cropped.

Default: = 1;

Definition at line 74 of file Output.m.

Postprocess.StochasticAssessment.Output.estimator_bound = 100

maxmimum estimator values to be plotted. Above this values error display is cropped.

Default: = 100;

Definition at line 85 of file Output.m.

Postprocess.StochasticAssessment.Output.rtime_est = {""}

time for the computation of the error estimator. By default this is not set.


Default: {""}

Definition at line 56 of file Output.m.

Postprocess.StochasticAssessment.Output.stab_limit = 1e-2

define stability-region as error being smaller than sqrt(diffmax * area), e.g. diffmax = 4, area = 2e-7 stability region

If the averaged error exceeds this value, the visualization is cropped here. This happens especially for small reduced basis sizes. (Default = 1e-2)


Default: 1e-2

Definition at line 97 of file Output.m.

Postprocess.StochasticAssessment.Output.values

values computed by Postprocess.StochasticAssessment.Assessment

Usually this is a cell array of structure arrays. For cells correspond to the rsamples and the structure array corresponds to the test samples given by M_test.

Definition at line 36 of file Output.m.


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