rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
plot_sim_data.m
1 function p = plot_sim_data(dmodel, model_data, sim_data, plot_params)
2 %function plot_sim_data(descr, model_data, sim_data, plot_params)
3 % plots the simulation data as returned by detailed_simulation()
4 %
5 % Parameters:
6 % sim_data: simulation data structure as returned by detailed_simulation()
7 % plot_params: structure which controls the plot output
8 %
9 % Optional fields of plot_params:
10 % bind_to_model: Sometimes the plot can adapted according to the parameters.
11 % For example if the domain of the simulation changes with
12 % the parameter. In this case this boolean flag can be set,
13 % and the copy_model_descr_to_plot_params() function is
14 % called to copy important parameters to the 'plot_params'
15 % (default = 'false')
16 % plot: function pointer to a function plotting a single snapshot
17 % for a specific time instant. (default = 'descr.plot')
18 %
19 % Required fields of sim_data:
20 % U: DOF vector of solution snapshots
21 %
22 % Return values:
23 % p : Matlab GUI handle to figure window
24 %
25 % function plotting simulation results
26 
27 % Martin Drohmann 15.12.2009
28 
29  descr = dmodel.descr;
30  if isfield(plot_params, 'bind_to_model') ...
31  && plot_params.bind_to_model
32  plot_params = copy_model_descr_to_plot_params(descr, ...
33  plot_params);
34  end
35  % plot_params.plot = descr.plot;
36  if ~isfield(plot_params,'plot')
37  plot_params.plot = descr.plot;
38  end;
39  p = plot_sequence(sim_data.U, model_data.grid, plot_params);
40 
function p = plot_sequence(varargin)
plotting a sequence of data slices on polygonal 2d grid (constructed from params if empty) and provid...
Definition: plot_sequence.m:17
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