rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
List of all members | Public Member Functions | Public Attributes | Static Public Attributes
Greedy.Plugin.EI Class Reference

Detailed Description

Plugin for the Greedy.Algorithm class generating a collateral reduced basis space plus interpolation DOFs and a local grid.

This can be used for the empirical interpolation of parametrized functions or operator evaluations.

Definition at line 19 of file EI.m.

Inheritance diagram for Greedy.Plugin.EI:
Inheritance graph
[legend]
Collaboration diagram for Greedy.Plugin.EI:
Collaboration graph
[legend]

Public Member Functions

 EI (SnapshotsGenerator.Cached generator)
 constructor storing the snapshot generator More...
 
function Greedy.DataTree.Detailed.EILeafNode
detailed_data = 
init_basis (Greedy.User.IReducedModel rmodel,ModelData model_data, M_train)
 creates an initial detailed data node storing an initial reduced basis More...
 
function  prepare_reduced_data (Greedy.User.IReducedModel rmodel,Greedy.DataTree.Detailed.EILeafNode detailed_data)
 prepares reduced data that is necessary for the execution of other methods if indicated by needs_preparation. More...
 
function
Uapprox = 
generate_reduced (Greedy.User.IReducedModel rmodel,Greedy.User.IReducedData reduced_data,Greedy.User.IDetailedData detailed_data, U)
 generates a reduced function \(v_{\text{red}}(\mu)\). More...
 
function [
breakloop , reason ] = 
pre_check_for_end (Greedy.User.IReducedModel rmodel,Greedy.DataTree.Detailed.EILeafNode detailed_data)
 checks whether the basis generation process has come to an end. More...
 
function Greedy.DataTree.Detailed.EILeafNode
detailed_data = 
basis_extension (Greedy.User.IReducedModel rmodel,Greedy.DataTree.Detailed.EILeafNode detailed_data, max_err_seq, mu)
 extends the reduced basis space from a given function \(v_{h}(\mu)\). More...
 
function Greedy.Plugin.EI cop = copy ()
 deep copy of Greedy.Plugin.EI object More...
 
- Public Member Functions inherited from Greedy.Plugin.EICommon
 EICommon (SnapshotsGenerator.SpaceOpEvals generator)
 constructor for an EICommon instance More...
 
function [
max_errs ,
max_err_sequence
,
max_mu_index ] = 
error_estimators (IReducedModel rmodel,Greedy.DataTree.Detailed.EILeafNode detailed_data, M_train)
 computes a posteriori error estimators for the reduced simulations for every parameter vector from a given parameter set \({\cal M}_{\text{train}}\). More...
 
function Greedy.DataTree.Detailed.EILeafNode
detailed_data = 
finalize (IReducedModel rmodel,Greedy.DataTree.Detailed.EILeafNode detailed_data)
 function called after the last extension process More...
 
function Greedy.Plugin.EI merged = horzcat (varargin)
 combines an arbitrary number of Greedy.Plugin.EI arguments to a big one, with added SnapshotsGenerator.Cached instances. More...
 
function summed = vertcat (varargin)
 combines an arbitrary number of Greedy.Plugin.EI arguments to a Greedy.Plugin.SummedEI instance. More...
 
- Public Member Functions inherited from Greedy.Plugin.Default
 Default (SnapshotsGenerator.Cached generator)
 constructor for a greedy extension object More...
 
function [
max_errs ,
max_err_sequence
,
max_mu_index ] = 
error_indicators (Greedy.User.IReducedModel rmodel,Greedy.User.IDetailedData detailed_data,ParameterSampling.Interface parameter_set, reuse_reduced_data)
 computes error indicators for the reduced simulations for every parameter vector from a given parameter set \({\cal M}_{\text{train}}\). More...
 
function errs = compute_error (Greedy.User.IReducedModel rmodel,Greedy.User.ReducedData reduced_data,Greedy.User.IDetailedData detailed_data)
 computes the "true" error between a reduced and a detailed function \(\| v_h(t^k;\mu) - v_{\text{red}}(t^k;\mu) \|\). More...
 
virtual function [

max_errs ,
max_err_sequence
,
max_mu_index ] = 
error_estimators (Greedy.User.IReducedModel rmodel,Greedy.User.IDetailedData detailed_data, M_train)
 computes a posteriori error estimators for the reduced simulations for every parameter vector from a given parameter set \({\cal M}_{\text{train}}\). More...
 
- Public Member Functions inherited from Greedy.Plugin.Interface
 Interface (SnapshotsGenerator.Cached generator)
 constructor for a greedy extension object More...
 
virtual function Greedy.DataTree.Detailed.INode
detailed_data = 
init_basis (Greedy.User.IReducedModel rmodel,ModelData model_data,ParameterSampling.Interface M_train)
 creates an initial detailed data node storing an initial reduced basis More...
 
virtual function  prepare_reduced_data (Greedy.User.IReducedModel rmodel,Greedy.User.IDetailedData detailed_data)
 prepares reduced data that is necessary for the execution of other methods if indicated by needs_preparation. More...
 
virtual function [

max_errs ,
max_err_sequence
,
max_mu_index ] = 
error_indicators (Greedy.User.IReducedModel rmodel,Greedy.User.IDetailedData detailed_data, parameter_set, reuse_reduced_data)
 computes error indicators for the reduced simulations for every parameter vector from a given parameter set \({\cal M}_{\text{train}}\). More...
 
virtual function
Uapprox = 
generate_reduced (Greedy.User.IReducedModel rmodel,Greedy.User.ReducedData reduced_data,Greedy.User.IDetailedData detailed_data, U)
 generates a reduced function \(v_{\text{red}}(\mu)\). More...
 
virtual function [

breakloop , reason ] = 
pre_check_for_end (Greedy.User.IReducedModel rmodel,Greedy.User.IDetailedData detailed_data)
 checks whether the basis generation process has come to an end. More...
 
virtual function Greedy.User.IDetailedData
detailed_data = 
basis_extension (Greedy.User.IReducedModel rmodel,Greedy.User.IDetailedData detailed_data, max_err_seq, mu)
 extends the reduced basis space from a given function \(v_{h}(\mu)\). More...
 
virtual function Greedy.User.IDetailedData
detailed_data = 
finalize (Greedy.User.IReducedModel rmodel,Greedy.User.IDetailedData detailed_data)
 function called after the last extension process More...
 

Public Attributes

 A = "[]"
 temporary matrix generated by prepare_reduced_data() More...
 
 stop_Mmax = inf
 maximum number of generated collateral reduced basis vectors. More...
 
 ei_target_error = "approx"
 error mode for the empirical interpolation error More...
 
 target_error_external = false
 boolean flag indicating that the error indicator which is assumed to be minimized is not equal to the ones returned by error_indicators() More...
 
 noof_extensions = 1
 specifies how many collateral reduced basis functions shall be added in each extension step. More...
 
 minimum_residual = 1e-6
 if the residual is below this barrier, the basis extension step is skipped. More...
 
 enable_regularisation = false
 if this regularisation flag is set to true, the collateral reduced basis spaces are forced to have zero mean, enforcing global conservation in case of operator interpolation. More...
 
- Public Attributes inherited from Greedy.Plugin.EICommon
 compute_lebesgue = true
 boolean flag specifying whether after the final extension step the Lebesgue constant shall be computed and stored in the Greedy.DataTree.Detailed.EILeafNode info fields. More...
 
- Public Attributes inherited from Greedy.Plugin.Default
Greedy.User.ReducedData reduced_data = "[]"
 temporary handle to the last object computed by prepare_reduced_data(). More...
 
 needs_preparation
 boolean indicating whether the prepare_reduced_data() method needs to be computed before error_indicators can be computed. More...
 
 indicator_mode = "error"
 string specifying which indicators shall be used by the error_indicators() method. More...
 
 use_l2_error = true
 boolean flag indicating whether the \(L^2(\Omega)\)-norm is used by compute_error(). More...
 
 relative_error = false
 boolean flag specifying whether we want to use the relative error for error_indicators() and compute_error() methods. More...
 
- Public Attributes inherited from Greedy.Plugin.Interface
 id
 a string identifying the basis extension algorithm, should be unique over all instances of Interface implementations. More...
 
 relative_error
 boolean flag specifying whether we want to use the relative error for error_indicators() and compute_error() methods. More...
 
 indicator_mode
 string specifying which indicators shall be used by the error_indicators() method. More...
 
 needs_preparation
 boolean indicating whether the prepare_reduced_data() method needs to be computed before error_indicators can be computed. More...
 
::SnapshotsGenerator.Cached generator
 an object generating possible (high dimension) basis functions
 

Static Public Attributes

static const  generated_basis_type = "ei"
 
static const  info_fields
 cell array of field names that shall be copied to the generated Greedy.DataTree.Detailed.EILeafNode instance. More...
 
- Static Public Attributes inherited from Greedy.Plugin.Interface
static const  generated_basis_type
 string specifying the detailed data produced by this basis generation algorithm object. More...
 

Constructor & Destructor Documentation

Greedy.Plugin.EI.EI ( SnapshotsGenerator.Cached  generator)

constructor storing the snapshot generator

Parameters
generatorsnapshot generator

Definition at line 143 of file EI.m.

Here is the caller graph for this function:

Member Function Documentation

function Greedy.DataTree.Detailed.EILeafNode detailed_data = Greedy.Plugin.EI.basis_extension ( Greedy.User.IReducedModel  rmodel,
Greedy.DataTree.Detailed.EILeafNode  detailed_data,
  max_err_seq,
  mu 
)

extends the reduced basis space from a given function \(v_{h}(\mu)\).

This generates a new basis function \(\varphi_{n+1} \in {\cal W}_h\) from the sequence of detailed functions \(v_h(t^k,\mu)\) for \(k=0,\ldots,K\) as returned by the SnapshotsGenerator.Cached generator.

Parameters
rmodelan object specifying the basis generation process.
detailed_dataobject defining the basis generation algorithm and storage for storing high dimensional data, i.e. dependent on dimension \(H\). This data is necessary for detailed simulations, construction of online matrices, reduced_data and reconstruction of reduced simulations.
max_err_seqsequence of error indicators as returned as second return argument of error_indicators()
muparamter vector \(\mu\).
Return values
detailed_dataupdated data tree node .

Definition at line 280 of file EI.m.

Here is the call graph for this function:

function Greedy.Plugin.EI cop = Greedy.Plugin.EI.copy ( )
virtual

deep copy of Greedy.Plugin.EI object

Return values
copcopied object

Implements Greedy.Plugin.EICommon.

Reimplemented in Greedy.Plugin.EIPOD.

Definition at line 402 of file EI.m.

Here is the call graph for this function:

function Uapprox = Greedy.Plugin.EI.generate_reduced ( Greedy.User.IReducedModel  rmodel,
Greedy.User.IReducedData  reduced_data,
Greedy.User.IDetailedData  detailed_data,
  U 
)

generates a reduced function \(v_{\text{red}}(\mu)\).

Note
This function might depend on a previous execution of prepare_reduced_data().
Parameters
rmodelan object specifying the basis generation process. The parameter \(\mu\) for which the error shall be computed must be set by set_mu(rmodel, mu) before.
reduced_dataan object storing all (low-dimensional) reduced matrices and vectors needed for reduced simulations.
detailed_dataobject defining the basis generation algorithm and storage for storing high dimensional data, i.e. dependent on dimension \(H\). This data is necessary for detailed simulations, construction of online matrices, reduced_data and reconstruction of reduced simulations.
Uoptional DOF vector, for example operator evaluations.
Return values
UapproxA sequence of Dof vectors of the functions \(v_{\text{red}}(\cdot;t^k,\mu)\).

Definition at line 220 of file EI.m.

function Greedy.DataTree.Detailed.EILeafNode detailed_data = Greedy.Plugin.EI.init_basis ( Greedy.User.IReducedModel  rmodel,
ModelData  model_data,
  M_train 
)

creates an initial detailed data node storing an initial reduced basis

Parameters
rmodelan object specifying the basis generation process.
M_trainan object specifying the parameter vector set \({\cal M}_{\text{train}}\) from which the basis functions are obtained.
model_dataMatlab structure storing (possibly) high dimensional data needed by IDetailedModel.detailed_simulation().
Return values
detailed_dataan object storing the initial reduced basis vectors.

This method initializes the detailed data node.

Definition at line 171 of file EI.m.

function [ breakloop , reason ] = Greedy.Plugin.EI.pre_check_for_end ( Greedy.User.IReducedModel  rmodel,
Greedy.DataTree.Detailed.EILeafNode  detailed_data 
)

checks whether the basis generation process has come to an end.

Global break conditions (error_tolerance, timeout and validation ratio) are handled by Greedy.Algorithm .

Parameters
rmodelobject specifying how the reduced simulations can be computed.
detailed_dataobject defining the basis generation algorithm and storage for storing high dimensional data, i.e. dependent on dimension \(H\). This data is necessary for detailed simulations, construction of online matrices, reduced_data and reconstruction of reduced simulations.
Return values
breakloopboolean flag indicating whether the basis generation process is finished for this reduced basis space.
reasondescriptive text telling about the reasons why, the extension process needs to break.

Definition at line 243 of file EI.m.

function Greedy.Plugin.EI.prepare_reduced_data ( Greedy.User.IReducedModel  rmodel,
Greedy.DataTree.Detailed.EILeafNode  detailed_data 
)

prepares reduced data that is necessary for the execution of other methods if indicated by needs_preparation.

Methods that might depend on the execution of this method are
Parameters
rmodelan object specifying the basis generation process.
detailed_dataobject defining the basis generation algorithm and storage for storing high dimensional data, i.e. dependent on dimension \(H\). This data is necessary for detailed simulations, construction of online matrices, reduced_data and reconstruction of reduced simulations.

This method pre-computes the normal solution matrix for \(L^2\)-approximation in the collateral reduced space, in case ei_target_error is set to approx.

Definition at line 198 of file EI.m.

Here is the caller graph for this function:

Member Data Documentation

Greedy.Plugin.EI.A = "[]"

temporary matrix generated by prepare_reduced_data()

Note
This property has the MATLAB attribute Hidden set to true.
Matlab documentation of property attributes.
Default: "[]"

Definition at line 34 of file EI.m.

Greedy.Plugin.EI.ei_target_error = "approx"

error mode for the empirical interpolation error

if isequal(value, linfty-interpol) this.use_l2_error = 0; else this.use_l2_error = 1; end

This can be either interpol or approx for the true interpolation error or the projection error of the operator interpolation error in the collateral reduced basis space.


Default: "approx"

Note
This property has custom functionality when its value is changed.

Definition at line 80 of file EI.m.

Greedy.Plugin.EI.enable_regularisation = false

if this regularisation flag is set to true, the collateral reduced basis spaces are forced to have zero mean, enforcing global conservation in case of operator interpolation.


Default: false

Definition at line 130 of file EI.m.

Greedy.Plugin.EI.info_fields
static
Initial value:
= {" 'stop_Mmax', 'ei_target_error', 'noof_extensions', \
'minimum_residual', 'enable_regularisation' "}

cell array of field names that shall be copied to the generated Greedy.DataTree.Detailed.EILeafNode instance.

Note
This property has the MATLAB attribute Hidden set to true.
Matlab documentation of property attributes.
Default: {" 'stop_Mmax', 'ei_target_error', 'noof_extensions', \ 'minimum_residual', 'enable_regularisation' "}

Definition at line 54 of file EI.m.

Greedy.Plugin.EI.minimum_residual = 1e-6

if the residual is below this barrier, the basis extension step is skipped.

This option is only used in case of target_error_external .


Default: 1e-6

Definition at line 119 of file EI.m.

Greedy.Plugin.EI.noof_extensions = 1

specifies how many collateral reduced basis functions shall be added in each extension step.

This makes only sense to be set greater than 1 for trajectories, i.e. when more than one possible candidates for basis extension exist for one parameter.


Default: 1

Definition at line 105 of file EI.m.

Greedy.Plugin.EI.stop_Mmax = inf

maximum number of generated collateral reduced basis vectors.


Default: inf

Definition at line 71 of file EI.m.

Greedy.Plugin.EI.target_error_external = false

boolean flag indicating that the error indicator which is assumed to be minimized is not equal to the ones returned by error_indicators()

This is set to true by the Greedy.Plugin.PODEI class.


Default: false

Definition at line 93 of file EI.m.


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