rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
dom_dec_operators.m
Go to the documentation of this file.
1 function [A, r, A_gamma, r_gamma] = dom_dec_operators(model, ...
2  model_data)
3 % function [A, r, A_gamma, r_gamma] = dom_dec_operators(model,model_data)
4 % Function computing all required matrizes for the simulation
5 %
6 % Required fields of model:
7 % decomp_mode: if 0 or 1, matrizes of the detailed systems are
8 % assembled, if 2 , coefficients for the matrix of the reduced
9 % system are computed
10 
11 % I. Maier, 19.07.2011
12 
13 model.base_model.decomp_mode = model.decomp_mode;
14 
15 A = cell(1,2);
16 r = cell(1,2);
17 for i = 1:2
18 
19  if isfield(model_data,'operators')
20  [A{i}, r{i}] = model_data.operators(i);
21  else
22 
23  if model.decomp_mode < 2
24  model_data.df_info = model_data.df_infos{i};
25  end;
26  [A{i}, r{i}] = model.base_model.operators(model.base_model, ...
27  model_data);
28  end;
29 
30 end;
31 
32 A_gamma = cell(1,2);
33 r_gamma = cell(1,2);
34 
35 % modification on the interface
36 if model.decomp_mode == 0
37 
38  for i = 1:2
39  A_gamma{i} = A{i};
40  r_gamma{i} = r{i};
41  % delete and insert dirichlet rows:
42  gids = model_data.gamma_dofs{i};
43  ndofs = model_data.df_infos{i}.ndofs;
44 
45  A_tmp = sparse(gids,gids,ones(size(gids)),ndofs,ndofs);
46 
47  A_gamma{i}(gids,:) = 0;
48  r_gamma{i}(gids) = 0;
49 
50  A_gamma{i} = A_gamma{i} + A_tmp;
51  end;
52 
53 end;
function [ A , r , A_gamma , r_gamma ] = dom_dec_operators(model, model_data)
Function computing all required matrizes for the simulation.