Plugin for the Greedy.Algorithm class generating collateral reduced basis space plus interpolation DOFs and a local grid for several different parameterized functions or operators.
This can be used for the empirical interpolation of parametrized functions or operator evaluations.
Definition at line 19 of file SummedEI.m.
Public Member Functions | |
SummedEI (Greedy.Plugin.EI varargin) | |
constructor "summing together a list of different EI plugin instances. More... | |
function
Greedy.DataTree.Detailed.IdMapNode 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.IdMapNode detailed_data) |
prepares reduced data that is necessary for the execution of other methods if indicated by needs_preparation. More... | |
function [
max_errs , max_err_sequence , max_mu_index ] = | error_indicators (Greedy.User.IReducedModel rmodel,Greedy.DataTree.Detailed.IdMapNode detailed_data, parameter_set, reuse_reduced_data) |
this function should never be used. It calls the error_indicators() method for the first wrapped parametrized function/operator. More... | |
function errs = | compute_error (Greedy.User.IReducedModel rmodel,Greedy.User.ReducedData reduced_data,Greedy.DataTree.Detailed.IdMapNode detailed_data) |
this function should never be used. It calls the compute_error() method for the first wrapped parametrized function/operator. More... | |
function
Uapprox = | generate_reduced (Greedy.User.IReducedModel rmodel,Greedy.User.ReducedData reduced_data,Greedy.DataTree.Detailed.IdMapNode detailed_data, U) |
this function should never be used. It calls the generate_reduced() method for the first wrapped parametrized function/operator. More... | |
function [
breakloop , reason ] = | pre_check_for_end (Greedy.User.IReducedModel rmodel,Greedy.DataTree.Detailed.IdMapNode detailed_data) |
checks whether the basis generation process has come to an end. More... | |
function
Greedy.DataTree.Detailed.IdMapNode detailed_data = | basis_extension (Greedy.User.IReducedModel rmodel,Greedy.DataTree.Detailed.IdMapNode detailed_data, max_err_seq, mu) |
extends the reduced basis space from a given function \(v_{h}(\mu)\). More... | |
function
Greedy.DataTree.Detailed.IdMapNode detailed_data = | finalize (Greedy.User.IReducedModel rmodel,Greedy.DataTree.Detailed.IdMapNode detailed_data) |
function called after the last extension process More... | |
function cop = | copy () |
makes a deep copy of this extension instance 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 | |
stop_Mmax | |
maximum number of generated collateral reduced basis vectors. 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 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... | |
Greedy.Plugin.SummedEI.SummedEI | ( | Greedy.Plugin.EI | varargin | ) |
constructor "summing together a list of different EI plugin instances.
varargin | a list of EI plugin objects |
Definition at line 61 of file SummedEI.m.
function Greedy.DataTree.Detailed.IdMapNode detailed_data = Greedy.Plugin.SummedEI.basis_extension | ( | Greedy.User.IReducedModel | rmodel, |
Greedy.DataTree.Detailed.IdMapNode | 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.
rmodel | an object specifying the basis generation process. |
detailed_data | object 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_seq | sequence of error indicators as returned as second return argument of error_indicators() |
mu | paramter vector \(\mu\). |
detailed_data | updated data tree node . |
Definition at line 234 of file SummedEI.m.
function errs = Greedy.Plugin.SummedEI.compute_error | ( | Greedy.User.IReducedModel | rmodel, |
Greedy.User.ReducedData | reduced_data, | ||
Greedy.DataTree.Detailed.IdMapNode | detailed_data | ||
) |
this function should never be used. It calls the compute_error() method for the first wrapped parametrized function/operator.
rmodel | an 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_data | an object constructing and storing all (low-dimensional) reduced matrices and vectors needed for reduced simulations. |
detailed_data | object 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. |
errs | a sequence of errors at every time step \(k=0,\ldots,K\). |
Definition at line 172 of file SummedEI.m.
|
virtual |
makes a deep copy of this extension instance
cop | a new instance which is a deep copy of this one. |
Implements Greedy.Plugin.EICommon.
Definition at line 274 of file SummedEI.m.
function [ max_errs , max_err_sequence , max_mu_index ] = Greedy.Plugin.SummedEI.error_indicators | ( | Greedy.User.IReducedModel | rmodel, |
Greedy.DataTree.Detailed.IdMapNode | detailed_data, | ||
parameter_set, | |||
reuse_reduced_data | |||
) |
this function should never be used. It calls the error_indicators() method for the first wrapped parametrized function/operator.
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)\]
.
rmodel | an object specifying the basis generation process. |
detailed_data | object 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_set | a set of parameter vectors \({\cal M}_{\text{train}}\) as returned by ParameterSampling.Interface.space . |
reuse_reduced_data | optional flag indicating whether the reduced data needed for reduced simulations or computation of error estimators is still valid since its last generation. (default = false ) |
max_errs | a 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_sequence | a sequence of error indicators \(\eta^k(\mu_{\max})\) for every \(k=0,\ldots,K\). |
max_mu_index | the index of the parameter vector \(\mu_{\max}\) in the parameter_set matrix. |
If indicator_mode
equals
estimator
, the method error_estimators() is callederror
, compute_error() is used to compute "true" errors. Definition at line 144 of file SummedEI.m.
function Greedy.DataTree.Detailed.IdMapNode detailed_data = Greedy.Plugin.SummedEI.finalize | ( | Greedy.User.IReducedModel | rmodel, |
Greedy.DataTree.Detailed.IdMapNode | detailed_data | ||
) |
function called after the last extension process
rmodel | an object specifying the basis generation process. |
detailed_data | object 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. |
detailed_data | updated data tree node . |
Definition at line 255 of file SummedEI.m.
function Uapprox = Greedy.Plugin.SummedEI.generate_reduced | ( | Greedy.User.IReducedModel | rmodel, |
Greedy.User.ReducedData | reduced_data, | ||
Greedy.DataTree.Detailed.IdMapNode | detailed_data, | ||
U | |||
) |
this function should never be used. It calls the generate_reduced() method for the first wrapped parametrized function/operator.
rmodel | an 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_data | an object storing all (low-dimensional) reduced matrices and vectors needed for reduced simulations. |
detailed_data | object 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. |
U | optional DOF vector, for example operator evaluations. |
Uapprox | A sequence of Dof vectors of the functions \(v_{\text{red}}(\cdot;t^k,\mu)\). |
Definition at line 193 of file SummedEI.m.
function Greedy.DataTree.Detailed.IdMapNode detailed_data = Greedy.Plugin.SummedEI.init_basis | ( | Greedy.User.IReducedModel | rmodel, |
ModelData | model_data, | ||
M_train | |||
) |
creates an initial detailed data node storing an initial reduced basis
rmodel | an object specifying the basis generation process. |
M_train | an object specifying the parameter vector set \({\cal M}_{\text{train}}\) from which the basis functions are obtained. |
model_data | Matlab structure storing (possibly) high dimensional data needed by IDetailedModel.detailed_simulation(). |
detailed_data | an object storing the initial reduced basis vectors. |
This method initializes the detailed data node for all parametrized functions/operator evaluations.
Definition at line 108 of file SummedEI.m.
function [ breakloop , reason ] = Greedy.Plugin.SummedEI.pre_check_for_end | ( | Greedy.User.IReducedModel | rmodel, |
Greedy.DataTree.Detailed.IdMapNode | 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 .
rmodel | object specifying how the reduced simulations can be computed. |
detailed_data | object 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. |
breakloop | boolean flag indicating whether the basis generation process is finished for this reduced basis space. |
reason | descriptive text telling about the reasons why, the extension process needs to break. |
This method only stop when ALL parts are ready.
Definition at line 214 of file SummedEI.m.
function Greedy.Plugin.SummedEI.prepare_reduced_data | ( | Greedy.User.IReducedModel | rmodel, |
Greedy.DataTree.Detailed.IdMapNode | detailed_data | ||
) |
prepares reduced data that is necessary for the execution of other methods if indicated by needs_preparation.
rmodel | an object specifying the basis generation process. |
detailed_data | object 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. |
Definition at line 125 of file SummedEI.m.
Greedy.Plugin.SummedEI.stop_Mmax |
maximum number of generated collateral reduced basis vectors.
Dependent
set to true. Definition at line 35 of file SummedEI.m.