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

Detailed Description

Default implementation of a Greedy.Plugin.Interface interface class.

Definition at line 19 of file Default.m.

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

Public Member Functions

 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

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
 

Additional Inherited Members

- 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.Default.Default ( SnapshotsGenerator.Cached  generator)

constructor for a greedy extension object

Parameters
generatorobject generating the (high dimensional) basis functions

Definition at line 99 of file Default.m.

Member Function Documentation

function errs = Greedy.Plugin.Default.compute_error ( Greedy.User.IReducedModel  rmodel,
Greedy.User.ReducedData  reduced_data,
Greedy.User.IDetailedData  detailed_data 
)
virtual

computes the "true" error between a reduced and a detailed function \(\| v_h(t^k;\mu) - v_{\text{red}}(t^k;\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 constructing and 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.
Return values
errsa sequence of errors at every time step \(k=0,\ldots,K\).

Implements Greedy.Plugin.Interface.

Definition at line 173 of file Default.m.

Here is the call graph for this function:

Here is the caller graph for this function:

function [ max_errs , max_err_sequence , max_mu_index ] = Greedy.Plugin.Default.error_estimators ( Greedy.User.IReducedModel  rmodel,
Greedy.User.IDetailedData  detailed_data,
  M_train 
)
pure virtual

computes a posteriori error estimators for the reduced simulations for every parameter vector from a given parameter set \({\cal M}_{\text{train}}\).

An a posteriori error estimator estimates an error

\[\eta^k(\mu) \geq \| v_h(t^k;\mu) - v_{\text{red}}(t^k;\mu) \|\]

for every time step \(0\leq t^0, \ldots, t^K = T\) and every parameter \(\mu \in {\cal M}\). The norm is a problem specific norm determined by the options in rmodel.

This function's main use is to find a parameter vector

\[\mu_{\max} = \arg \sup_{\mu \in {\cal M}_{\text{train}} } \max_{k=0,\ldots,K} \eta^k(\mu).\]

Note
The estimator must only depend on low dimensional data as computed by the prepare_reduced_data() method such that it is efficiently computable.
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.
M_traina set of parameter vectors \({\cal M}_{\text{train}}\) as returned by ParameterSampling.Interface.space .
Return values
max_errsa matrix of size n_parameters x model.nt+1 storing the error indicator \(\eta^k(\mu)\) for every \(k=0,\ldots,K\) and \(\mu \in {\cal M}_{\text{train}}\).
max_err_sequencea sequence of error indicators \(\eta^k(\mu_{\max})\) for every \(k=0,\ldots,K\).
max_mu_indexthe index of the parameter vector \(\mu_{\max}\) in the parameter_set.set matrix.

Implemented in Greedy.Plugin.POD, and Greedy.Plugin.PODDune.

Here is the caller graph for this function:

function [ max_errs , max_err_sequence , max_mu_index ] = Greedy.Plugin.Default.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}}\).

An error indicator estimates an error

\[\eta^k(\mu) \geq \| v_h(t^k;\mu) - v_{\text{red}}(t^k;\mu) \|\]

for every time step \(0\leq t^0, \ldots, t^K = T\) and every parameter \(\mu \in {\cal M}\). The norm is a problem specific norm determined by the options in rmodel.

This function's main use is to find a parameter vector

\[\mu_{\max} = \arg \sup_{\mu \in {\cal M}_{\text{train}} } \max_{k=0,\ldots,K} \eta^k(\mu)\]

.

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.
parameter_seta set of parameter vectors \({\cal M}_{\text{train}}\) as returned by ParameterSampling.Interface.space .
reuse_reduced_dataoptional flag indicating whether the reduced data needed for reduced simulations or computation of error estimators is still valid since its last generation. (default = false)
Return values
max_errsa matrix of size n_parameters x model.nt+1 storing the error indicator \(\eta^k(\mu)\) for every \(k=0,\ldots,K\) and \(\mu \in {\cal M}_{\text{train}}\).
max_err_sequencea sequence of error indicators \(\eta^k(\mu_{\max})\) for every \(k=0,\ldots,K\).
max_mu_indexthe index of the parameter vector \(\mu_{\max}\) in the parameter_set matrix.
Note
This method is controlled by the indicator_mode variable:

If indicator_mode equals

Definition at line 120 of file Default.m.

Here is the call graph for this function:

Member Data Documentation

Greedy.Plugin.Default.indicator_mode = "error"

string specifying which indicators shall be used by the error_indicators() method.

Possible values are
error for an error between the detailed and the reduced computation. estimator for an a posteriori error estimator
Note
This property is an abstract property without implementation.
Matlab documentation of property attributes.


Default: "error"

Definition at line 62 of file Default.m.

Greedy.Plugin.Default.needs_preparation

boolean indicating whether the prepare_reduced_data() method needs to be computed before error_indicators can be computed.

Note
This property has the MATLAB attribute Dependent set to true.
This property is an abstract property without implementation.
Matlab documentation of property attributes.
This property has the MATLAB attribute Dependent set to true.
Matlab documentation of property attributes.
[readonly]

Definition at line 45 of file Default.m.

Greedy.Plugin.Default.reduced_data = "[]"

temporary handle to the last object computed by prepare_reduced_data().

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

Definition at line 29 of file Default.m.

Greedy.Plugin.Default.relative_error = false

boolean flag specifying whether we want to use the relative error for error_indicators() and compute_error() methods.

Note
This property is an abstract property without implementation.
Matlab documentation of property attributes.


Default: false

Definition at line 85 of file Default.m.

Greedy.Plugin.Default.use_l2_error = true

boolean flag indicating whether the \(L^2(\Omega)\)-norm is used by compute_error().

Otherwise the \(L^{\infty}(\Omega)\)-norm is applied.


Default: true

Definition at line 73 of file Default.m.


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