4 % This is a detailed model
for a problem of
this 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 (non-linear) operators `{\cal
10 % L}(t,\mu) : {\cal W} \to {\cal W}` parametrized over the Time-parameter
11 % domain `[0,T] \times {\cal M}`.
13 % The numerical scheme
for the numerical solution of
this problem is assumed
17 % u_h(\cdot;t^0,\mu) &= {\cal M}_h[u_0] \\\\
18 % \left(\text{Id} - \Delta t^k {\cal L}_{h, I}(t^{k+1},\mu)\right)[u_h(\cdot;t^{k+1},\mu)]
20 % \left(\text{Id} + \Delta t^k {\cal L}_{h, E}(t^{k},\mu)\right)[u_h(\cdot;t^{k},\mu)]
22 % -# or with a Newton solver
for non-linearities in the implicit
case:
24 % u_h(\cdot;t^0,\mu) = {\cal M}_h[u_0],
28 % F[u_h(\cdot;t^{k+1},\mu), u_h(\cdot;t^k,\mu)] =0
30 % is solved subsequently
for the
operator `F:V_h\times V_h \to V_h` defined by
33 % \left(\text{Id} + \Delta t^k {\cal L}_{h, I}(t^{k+1},\mu)\right)[u_h]
35 % \left(\text{Id} + \Delta t^k {\cal L}_{h, E}(t^{k},\mu)\right)[v_h]
37 % with a Newton scheme, minimizing defects `\| \delta_h^{k+1,\nu+1}\| \leq
38 % R_{\text{Newton}}` by solving
40 % D_1 F|_{u_h^{k+1,\nu}}[\delta_h^{k+1,\nu+1};u_h^k] = -F[u_h^{k+1,\nu};u_h^k]
42 % with `u_h^{k+1,\nu+1} := u_h^{k+1,\nu}`, `u_h^{k,0}:=u_h^k`,
43 % `u_h^{k+1}:=u_h^{k+1, \nu_{\max}(k)}` and
44 % `\nu_{\max}(k) = \min_{\nu} \| \delta_h^{k+1,\nu} \| \leq R_{\text{Newton}}`
46 % Furthermore the discretization consists of
47 % - a time discretization `0 = t^0 \leq t^1 = t^0 + \Delta t^0 \leq \ldots
48 % \leq t^{K+1} = t^{K} + \Delta t^{K} = T`,
49 % - discrete space operators `{\cal L}_{h, I}(t,\mu):{\cal W}_h \to {\cal
50 % W}_h` and `{\cal L}_{h, E}(t,\mu):{\cal W}_h \to {\cal W}_h` parametrized
51 % over the Time-Parameter domain `[0,T] \times {\cal M}` and
52 % - a projection
operator `{\cal M}_h : {\cal W} \to {\cal W}_h`
57 % This constant is used
for a consistency check of the model descr with
58 % help of DetailedModelBaseIf.struct_check()
59 model_checks = struct(...
60 'fv_impl_diff_weight', {{@isscalar}},...
61 'fv_expl_diff_weight', {{@isscalar}},...
62 'fv_impl_conv_weight', {{@isscalar}},...
63 'fv_expl_conv_weight', {{@isscalar}},...
64 'newton_solver', {{@isscalar}},...
65 'implicit_nonlinear', {{@isscalar}},...
66 'L_E_local_ptr', {{@(x) isequal(
class(x),
'function_handler')}},...
67 'L_I_local_ptr', {{@(x) isequal(
class(x),
'function_handler')}}...
70 % This constant is used
for a consistency check of the model descr with
71 % help of DetailedModelBaseIf.struct_check()
73 % This check is only executed
if we use a Newton scheme
74 newton_checks =
struct(...
75 'newton_steps', {{@isscalar}},...
76 'implicit_operators_algorithm', {{@(x) isequal(
class(x),
'function_handler')}},...
77 'implicit_gradient_operators_algorithm',...
78 {{@(x) isequal(
class(x),
'function_handler')}},...
79 'newton_epsilon', {{@isscalar}}...
83 properties (Dependent)
84 % current time instance
92 %
boolean flag indicating whether conditions of system matrices shall be computed.
93 compute_conditions =
false;
101 % This checks and stores the model description structure
103 % Required fields of descr:
104 % newton_solver:
boolean flag indicating whether we are
using a Newton
105 % scheme
for the discretization.
108 error(
'Consistency check of description for nonlinear evolution problems failed!');
111 error(
'Consistency check of description for Newton solver problems failed!');
115 sim_data = detailed_simulation(model, model_data);
117 model_data = gen_model_data(model);
119 p =
plot_sim_data(dmodel, model_data, sim_data, plot_params);
124 function U = get_dofs_from_sim_data(sim_data)
130 function snapshot = get_dofs_at_time(sim_data, time_index)
132 snapshot = sim_data(:,time_index);
138 function t = get.t(this)
142 function set.t(this, t)
146 function tstep = get.tstep(this)
147 tstep = this.descr.tstep;
150 function set.tstep(this, tstep)
151 this.descr.tstep = tstep;
IDetailedModel implementation for a non linear evolution problem.
static const newton_checks
This constant is used for a consistency check of the model descr with help of DetailedModelBaseIf.st...
static function ok = struct_check(descr, checks)
executes checks on the fields of a structure object
Reduced basis implementation for non-linear evolution equations.
Interface classes to be implemented by the Greedy.Algorithm user.
static const model_checks
This constant is used for a consistency check of the model descr with help of DetailedModelBaseIf.st...
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.