rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
ldg_edge_num_flux_matrix.m
1 function edge_num_flux_mat = ldg_edge_num_flux_matrix(edge_flux_matrix,params)
2 %function edge_num_flux_mat = ldg_edge_num_flux_matrix(edge_flux_matrix,params)
3 %
4 % function computing an edge_num_flux_matrix (or its components)
5 % from the analytical edge flux matrix edge_flux_matrix, which is
6 % computed in ldg_operators_adv_explicit
7 %
8 % currently simple upwind flux is computed
9 %
10 % In "components" mode:
11 % input edge_flux_matrix(i,j,e,f,q): edge integral contribution
12 % and
13 % output edge_num_flux_matrix(...): ...
14 %
15 % In "complete" mode:
16 % input edge_flux_matrix(i,j,e,f): edge integral contribution
17 % and
18 % output edge_num_flux_matrix(...): ...
19 
20 % Bernard Haasdonk 31.8.2009
21 
22 disp(' to be adjusted!! ');
23 keyboard;
24 
25 decomp_mode = params.decomp_mode;
26 
27 if decomp_mode == 2
28  % for upwind: simple coefficients of velocity.
29  edge_num_flux_mat = params.velocity_coefficients_fct(params);
30 elseif decomp_mode ==1
31  error('to be implemented!');
32  % identify consistent upwind direction from components
33 
34  % sign of diagonal entries are sign of v*n
35 
36  % find consistent upwind directions
37  % => check of affine parameter dependence
38  ...
39 
40  % remove dirichlet inflow contributions
41 
42  % replace downwind flux values with upwind flux values
43 
44  % return matrix
45 
46 else % "complete"
47  disp('complete evaluation should be accelerated in ldg_edge_num_flux_matrix');
48  params.decomp_mode = 2;
49  edge_num_flux_mat_coeff = ldg_edge_num_flux_matrix(edge_flux_matrix,params);
50  params.decomp_mode = 1;
51  edge_num_flux_mat_comp = ldg_edge_num_flux_matrix(edge_flux_matrix,params);
52  params.decomp_mode = 0;
53  edge_num_flux_mat = lincomb_sequence(edge_num_flux_mat_comp,...
54  edge_num_flux_mat_coeff);
55 end;
56 %| \docupdate