rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
IDetailedModel.m
2  % This is and IDetailedModel interface specialization for detailed models
3  % that shall be suitable for Greedy algorithms.
4  %
5  % A default implementation of the newly introduced methods for @ref fv
6  % functions is Greedy.User.IDetailedModel which can be used by most @ref fv
7  % models without any extensions or adaptations.
8 
9  methods
10  function dmei = IDetailedModel(descr)
11  % constructor
12  %
13  % stores and analyzises the description strucutre
14  %
15  % Parameters:
16  % descr: structure describing the paramerized problem and the
17  % disretization.
18  dmei = dmei@IDetailedModel(descr);
19  end
20  end
21 
22  methods (Abstract)
23 
24  % function UON = orthonormalize(this, model_data, U);
25  % orthonormalizes a set of discrete functions `\{ v_h^l \}_{l=1}^L`
26  %
27  % Parameters:
28  % U: The Dof vectors for the set of discrete functions
29  %
30  % Return values:
31  % UON: The Dof vectors of the orthonormalized set of discrete functions.
32  UON = orthonormalize(this, model_data, U);
33 
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)]`
37  %
38  % Return values:
39  % U0: the Dof vector of the initial value projection
40  U0 = init_values_algorithm(model, model_data);
41 
42  % function UV = inner_product(this, model_data, U, V);
43  % computes the inner project between the Dof vectors of two discrete
44  % functions
45  %
46  % Parameters:
47  % U: Dof vector of first discrete function `u_h`
48  % V: Dof vector of second discrete function `v_h`
49  %
50  % Return values:
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);
53  end
54 
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.
59  %
60  % Parameters:
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
65  %
66  % Return values:
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
70  %
71  errs = l2_error_sequence_algorithm(U, Uapprox, model_data);
72 
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.
76  %
77  % Parameters:
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
82  %
83  % Return values:
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
87  %
88  errs = linfty_error_sequence_algorithm(U, Uapprox, model_data);
89 
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`
93  %
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
97  % {\cal W}_h`.
98  %
99  % Return values:
100  % W: The matrix `W`
101  W = get_inner_product_matrix(model_data);
102 
103  U = get_dofs_from_sim_data(sim_data);
104 
105  snapshot = get_dofs_at_time(sim_data, time_index);
106 
107  end
108 
109 end
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.
Definition: DuneRBLeafNode.m:1