Home > solver > TEBD_GetAlgorithm.m

TEBD_GetAlgorithm

PURPOSE ^

Routine that chooses the version of 2EBD-HPE based on the string parameters

SYNOPSIS ^

function [TEBD,params] = TEBD_GetAlgorithm(args)

DESCRIPTION ^

Routine that chooses the version of 2EBD-HPE based on the string parameters
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 2EBD-HPE:
% Modified by C.Ortiz
% Last Modified: 6/15/2012

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %Routine that chooses the version of 2EBD-HPE based on the string parameters
0002 %%
0003 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0004 %% 2EBD-HPE:
0005 %% Modified by C.Ortiz
0006 %% Last Modified: 6/15/2012
0007 function [TEBD,params] = TEBD_GetAlgorithm(args)
0008 params.vers = 2;
0009 params.subvers = 2;
0010 if nargin == 0 || isempty(args) 
0011     TEBD = @TEBD_NC_v2_2;
0012     return;
0013 end
0014 
0015 if ~any(strcmp(args,'NC')) && any(strcmp(args,'C'))
0016     NC = 0;
0017 else
0018     NC = 1;
0019 end
0020 
0021 if ~any(strcmp(args,'v2.2')) && any(strcmp(args,'v2.1'))
0022     params.subvers = 1;
0023 else
0024     params.subvers = 2;
0025 end
0026 
0027 algstr = 'TEBD';
0028 if NC
0029     algstr = [algstr,'_NC'];
0030 end
0031 algstr = [algstr,'_v',num2str(params.vers),'_',num2str(params.subvers)];
0032 eval(['TEBD = @',algstr,';']);
0033 
0034

Generated on Tue 06-Aug-2013 17:07:59 by m2html © 2005