repo.or.cz
/
wrf-fire-matlab.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Merge branch 'fixf'
[wrf-fire-matlab.git]
/
femwind
/
hexa_coupling.m
blob
fd0de63ea940570f919dd3d7ff895d6e7cdaf893
1
function C=hexa_coupling(a,d)
2
% hexa_coupling(a,d)
3
% example: hexa_coupling([1,1,100],[1,1,1])
4
5
% lexicographic unit cube
6
% x y z
7
X0 = [0 0 0 %1
8
1 0 0 %2
9
0 1 0 %3
10
1 1 0 %4
11
0 0 1 %5
12
1 0 1 %6
13
0 1 1 %7
14
1 1 1 %8
15
]';
16
17
% 7-----8
18
% /| /|
19
% 5-----6 |
20
% | | | |
21
% | 3---|-4
22
% |/ |/
23
% 1-----2
24
25
% linear transformation
26
X=diag(d)*X0;
27
A=diag(a);
28
u = [1, 2, 3]';
29
[K, F, Jg] = hexa(A,X,u);
30
D=diag(diag(K).^(-1/2));
31
C=D*K*D;
32
end