rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
LocalizedOperatorDefault.m
2 
3  properties (Constant)
4  id = 'L_localized';
5  end
6 
7  properties (Access = private)
8  fptr;
9  end
10 
11  methods
12  function lod = LocalizedOperatorDefault(fptr)
13  lod.fptr = fptr;
14  end
15 
16  function [INC, INCoff] = apply(this, model, model_data, arg, NU_ind)
17  [INC, INCoff] = this.fptr(model, model_data, arg, NU_ind);
18  end
19 
20  function ipm = inner_product_matrix(this, model_data)
21  % function ipm = inner_product_matrix(this, model_data)
22 
23  ipm = model_data.W;
24  end
25  end
26 
27  methods(Static)
28 
29  function ret_size = ret_size(model_data, NU_ind)
30  if nargin < 2 || isempty(NU_ind)
31  NU_ind = 1:model_data.grid.nelements;
32  end
33  ret_size = length(NU_ind);
34  end
35 
36  function arg_size = arg_size(model_data, NU_ind)
37  if nargin < 2 || isempty(NU_ind)
38  NU_ind = 1:model_data.grid.nelements;
39  end
40  arg_size = length(NU_ind);
41  end
42 
43  function eind = compute_TM_global(model_data, TM, rmodel)
44  if isequal(rmodel.stencil_mode, 'vertex')
45  eind = compute_TM_global_vertex(model_data, TM);
46  else
47  eind = compute_TM_global_edge(model_data, TM, rmodel.local_stencil_size);
48  end
49  end
50 
51  end
52 end
Interface for a localized operator that fulfills the so-called -independent DOF dependence.