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
ts_smoke.py runs
[wrf-fire-matlab.git]
/
quicwind
/
poisson_fft3z_test.m
blob
0deb1fabb2a2ebad2a85d8b98d9b7fecb141b4a8
1
function err=poisson_fft3z_test
2
disp('poisson_fft3z_test')
3
fprintf('against poisson_fft2: ')
4
n=[10,15];
5
h=rand(1,2);
6
F=rand(n);
7
u2=poisson_fft2(F,h,-1);
8
u3=poisson_fft3z(F,h);
9
fprintf('err=%s\n',norm(u3-u2,inf));
10
n=[500,500,24];
11
fprintf('3D Poisson equation size %d %d %d: ',n)
12
% params
13
h=rand(1,3);
14
u=rand(n);
15
d=rand(1,3);
16
% test
17
g=grad3z(u,h);
18
for i=1:3
19
g{i}=g{i}*d(i);
20
end
21
f=-div3(g,h);
22
v=poisson_fft3z(f,h,d);
23
err=big(u-v)
24
end