rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
porsche_gen_detailed_data.m
1 function detailed_data=porsche_gen_detailed_data(model, model_data)
2 %function detailed_data=porsche_gen_detailed_data(model, model_data)
3 %
4 % function generating detailed_data of the porsche_model by using
5 % lin_stat_gen_detailed-data, then adding the points oh the car-front by
6 % copying them from model_data.
7 %
8 % Oliver Zeeb, 16.05.11
9 
10 old_compute_output_functional = model.compute_output_functional;
11 model.compute_output_functional = 0;
12 detailed_data = lin_stat_gen_detailed_data(model, model_data);
13 model.compute_output_functional = old_compute_output_functional;
14 %add information of the front to detailed_data
15 detailed_data.front_ref_domain=model_data.front_ref_domain;
16 
17 
18 if model.compute_output_functional == 1
19  %create 'dummy_fdf' containing the grid and the dofs, so that
20  %disc_gradient can be used for the calculation of the gradient.
21  dummy_fdf.grid=model_data.grid;
22  glob=model_data.front_ref_domain.edge_midpts_front;
23  for k=1:size(detailed_data.RB,2)
24  dummy_fdf.dofs=detailed_data.RB(:,k);
25  [gradx,grady] = disc_gradient(glob,dummy_fdf);
26  grad_in_midpts_front{k}=[gradx,grady];
27  end
28  detailed_data.front_ref_domain.grad_in_midpts_front=grad_in_midpts_front;
29 end
30 
31 
32