2 % reduced model
for non-linear evolution problems as given by a
10 enable_error_estimator =
false;
15 properties (Dependent)
16 % current time instance
24 % This constant is used
for a consistency check of the model descr with
26 ddescr_checks = struct(...
27 'init_values_algorithm', {{@(x) isequal(
class(x),
'function_handle')}}...
35 % Constructor
for the reduced model.
40 if nargin == 1 || isempty(bg_descr)
43 %
this implements a copy constructor
if necessary...
45 % are we NOT a copy constructor?
46 if ~(isempty(bg_descr) || isa(dmodel,
'TwoPhaseFlow.ReducedModel'))
52 error(
'Consistency check for TwoPhaseFlow.ReducedModel failed.');
59 function N = get_N(
this,
id)
63 N = get_by_description(this.N,
id);
66 function set_N(this,
id, val)
67 set(this.N, get_index(this.N,
id), val);
70 function M = get_M(this,
id)
71 M = get_by_description(this.M,
id);
74 function set_M(this,
id, val)
75 set(this.M, get_index(this.M,
id), val);
79 function c = copy(this)
80 % function c = copy(this)
89 function rb_sim_data = rb_simulation(rmodel, reduced_data, sim_data, dd)
90 % function rb_sim_data = rb_simulation(rmodel, reduced_data)
91 % forwards the reduced simulation to the method rb_simulation_impl()
92 % after getting a suitable reduced data
leaf element.
96 % sim_data: structure holding simulation data, i.e. Dof-vectors with
97 % fields 'S', 'U', 'P' for the saturation, velocity and
98 % pressure field concentrations. This can be used for
99 % reference computations. @default []
101 % reference computations. @default []
104 % rb_sim_data: structure holding the coefficient vectors of the reduced
105 % simulations and optional error estimators.
106 reduced_data_leaf = get_leaf(reduced_data, rmodel);
109 rb_sim_data = rb_simulation_impes_impl(rmodel, reduced_data_leaf);
111 rb_sim_data = rb_simulation_impes_impl(rmodel, reduced_data_leaf, sim_data, dd);
115 rb_sim_data = rb_simulation_impl(rmodel, reduced_data_leaf);
117 rb_sim_data = rb_simulation_impl(rmodel, reduced_data_leaf, sim_data, dd);
126 rb_sim_data = rb_simulation_impl(this, reduced_data, sim_data, dd);
132 rb_sim_data = rb_simulation_impes_impl(this, reduced_data, sim_data, dd);
134 function a0 = rb_init_values(this, detailed_data,
decomp_mode)
135 % function a0 = rb_init_values(this, detailed_data,
decomp_mode)
141 % detailed_data: detailed data tree
leaf object of type
GreedyDataTreeDetailed.PODEILeafNode.
144 % a0: coefficient vector of size 'N x 1' for the initial values.
153 rb_sim_data = rb_reconstruction(this, detailed_data, rb_sim_data);
158 function Delta = get_estimators_from_sim_data(rb_sim_data)
159 % function Delta = get_estimators_from_sim_data(rb_sim_data)
163 Delta = rb_sim_data.Delta;
166 function Delta = get_estimator_from_sim_data(rb_sim_data)
167 % function Delta = get_estimator_from_sim_data(rb_sim_data)
171 Delta = rb_sim_data.Delta(end);
177 function t = get.t(this)
181 function set.t(this, t)
182 this.detailed_model.t = t;
185 function tstep = get.tstep(this)
186 tstep = this.descr.tstep;
189 function set.tstep(this, tstep)
190 this.detailed_model.tstep = tstep;
Reduced data implementation for non-linear evolution problems with finite volume discretizations.
reduced model for non-linear evolution problems as given by a TwoPhaseFlow.DetailedModel.
static const ddescr_checks
This constant is used for a consistency check of the model descr with help of IModel.struct_check() ...
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.
static function ok = struct_check(descr, checks)
executes checks on the fields of a structure object
descr
The description structure holding information about the analytical parametrized problem and its discr...
Reduced data implementation for non-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.
class generating the reduced basis space for the LinEvol problem with a Greedy algorithm.
This is the interface for a reduced model providing methods to compute low dimensional reduced simula...
IDetailedModel implementation for a two phase flow system.
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...
Interface class for the generation and storage of reduced basis spaces as described in Module (M2)...