1 function sim_data = hp_simulation(hp_model)
2 %
function sim_data = hp_simulation_alt(tree,param)
4 % findes the correct subdomain and computes a reduced basis simutlation
5 % need a hp_model with a generated reduced basis (
function: hp_rb_generation);
8 sim_data = navigation(hp_model.tree,get_mu(hp_model));
10 function data = navigation(tree,param)
14 % Representanten bestimmen
15 first_l=tree_first(tree{1});
16 first_r=tree_first(tree{2});
17 % Mit d-Funktion naviagtion durchführen
20 if hp_model.error_distance_extionsion ==1
22 distance_l = hp_model.distance_function(first_l.model,first_l.anchor,param,...
23 first_l.detailed_data,first_l.reduced_data);%norm(first_l-param,2);
24 distance_r = hp_model.distance_function(first_r.model, first_r.anchor,param,...
25 first_r.detailed_data,first_r.reduced_data) ;%norm(first_r-param,2);
29 distance_l = hp_model.distance_function(first_l.model,first_l.anchor,param);%norm(first_l-param,2);
30 distance_r = hp_model.distance_function(first_r.model, first_r.anchor,param);%norm(first_r-param,2);
33 % Unterbaum finden und Rekursiv vortfahren
34 if distance_l<distance_r
35 data = navigation(tree{1},param);
37 data = navigation(tree{2},param);
40 % im passenden Gebiet angekommen - RB Simulation durchführen
41 tree.model=set_mu(tree.model,param);
42 data = rb_simulation(tree.model,tree.reduced_data);
43 data = rb_reconstruction(tree.model,tree.detailed_data,data);
46 %Hilfsfunktion für die Baumnavigation
47 function value= tree_first (tree)
50 value=tree_first(tree{1});