returns a rank-4 QTT decomposition of Delta_{1}^{-1} \ otimes \ldots \otimes Delta_{D}^{-1}, Delta_{k} being a discretization of Laplace operator on 2^d(k) points uniform grid, Dirichlet-Neumann boundary conditions being imposed D=size(d,2) must be >= 1 September 3, 2010 Vladimir Kazeev vladimir.kazeev@gmail.com INM RAS Moscow, Russia Look for details in the Preprint No. 75, 2010 of Max-Planck Institute for Mathematics in the Sciences Vladimir A. Kazeev and Boris N. Khoromskij On explicit QTT representation of Laplace operator and its inverse http://www.mis.mpg.de/publications/preprints/2010/prepr2010-75.html
0001 function [tt]=tt_qlaplacex_dn(d) 0002 0003 % returns a rank-4 QTT decomposition of 0004 % Delta_{1}^{-1} \ otimes \ldots \otimes Delta_{D}^{-1}, 0005 % Delta_{k} being a discretization of Laplace operator on 2^d(k) points 0006 % uniform grid, 0007 % Dirichlet-Neumann boundary conditions being imposed 0008 % 0009 % D=size(d,2) must be >= 1 0010 % 0011 % September 3, 2010 0012 % Vladimir Kazeev 0013 % vladimir.kazeev@gmail.com 0014 % INM RAS 0015 % Moscow, Russia 0016 % 0017 % Look for details in the Preprint No. 75, 2010 of 0018 % Max-Planck Institute for Mathematics in the Sciences 0019 % Vladimir A. Kazeev and Boris N. Khoromskij 0020 % On explicit QTT representation of Laplace operator and its inverse 0021 % http://www.mis.mpg.de/publications/preprints/2010/prepr2010-75.html 0022 0023 d=fliplr(d); 0024 D=size(d,2); 0025 tt=cell(sum(d),1); 0026 I=eye(2); 0027 J=zeros(2); 0028 J(1,2)=1; 0029 I2=zeros(2); 0030 I2(2,2)=1; 0031 E=ones(2); 0032 0033 key=0; 0034 for k=1 : D 0035 for kappa=1 : d(k) 0036 key=key+1; 0037 if (kappa == 1) 0038 tt{key}=zeros(2,2,4); 0039 tt{key}(:,:,1)=I+I2+J+J'; 0040 tt{key}(:,:,2)=2*E; 0041 tt{key}(:,:,3)=I2+J'+E; 0042 tt{key}(:,:,4)=I2+J+E; 0043 if (k ~= 1) 0044 tt{key}=permute(tt{key},[1,2,4,3]); 0045 end 0046 elseif (kappa == d(k)) 0047 tt{key}=zeros(2,2,4); 0048 tt{key}(:,:,1)=I; 0049 tt{key}(:,:,2)=I2; 0050 tt{key}(:,:,3)=J; 0051 tt{key}(:,:,4)=J'; 0052 else 0053 tt{key}=zeros(2,2,4,4); 0054 tt{key}(:,:,1,1)=I; 0055 tt{key}(:,:,2,2)=2*E; 0056 tt{key}(:,:,3,3)=E; 0057 tt{key}(:,:,4,4)=E; 0058 tt{key}(:,:,2,1)=I2; 0059 tt{key}(:,:,3,1)=J; 0060 tt{key}(:,:,4,1)=J'; 0061 tt{key}(:,:,2,3)=I2+J'; 0062 tt{key}(:,:,2,4)=I2+J; 0063 end 0064 end 0065 end 0066 0067 tt=tt_matrix(tt); % @Bydlocode 0068 return 0069 end