ts_smoke.py runs
[wrf-fire-matlab.git] / quicwind / poisson_fft3q.m
blob9db931dd2d46b4664df1611f6076510d1cd41bb5
1 function u=poisson_fft3q(f,h)
2 % solve poisson equation with QUIC boundary conditions:
3 % lambda = 0 top and size, dlambda/dz = 0 on the bottom
4 n=size(f);
5 % reflect top to the bottom
6 r = zeros(n(1),n(2),2*n(3));
7 r(:,:,1:n(3))=f(:,:,n(3):-1:1);
8 r(:,:,n(3)+1:2*n(3))=f;
9 % solve with zero boundary conditions
10 u=poisson_fft3z(r,h);
11 % check up and down symmetry
12 err_sym = big(u(:,:,n(3):-1:1)-u(:,:,n(3)+1:2*n(3)))
13 % return upper half
14 u = u(:,:,n(3)+1:2*n(3));