1 if ~(exist(
'steps',
'var'))
5 %setenv(
'DUNERBHOME',
'/home/mdroh_01/projects/dune/modules/dune-rb/build_2.1/dune/rb/matlabcomm/client')
7 for i = 1:length(steps)
11 descr = laplace_dune_descr;
13 model_data = gen_model_data(dmodel);
14 set_mu(dmodel, [1 0]);
17 sim_data = detailed_simulation(dmodel, model_data);
21 detailed_data = gen_detailed_data(rmodel, model_data);
23 reduced_data = gen_reduced_data(rmodel, detailed_data);
26 mus = rand_uniform(nmus, rmodel.mu_ranges);
27 dtimes = zeros(1, nmus);
28 rtimes = zeros(1, nmus);
29 rrtimes = zeros(1, nmus);
30 errs = zeros(1, nmus);
31 for mui = 1:size(mus,2)
32 disp(['computing parameter ', num2str(mui)]);
37 detailed_simulation(dmodel, model_data);
40 rb_sim_data = rb_simulation(rmodel, reduced_data);
43 rb_sim_data = rb_reconstruction(rmodel, detailed_data, rb_sim_data);
45 errs(mui) = rb_sim_data.Delta;
49 avgrrt = mean(rrtimes);
52 mus = {[1 0], [1 0.1], [1 0.2], [10 0], [10 0.1], [10 02]};
57 sim_data = detailed_simulation(dmodel, model_data);
60 dest = [
'/home/mdrohma/projects/diss/the_diss/images/laplace_', num2str(mui)];
61 movefile(
'/home/mdrohma/projects/dune/modules/dune-rb/build_2.1/dune/rb/examples/pdelab/laplaceccfv/vtk/out.png', dest);
function [ dmodel , rmodel ] = gen_models(ModelDescr descr,BasisGenDescr bg_descr)
generates an IDetailedModel and an IReducedModel instance from description structures.
function p = plot_sim_data(model, model_data, sim_data, plot_params)
function performing the plot of the simulation results as specified in model.