2 % reduced model
for linear evolution problems as given by a
10 enable_error_estimator =
true;
14 % This constant is used
for a consistency check of the model descr with
16 ddescr_checks = struct(...
17 'operators_ptr', {{@(x) isequal(
class(x),
'function_handle')}},...
18 'init_values_algorithm', {{@(x) isequal(
class(x),
'function_handle')}},...
19 'error_norm', {{@ischar,
'values', {
'l2',
'energy'} }}...
25 %
function rm =
ReducedModel(detailed_model, basis_generator)
26 % Constructor
for the reduced model.
31 if nargin == 1 || isempty(bg_descr)
34 %
this implements a copy constructor
if necessary...
36 % are we NOT a copy constructor?
37 if ~(isempty(bg_descr) || isa(dmodel,
'LinEvol.ReducedModel'))
40 error(
'Consistency check for LinEvol.ReducedModel failed.');
45 function a0 = rb_init_values(
this, detailed_data,
decomp_mode)
46 %
function a0 = rb_init_values(
this, detailed_data,
decomp_mode)
55 % a0: coefficient vector of size
'N x 1' for the initial values.
63 rb_sim_data = rb_simulation_impl(
this, reduced_data);
65 function rb_sim_data = rb_reconstruction(
this, detailed_data, rb_sim_data)
66 %
function rb_sim_data = rb_reconstruction(
this, detailed_data, rb_sim_data)
73 % rb_sim_data:
struct holding reduced simulation data returned by
77 % rb_sim_data:
struct holding the reduced simulation results and their
79 if isa(detailed_data,
'Greedy.User.IDetailedData')
80 dd_leaf = get_leaf(detailed_data, this);
82 dd_leaf = detailed_data;
87 function c = copy(this)
88 % function c = copy(this)
98 function Delta = get_estimators_from_sim_data(rb_sim_data)
99 % function Delta = get_estimators_from_sim_data(sim_data)
103 Delta = rb_sim_data.Delta;
106 function Delta = get_estimator_from_sim_data(rb_sim_data)
107 % function Delta = get_estimator_from_sim_data(sim_data)
111 Delta = rb_sim_data.Delta(end);
reduced model for linear evolution problems as given by a LinEvol.DetailedModel.
DataTree implementation for generated detailed and reduced data
function rb_sim_data = rb_reconstruction_default(model, detailed_data, rb_sim_data)
(trivial) function computing a detailed reconstruction by linear combination of the coefficients in t...
This is the common interface for all models, detailed and reduced ones.
function a0 = rb_init_values_separable(IReducedModel rmodel,Greedy.DataTree.Detailed.RBLeafNode detailed_data, decomp_mode)
function computing initial values for a reduced simulation.
tree node implementation for a detailed data structure holding a reduced basis
static function ok = struct_check(descr, checks)
executes checks on the fields of a structure object
Reduced basis implementation for linear evolution equations.
DataTree specialization for detailed data generated by a Greedy algorithm instance.
static const ddescr_checks
This constant is used for a consistency check of the model descr with help of IModel.struct_check() ...
Reduced data implementation for linear evolution problems with finite volume discretizations.
an interface specialization for detailed data objects used with the Greedy algorithm.
Interface classes to be implemented by the Greedy.Algorithm user.
This is the interface for a reduced model providing methods to compute low dimensional reduced simula...
virtual function rb_sim_data = rb_simulation(reduced_data)
Executes a reduced simulation and optionally an error estimation.
class generating the reduced basis space for the LinEvol problem with a Greedy algorithm.
decomp_mode
Decomposition operation mode.
Customizable implementation of an abstract greedy algorithm.
interface specialization for a reduced model that can be used with the Greedy algorithm for basis gen...
Detailed model for a linear evolution problem with a Finite volume discretization.