Home > tt2 > exp > tt_qlaplacex_dd.m

tt_qlaplacex_dd

PURPOSE ^

returns a rank-5 QTT decomposition of

SYNOPSIS ^

function [tt]=tt_qlaplacex_dd(d)

DESCRIPTION ^

 returns a rank-5 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-Dirichlet boundary conditions being imposed

 D=size(d,2) must be >= 1

 January 17, 2011
 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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [tt]=tt_qlaplacex_dd(d)
0002 
0003 % returns a rank-5 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-Dirichlet boundary conditions being imposed
0008 %
0009 % D=size(d,2) must be >= 1
0010 %
0011 % January 17, 2011
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 P=[0,1;1,0];
0028 E=ones(2);
0029 F=[1,-1;-1,1];
0030 K=[-1,0;0,1];
0031 L=[0,-1;1,0];
0032 
0033 
0034 key=0;
0035 for k=1 : D
0036     for kappa=1 : d(k)
0037         key=key+1;
0038         xi=(2^(kappa-1)+1)/(2^kappa+1);
0039         eta=2^(kappa-2)/(2^kappa+1);
0040         zeta=xi*(2^(kappa-1)+1)/2^(kappa-1);
0041         if (kappa == 1)
0042             tt{key}=zeros(2,2,5);
0043             tt{key}(:,:,1)=(E+I)/3;
0044             tt{key}(:,:,2)=2*E;
0045             tt{key}(:,:,3)=F/18;
0046             tt{key}(:,:,4)=2*K/3;
0047             tt{key}(:,:,5)=-2*L/3;
0048             if (k ~= 1)
0049                 tt{key}=permute(tt{key},[1,2,4,3]);
0050             end
0051         elseif (kappa == d(k))
0052             tt{key}=zeros(2,2,5);
0053             tt{key}(:,:,1)=I;
0054             tt{key}(:,:,2)=xi*I/4+zeta*P/4;
0055             tt{key}(:,:,3)=xi*I-zeta*P;
0056             tt{key}(:,:,4)=-xi*K/2;
0057             tt{key}(:,:,5)=zeta*L/2;
0058         else
0059             tt{key}=zeros(2,2,5,5);
0060             tt{key}(:,:,1,1)=I;
0061             tt{key}(:,:,2,1)=xi*I/4+zeta*P/4;
0062             tt{key}(:,:,3,1)=xi*I-zeta*P;
0063             tt{key}(:,:,4,1)=-xi*K/2;
0064             tt{key}(:,:,5,1)=zeta*L/2;
0065             tt{key}(:,:,2,2)=2*E;
0066             tt{key}(:,:,2,3)=2*eta^2*F;
0067             tt{key}(:,:,3,3)=2*xi^2*E;
0068             tt{key}(:,:,4,3)=2*xi*eta*K;
0069             tt{key}(:,:,5,3)=2*xi*eta*L;
0070             tt{key}(:,:,2,4)=4*eta*K;
0071             tt{key}(:,:,4,4)=2*xi*E;
0072             tt{key}(:,:,2,5)=-4*eta*L;
0073             tt{key}(:,:,5,5)=2*xi*E;
0074         end
0075     end
0076 end
0077 
0078 tt=tt_matrix(tt); % @Bydlocode
0079 return
0080 end

Generated on Wed 08-Feb-2012 18:20:24 by m2html © 2005