2 % reduced model
for linear evolution problems as given by a
14 function rm = ReducedModel(dmodel, bg_descr)
15 %
function rm = ReducedModel(detailed_model, basis_generator)
16 % Constructor
for the reduced model.
21 if nargin == 1 || isempty(bg_descr)
24 % this implements a copy constructor if necessary...
28 function this = set_mu(this, mu)
29 % function this = set_mu(this, mu, propagate)
30 % sets the active parameter vector `\mu \in {\cal M}`
32 % The parameter set here, is used by the detailed_simulation() function.
34 % The default implementation sets all fieldnames 'descr.mu_names' in the
38 % mu: The parameter vector `\boldsymbol\mu`.
43 assert(length(mu) == length(this.descr.mu_names));
46 % this.descr.mexptr(
'set_mu', mu);
49 function mu = get_mu(
this)
50 %
function mu = get_mu(
this)
51 % returns the active parameter vector `\boldsymbol\mu \in {\cal M}`
53 % The
default implementation returns a vector of the values of the fields
54 % of the #descr structure with names
'descr.mu_names'.
57 % mu: The parameter vector `\boldsymbol\mu`
61 this.mu = get_mu(this.detailed_model);
65 % mu = this.descr.mexptr('get_mu');
67 function a0 = rb_init_values(this, detailed_data, decomp_mode)
68 % function a0 = rb_init_values(this, detailed_data, decomp_mode)
74 % detailed_data: detailed data tree
leaf object of type
Greedy.
DataTree.Detailed.RBLeafNode.
77 % a0: coefficient vector of size 'N x 1' for the initial values.
79 descr = this.detailed_model.descr;
81 a0 = descr.coeff_ops.u0_ptr(this.mu);
84 this.detailed_model.set_mu(this.mu);
86 a0 = descr.mexptr('rb_init_values', decomp_mode);
90 function rb_sim_data = rb_reconstruction(this, detailed_data, rb_sim_data)
91 % function rb_sim_data = rb_reconstruction(this, detailed_data, rb_sim_data)
97 % detailed_data: of type
LinEvol.DetailedData
98 % rb_sim_data: struct holding reduced simulation data returned by
102 % rb_sim_data: struct holding the reduced simulation results and their
105 dd_leaf = get_leaf(detailed_data, this);
107 dd_leaf = detailed_data;
109 dune_sim_data = this.descr.mexptr('rb_reconstruction', dd_leaf.model_data, rb_sim_data);
110 rb_sim_data =
structcpy(rb_sim_data, dune_sim_data);
113 function c = copy(this)
114 % function c = copy(this)
124 function Delta = get_estimators_from_sim_data(rb_sim_data)
125 % function Delta = get_estimators_from_sim_data(sim_data)
129 Delta = rb_sim_data.Delta;
132 function Delta = get_estimator_from_sim_data(rb_sim_data)
133 % function Delta = get_estimator_from_sim_data(sim_data)
137 Delta = rb_sim_data.Delta(end);
reduced model for linear evolution problems as given by a LinEvol.DetailedModel.
reduced model for linear evolution problems as given by a LinEvol.DetailedModel.
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...
function a0 = rb_init_values_separable(IReducedModel rmodel,Greedy.DataTree.Detailed.RBLeafNode detailed_data, decomp_mode)
function computing initial values for a reduced simulation.
Reduced basis implementation for linear evolution equations.
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...
function s1 = structcpy(s1, s2)
copies the fields of structure s2 into structure s1. If the field to be copied does not exist in s1 y...
This is the interface for a detailed model providing methods to compute high dimensional simulation s...
Detailed model for a linear evolution problem with a Finite volume discretization.
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.
Interface class for the generation and storage of reduced basis spaces as described in Module (M2)...