rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
rb_burgers_fem_online_prep.m
1 function reduced_data = rb_burgers_fem_online_prep(offline_data,params)
2 %function reduced_data = rb_burgers_fem_online_prep(offline_data,params)
3 %
4 % method which produces reduced_data, which is the data, that will
5 % be passed to the online-simulation algorithm.
6 % Typically, this routine only does a submatrix extraction of the Mmax, Nmax
7 % sized offline-objects to produce M, N sized objects for the real simulation.
8 % Therefore, no quantities or computations dependent on the
9 % high-dimension H may be included here. Neither may online-data
10 % include parameter-dependent
11 % mu-quantities. So no complete grid or detailed solutions
12 % or reduced basis vectors may be stored here.
13 %
14 % allowed dependency of data: Nmax, N, M
15 % not allowed dependency of data: H
16 % allowed dependency of computation: Nmax, N, M
17 % not allowed dependency of computation: H
18 % Unknown at this stage: mu
19 %
20 % Required fields of params:
21 % N : number of reduced basis vectors to choose
22 %
23 % generated fields of reduced_data:
24 % H1{q} : sequence of N-vector components of initial data projection
25 % ``q = 1... Q_{dir} \quad
26 % \verb|H1{q}| = \int u_{dir}^q \xi_i``
27 % M : matrix of N x N mass matrix entries
28 % `M = \int \xi_i \xi_j`
29 % B1{q} : list of N x N stiffness matrix
30 % ``q = 1... Q_{\eta} \qquad
31 % \verb|B1{q}| = \int \eta^q (\nabla \xi_i) (\nabla \xi_j)``
32 % B2{q1,q2} : array of N x N convection matrices
33 % ``\verb|B2{q1,q2)(i,j)|
34 % = \int 2 \nabla \cdot (c^{q1} u_{dir}^{q2} \xi_i) \xi_j \qquad
35 % q1 = 1... Q_c, q2 = 1.. Q_{dir} ``
36 % A{q}: list of N x N x N tensors
37 % ``\verb|A{q}(i,j,k)| = \int \nabla \cdot (c^q \xi_i \xi_j) \xi_k \qquad
38 % q = 1,... Q_c``
39 % G1{q1,q2}: array of N vectors
40 % ``\verb|G1{q1,q2}(i)|
41 % = - \int_{\Gamma_out} \eta^{q1} \nabla u_{dir}^{q2} \cdot n \xi_i \qquad
42 % q1 = 1... Q_{\eta}, q2 = 1.. Q_{dir}``
43 %
44 % G2: trivially zero due to missing time dependence
45 % G3{q1,q2,q3}: array of N vectors
46 % ``\verb|G3{q1,q2}(i)|
47 % = - \int_{\Omega} 2 c^{q1} u_{dir}^{q2} u_{dir}^{q3} \xi_i \qquad
48 % q1 = 1... Q_c, q2 = 1.. Q_{dir}, q3 = 1, ..., Q_{dir}``
49 % G4{q1,q2}: array of N vectors
50 % ``\verb|G4{q1,q2}(i)|
51 % = - \int_{\Omega} \eta^{q1} \nabla\cdot\nabla u_{dir}^{q2} \xi_i \qquad
52 % q1 = 1... Q_{\eta}, q2 = 1.. Q_{dir}``
53 %
54 % See the offline-routine for specifications of the fields of offline_data
55 
56 % Bernard Haasdonk 15.5.2007
57 
58 % extract correct N-sized submatrices and subvectors from reduced_data
59 N = params.N;
60 
61 indices = 1:N;
62 
63 reduced_data = [];
64 
65 reduced_data = rb_burgers_fem_offline_subset(offline_data,indices);
66 
67 
68 % TO BE ADJUSTED TO NEW SYNTAX
69 %| \docupdate
function offline_data_subset = rb_burgers_fem_offline_subset(offline_data, indices)
function extracting a subset of the offline data