rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
comsol_ThermalBlock3D_operators_output.m
1 function output = comsol_ThermalBlock3D_operators_output(model,model_data)
2 %function output = comsol_ThermalBlock3D_operators_output(model,model_data)
3 %
4 % This function returns the output data (components and coefficients) for
5 % the comsol 3D Thermal Block model.
6 % Since this is a compliant case model, the output functional is equal to
7 % the rhs (this has to be scaled with the flux vector of the bottom
8 % boundary, in case it is not = 1 !
9 %
10 % Oliver Zeeb, 08/2013
11 
12 
13 
14 %%% LINEAR COMPLIANT CASE --> output = f;
15 if model.use_comsol
16  switch model.decomp_mode
17  case 0
18  disp(' in comsol_ThermalBlock3D_operators_output: decomp_mode 0 not yet implemented!')
19  keyboard
20 
21  case 1
22  flux_factor = str2double(model_data.comsol_model.physics('c').feature('flux1').getString('g'));
23  if model.comsol_get_eliminated_data %cut the matrices --> return eliminated matrices!
24  output = {model_data.operators.f_comp_eliminated{1} ./ flux_factor};
25  else
26  output = {model_data.operators.f_comp_full{1} ./ flux_factor};
27  end
28 
29  case 2
30  output = 1;
31  end
32 
33 else
34  switch model.decomp_mode
35  case 0
36  disp(' in comsol_ThermalBlock3D_operators_output: decomp_mode 0 not yet implemented!')
37  keyboard
38 
39  case 1
40  if model.comsol_get_eliminated_data %cut the matrices --> return eliminated matrices!
41  output = model_data.operators.output_comp_eliminated;
42  else
43  output = model_data.operators.output_comp_full;
44  end
45 
46  case 2
47  output = 1;
48  end
49 end