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)
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
8 % currently simple upwind flux is computed
10 % In
"components" mode:
11 % input edge_flux_matrix(i,j,e,f,q): edge integral contribution
13 % output edge_num_flux_matrix(...): ...
16 % input edge_flux_matrix(i,j,e,f): edge integral contribution
18 % output edge_num_flux_matrix(...): ...
20 % Bernard Haasdonk 31.8.2009
22 disp(
' to be adjusted!! ');
25 decomp_mode = params.decomp_mode;
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
34 % sign of diagonal entries are sign of v*n
36 % find consistent upwind directions
37 % => check of affine parameter dependence
40 %
remove dirichlet inflow contributions
42 % replace downwind flux values with upwind flux values
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);