2 % Detailed model
for the Thermalblock problem.
4 % This is a specialization of a linear stationary problem with simplified
5 % methods
for parameter handling, and a modified output method.
9 function dm = DetailedModel(descr)
10 %
function dm = DetailedModel(descr)
11 % constructor based on problem description
14 % descr: structure of type
ModelDescr describing the problem and the
19 function this=set_mu(
this, mu)
20 if length(mu)~=this.descr.number_of_blocks
21 error('length of mu does not fit to number of blocks!');
23 this.descr.mus = mu(:);
26 function mu = get_mu(this)
27 mu = this.descr.mus(:);
30 function p =
plot_sim_data(this, model_data, sim_data, plot_params)
31 % function p =
plot_sim_data(dmodel, model_data, sim_data, plot_params)
32 % plots the simulation data as returned by detailed_simulation()
37 % sim_data: simulation data structure as returned by detailed_simulation()
38 % plot_params: structure which controls the plot output
40 % Required fields of sim_data:
41 % uh: discrete @ref fem function (c.f. ::
femdiscfunc)
43 % Optional fields of plot_params:
44 % subsampling_level: number of sampling steps for interpolation of discrete
45 % @ref fem functions. (default = 10)
46 % title: title of the plot (default = none)
47 % no_lines:
boolean flag indicating whether lines between the
48 % grid cell shall be skipped drawing (default = 1)
49 % plot_blocks:
boolean flag indicating whether the thermal blocks
50 % shall be drawn. (default = 1)
53 % p: GUI handle to the created MATLAB figure
58 if ~isfield(plot_params,'no_lines')
59 plot_params.no_lines = 1;
63 if ~isfield(plot_params,'plot_blocks')
64 plot_params.plot_blocks = 1;
66 if plot_params.plot_blocks
70 [zeros(1,descr.B1+1);...
72 set(l1,'color',[0,0,0],'linestyle','-.');
74 l2 = line([zeros(1,descr.B2+1);...
75 ones(1,descr.B2+1)],...
77 set(l2,'color',[0,0,0],'linestyle','-.');
78 p = [p(:);l1(:);l2(:)];
class representing a continous piecewise polynomial function of arbitrary dimension. DOFS correspond to the values of Lagrange-nodes.
Detailed model for the Thermalblock problem.
Reduced basis implementation for linear stationary PDEs.
Struct with control fields for the analytical PDE functions, the discretization and the parametrizati...
Detailed model for a linear stationary problem with a Finite element discretization.
function p = plot_sim_data(model, model_data, sim_data, plot_params)
function performing the plot of the simulation results as specified in model.