2 % Detailed model
for a linear evolution problem with a @ref fv discretization
4 % This is a detailed model
for a problem of the type
6 % \partial_t u(x;t,\mu) - {\cal L}(t,\mu)[u(x,t;\mu)] &= 0 \qquad &\text{in }& \Omega \times [0, T], \\\\
7 % u(x;0,\mu) &= u_0(x;\mu) \qquad &\text{in }& \Omega \times \{0\}
9 % with suitable boundary conditions and linear operators
10 % `{\cal L}(t,\mu) : {\cal W} \to {\cal W}` parametrized over the
11 % time-parameter domain `[0,T] \times {\cal M}`.
13 % The numerical scheme
for the numerical solution of
this problem is assumed
14 % to be of the following type:
16 % u_h(\cdot;t^0,\mu) &= {\cal M}_h[u_0] \\\\
17 % \left(\text{Id} - \Delta t^k {\cal L}_{h, I}(t^{k+1},\mu)\right)[u_h(\cdot;t^{k+1},\mu)]
19 % \left(\text{Id} + \Delta t^k {\cal L}_{h, E}(t^{k},\mu)\right)[u_h(\cdot;t^{k},\mu)]
21 % with the following ingredients:
22 % - a time discretization `0 = t^0 \leq t^1 = t^0 + \Delta t^0 \leq \ldots
23 % \leq t^{K+1} = t^{K} + \Delta t^{K} = T`,
24 % - solution snapshots `u_h(\cdot;t,\mu) \in { cal W }_h `
for all
25 % parameters and time instances `(t,\mu) \in [0,T] \times { \cal M }`
26 % - separable operators
for the discretization `{\cal L}_{h, I}(t,\mu):{\cal
27 % W}_h \to {\cal W}_h`, `{\cal L}_{h, E}(t,\mu):{\cal W}_h \to {\cal W}_h`
28 % and separable initial data `u_0` in the parameter argument. That is these
29 % must be decomposable like
31 % {\cal L}_{h, *}(t,\mu) &= \sum_{q=1}^{q_*} \sigma_*^q(\mu) {\cal L}^q_{h, *}(t) \\\\
32 % u_0(x;\mu) &= \sum_{q=1}^{u_0} \sigma_{u_0}^q(\mu) u_0(x)
34 % - a projection operator `{\cal M}_h : {\cal W} \to {\cal W}_h`
38 % This constant is used
for a consistency check of the model descr with
39 % help of
Greedy.Remove.IDetailedModelBase.struct_check()
40 ddescr_checks =
struct(...
41 'mass_matrix', {{@(x) isequal(
class(x),
'function_handle')}}...
45 function dm = DetailedModel(descr)
46 %
function dm = DetailedModel(descr)
47 % constructor based on problem description
50 % descr: structure describing the problem and the descretization
54 error(
'Consistency check for LinEvol.DetailedModel failed.');
58 sim_data = detailed_simulation(
this, model_data);
60 model_data = gen_model_data(model);
67 function U = get_dofs_from_sim_data(sim_data)
71 function snapshot = get_dofs_at_time(U, time_index)
73 snapshot = U(:, time_index);
static function ok = struct_check(descr, checks)
executes checks on the fields of a structure object
Reduced basis implementation for linear evolution equations.
Interface classes to be implemented by the Greedy.Algorithm user.
static const ddescr_checks
This constant is used for a consistency check of the model descr with help of Greedy.Remove.IDetailedModelBase.struct_check()
Interface specialization of an IDetailedModel ready to use with Greedy algorithms for (time dependent...
This is the interface for a detailed model providing methods to compute high dimensional simulation s...
function p = plot_sim_data(model, model_data, sim_data, plot_params)
function performing the plot of the simulation results as specified in model.
Customizable implementation of an abstract greedy algorithm.
Detailed model for a linear evolution problem with a Finite volume discretization.