rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
twoscale_thermalblock_model.m
1 function model = twoscale_thermalblock_model(params)
2 %
3 % A thermalblock model, the parameters of which are
4 % coupled to give overall params.Qa instead of params.B1*params.B2
5 % many parameters. An N x M matrix of binary coefficient pattern
6 % needs to be given in params.parameter_pattern.
7 %
8 % A B1=M*M and B2 = N*N thermalblock is created, where
9 % The pattern is taken for mu_1 as N*M unit blocks and
10 % the pattern is repeated N*M times for mu2
11 % the remaining blocks get mu3
12 %
13 % Hence, Qs = 3.
14 
15 % B. Haasdonk 4.7.2012
16 
17 [N,M] = size(params.parameter_pattern)
18 params.B1 = M*M;
19 params.B2 = N*N;
20 params.Qa = 3;
21 pattern = params.parameter_pattern';
22 pattern = pattern(:,end:-1:1);
23 parameter_mapping_matrix = 3*ones(N*N,M*M);
24 parameter_mapping_matrix1 = kron(pattern,ones(N,M));
25 parameter_mapping_matrix2 = kron(ones(N,M),pattern);
26 
27 i = find(parameter_mapping_matrix1);
28 parameter_mapping_matrix(i) = 1;
29 i = find(parameter_mapping_matrix2);
30 parameter_mapping_matrix(i) = 2;
31 params.parameter_mapping = parameter_mapping_matrix(:);
32 model = multiscale_thermalblock_model(params);
function res = thermalblock(step, params)
thermalblock example
Definition: thermalblock.m:17