2 % This is and
IDetailedModel interface specialization for detailed models
3 % that shall be suitable
for Greedy algorithms.
5 % A
default implementation of the newly introduced methods
for @ref fv
7 % models without any extensions or adaptations.
13 % stores and analyzises the description strucutre
16 % descr: structure describing the paramerized problem and the
24 %
function UON = orthonormalize(
this, model_data, U);
25 % orthonormalizes a set of discrete functions `\{ v_h^l \}_{l=1}^L`
28 % U: The Dof vectors
for the set of discrete functions
31 % UON: The Dof vectors of the orthonormalized set of discrete functions.
32 UON = orthonormalize(
this, model_data, U);
34 %
function U0 = init_values_algorithm(model, model_data);
35 % computes the Dof vectors
for the initial value
function
36 % `u_h^0(\cdot;t\mu) = {\cal P}_h[u_0(\mu)]`
39 % U0: the Dof vector of the initial value projection
40 U0 = init_values_algorithm(model, model_data);
42 %
function UV = inner_product(
this, model_data, U, V);
43 % computes the inner project between the Dof vectors of two discrete
47 % U: Dof vector of first discrete
function `u_h`
48 % V: Dof vector of second discrete
function `v_h`
51 % UV: Dof vector of innter product `\langle u_h, v_h \rangle_{{\cal W}_h}`
52 UV = inner_product(
this, model_data, U, V);
55 methods (Static, Abstract)
56 %
function errs = l2_error_sequence_algorithm(U, Uapprox, W);
57 % computes the `L^2(\Omega)` error
for each "snapshot" of a trajectories
58 % and returns the sequence of these errors.
61 % U: first sequence of Dof vectors of discrete functions
62 % `\{u_h^k\}_{k=0}^K` stored in a
'H x K+1' matrix
63 % Uapprox: second sequence of Dof vectors of functions
64 % `\{v_h^k\}_{k=0}^K` stored in a
'H x K+1' matrix
67 % errs: sequence of errors
68 % `\{ \| u_h^k - v_h^k \|_{L^2(\Omega)} \}_{k=0}^{K}` stored
69 % in a
'K+1 x 1' vector
71 errs = l2_error_sequence_algorithm(U, Uapprox, model_data);
73 %
function errs = linfty_error_sequence_algorithm(U, Uapprox[, model_data]);
74 % computes the `L^{\infty}(\Omega)` error
for each "snapshot" of a
75 % trajectories and returns the sequence of these errors.
78 % U: first sequence of Dof vectors of discrete functions
79 % `\{u_h^k\}_{k=0}^K` stored in a
'H x K+1' matrix
80 % Uapprox: second sequence of Dof vectors of functions
81 % `\{v_h^k\}_{k=0}^K` stored in a
'H x K+1' matrix
84 % errs: sequence of errors
85 % `\{ \| u_h^k - v_h^k \|_{L^{\infty}(\Omega)} \}_{k=0}^{K}` stored
86 % in a
'K+1 x 1' vector
88 errs = linfty_error_sequence_algorithm(U, Uapprox, model_data);
90 %
function W = get_inner_product_matrix(model_data);
91 % returns the inner product matrix
for efficient computation of
92 % inner products on `{\cal W}_h`
94 % The matrix `W` returned can be used to compute an inner product
95 % ``\langle u_h, v_h\rangle_{{\cal W}_h} = U^t W V``
96 % where `U, V` are the Dof vectors of the discrete functions `u_h, v_h\in
101 W = get_inner_product_matrix(model_data);
103 U = get_dofs_from_sim_data(sim_data);
105 snapshot = get_dofs_at_time(sim_data, time_index);
This is and IDetailedModel interface specialization for detailed models that shall be suitable for Gr...
Interface classes to be implemented by the Greedy.Algorithm user.
This is the interface for a detailed model providing methods to compute high dimensional simulation s...
Customizable implementation of an abstract greedy algorithm.