1 function OK = test_porsche
2 %
function OK = test_porsche
4 % Test of the porsche_model
6 % runs the basic functions of the porsche_model:
7 % sets the model, creates detailed and reduced data and does a reduced and
10 % Oliver Zeeb, 22.01.2012
14 fprintf(
'Setting the model...');
16 fprintf(
'\n...model --> ok! \n')
17 fprintf('\ngenerating model_data...');
18 model_data=gen_model_data(model);
19 fprintf('...model_data --> ok! \n')
20 if model.compute_output_functional == 1
21 fprintf(['\n \n! for computing the output_functional please be sure to use \n'...
23 '! sim_data.s = model.output_functional(model,model_data,sim_data.uh);\n'...
24 '! (line 27 in lin_stat_detailed_simulation.m),\n'...
28 '! v = model.operators_output(model,model_data);\n'...
29 '! sim_data.s = (v(:)'') * sim_data.uh.dofs;\n'...
30 '! (lines 29-30 in lin_stat_detailed_simulation.m)!\n'])
32 fprintf('\ndoing a detailed simulation...');
33 sim_data=detailed_simulation(model,model_data);
34 fprintf('\n...detailed_simulation --> ok! \n')
35 fprintf('\ngenerating detailed_data...');
36 detailed_data=gen_detailed_data(model,model_data);
37 fprintf('\n...detailed_data --> ok! \n')
38 fprintf('\ngenerating reduced_data...');
39 reduced_data=gen_reduced_data(model,detailed_data);
40 fprintf('\n...reduced_data --> ok! \n')
41 fprintf('\ndoing a reduced simulation');
42 rb_sim_data=rb_simulation(model,reduced_data);
43 fprintf('\n...rb_simulation --> ok! \n')
44 fprintf('\nrb_reconstruction...');
45 rb_sim_data=rb_reconstruction(model,detailed_data,rb_sim_data);
46 fprintf('\n...rb_reconstruction --> ok! \n')
48 fprintf('\nall tests okay!!!');