rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
Functions
ei_detailed.m File Reference

constructs a collateral reduced basis and interpolation points for given operator evaluations. More...

Go to the source code of this file.

Functions

function
ei_detailed_data = 
ei_detailed (model, model_data, LU_fnames, params)
 constructs a collateral reduced basis and interpolation points for given operator evaluations. More...
 

Detailed Description

constructs a collateral reduced basis and interpolation points for given operator evaluations.

Definition in file ei_detailed.m.

Function Documentation

function ei_detailed_data = ei_detailed (   model,
  model_data,
  LU_fnames,
  params 
)

constructs a collateral reduced basis and interpolation points for given operator evaluations.

This function prepares the empirical interpolation for an arbitrary sequence of DOF-vectors. The DOF-vectors are expected to be stored in the file(s) given in LU_fnames, which is a cell array of strings or a string array. The files are expected to contain a single matrix LU, which is a set of columnwise DOF-vectors. Usually the DOF-vectors correspond to operator evaluations, which are e.g. computed by ei_operator_collect_files().

Attention
Every field in the returned structure ei_detailed_data is a cell array, and this function only manipulates entries indexed by (params.index, params.time_index), e.g. ei_detailed_data.QM{params.index, params.time_index} holds the basis functions for the empirical interpolation of the operator with the index params.index for arguments lying in the time slice indexed by params.time_index. As this function extends data given in model_data, the empirical interpolation can such be computed for different operators and time slices.
Parameters
modelmodel
model_datamodel data
LU_fnamesa cell array of strings or an array of strings of file names relative to rbmatlabtemp(), where time series of DOF vectors are stored for which the collateral reduced basis space shall be trained. Usually, LU_fnames is generated by ei_operator_collect_files(). The files should contain an array named LU of dimension dofs x model.nt+1 or dofs x model.nt+1+#intermediate newton steps In the first case, only the vectors LU(:,s) with model_data.time_split_map(s)==params.time_index are used for empirical interpolation.
paramsa struct containing control parameters for the empirical interpolation.
Return values
ei_detailed_dataa struct containing the vectors and matrices storing all high dimensional data needed for empirical interpolation, plus some information on the basis generation. Note, that this might be an extension the parameter model_data.
Required fields of model_data:
  • grid —  a structure containing geometry information of a mesh used for discretizations
  • QM —  QM
  • TM —  TM
  • BM —  BM
  • ei_info —  ei info
  • W —  W
Required fields of model:
  • nt —  number of time steps for evolution discretizations
  • get_inner_product_matrix —  function W=f(model_data) returning the mass matrix \(W\) for inner product computation \(\langle u,v \rangle = u^t W v\).
  • verbose —  flag indicating the verbosity level of informative output
Optional fields of params:
  • ei_Mmax —  integer indicating, when stop is wanted after reaching the maximum number of collateral RB vectors (default = inf)
  • ei_target_error —  string which is one of
    • approx for L2-projection error,
    • interpol for L2-interpolation error or
    • linfty-interpol for \(L^{\infty}\) interpolation error
    (default = approx)
  • ei_stop_epsilon —  interpolation error limit stopping the basis extension when reached. (Default: 0)
  • time_index —  index of time slice for which the empirical interpolation information is generated. See time splitting for details. (default = 1)
  • index —  an operator index that can be associated with the generated empirical interpolation data.
  • compute_lebesgue —  compute the Lebesgue constant for the interpolation (default = false)
  • skip_search —  boolean flag indicating whether the search for new basis vectors shall be skipped after a time domain split. If set to false, the basis vectors from the previous CRB step chosen for this time domain are used. (default = false)
Optional fields of model_data:
  • time_split_map —  a map between a time step index \(t \in \{1, \ldots, model.nt+1\}\) and a time slice index \(s \in \{1, \ldots, S_{\max}\}\), where \(S_{\max}\) is the number of time slices. For more details look at documentation of params.LU_fnames. (default = \(t\mapsto 1 \) for all \(t\)).
Generated fields of ei_detailed_data:
  • QM —  a matrix of columnwise DOF-vectors \(q_j\) for interpolation to be used as the colateral basis
  • TM —  a vector for the set of magic points by containing the index numbers of the corresponding DOF-nodes (In case of piecewise constant or linear basis-functions, the maxima \(x_i\) always can be found in a cell centroid (deg=0) or a node (deg=1).
  • BM —  the corresponding interpolation-matrix of dimension Mmax x Mmax, i.e. interpolation can be done by solving the equation system \(B \sigma = \left(\zeta(x_1), \ldots, \zeta(x_M)\right)\) then \(Q \sigma\) is the empirical interpolation. Note, that this reconstruction may not be done in the online phase!
  • ei_info —  structure giving special details on creation:
    • max_err_sequence: a vector of errors, AFTER the corresponding new basis vector extension,
    • extension_filenum: a vector with the filenumbers, from which the snapshots are selected
    • extension_filepos: a vector with the relative position of the snapshot within its file extension_filenum. By the latter two fields, a unique identification of the selected snapshots is possible, i.e. a later translation into parameter vectors, time, etc.
    • stopped_on_Mmax: flag indicating, whether stop on maximum params.ei_Mmax is a reason for termination
    • stopped_on_monotonicity: flag indicating, that there is no error decrease anymore, which incicates an accuracy problem, so termination is performed
    • stopped_on_duplicate_point: flag indicating, that the empirical interpolation selected the same interpolation point twice for interpolation, which indicates an accuracy limit
    • stopped_on_epsilon: flag indicating, that the empirical interpolation stopped because the interpolation error dropped below the given limit params.ei_stop_epsilon

Definition at line 17 of file ei_detailed.m.

Here is the caller graph for this function: