rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
nonlin_symmetry.m
Go to the documentation of this file.
1 function nonlin_symmetry(step)
2 % file performing RB steps for nonlin_symmetry model
3 
4 % B. Haasdonk 8.1.2015
5 
6 if nargin<1
7  step = 1;
8 end;
9 
10 switch step
11  case 1 % detailed simulations and plot
12  params = [];
13  model = nonlin_symmetry_model(params);
14  model_data = gen_model_data(model);
15  p = 1;
16  model = set_mu(model,p);
17  sim_data = detailed_simulation(model, model_data);
18  plot_params = [];
19  plot_params.axis_equal = 1;
20  plot_params.title = 'linear flux';
21  plot_sim_data(model, model_data, sim_data,plot_params);
22  p = 2;
23  model = set_mu(model,p);
24  plot_params.title = 'quadratic flux';
25  sim_data = detailed_simulation(model, model_data);
26  plot_sim_data(model, model_data, sim_data,plot_params);
27 
28  case 2 % rb steps
29 
30  params = [];
31  model = nonlin_symmetry_model(params);
32  model_data = gen_model_data(model);
33  %detailed_data = gen_detailed_data(model,model_data);
34  detailed_data = filecache_function(@gen_detailed_data,model,model_data);
35  reduced_data = gen_reduced_data(model,detailed_data);
36  model.N = 100;
37  model.M = 150;
38  p = 2;
39  model = set_mu(model,p);
40  rb_sim_data = rb_simulation(model,reduced_data);
41  rb_sim_data = rb_reconstruction(model, detailed_data, rb_sim_data);
42  plot_params = [];
43  plot_params.axis_equal = 1;
44  plot_params.title = 'reduced simulation';
45  plot_sim_data(model, model_data, rb_sim_data,plot_params);
46 
47  otherwise
48  error('step unknown');
49 end;
50 
51 
52 
53 
54 
function nonlin_symmetry(step)
file performing RB steps for nonlin_symmetry model
function varargout = filecache_function(funcptr, varargin)
function used for file-caching other function calls.
function p = plot_sim_data(model, model_data, sim_data, plot_params)
function performing the plot of the simulation results as specified in model.
Definition: plot_sim_data.m:17