From 58a4183e55318c44638e2e57096520e3ab5d8329 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Fri, 6 Dec 2013 23:15:08 +0000 Subject: [PATCH] [Matlab] Remove broken ck2ctml function There are three problems with this function. It does not work, since it calls ctmethods with the wrong number of arguments. Even if that were fixed, it wouldn't do what it claims, as the method it calls generates a CTI file, not an XML file. Finally, it is redundant, as the 'ck2cti' function can be used for generating the CTI file, and the CTI to XML conversion is handled automatically when importing the phase. Therefore, this function is being removed. --- interfaces/matlab/toolbox/IdealGasMix.m | 2 +- interfaces/matlab/toolbox/ck2ctml.m | 45 ------------------------- 2 files changed, 1 insertion(+), 46 deletions(-) delete mode 100644 interfaces/matlab/toolbox/ck2ctml.m diff --git a/interfaces/matlab/toolbox/IdealGasMix.m b/interfaces/matlab/toolbox/IdealGasMix.m index 2e0cf48dd..efd7ddcaa 100755 --- a/interfaces/matlab/toolbox/IdealGasMix.m +++ b/interfaces/matlab/toolbox/IdealGasMix.m @@ -29,7 +29,7 @@ function s = IdealGasMix(a,b,c) % calls. If the initial call includes a transport database, then % the CTML file will contain transport data. % -% See also: ck2ctml, Solution +% See also: ck2cti, Solution % dotloc = findstr(a,'.'); if dotloc(end) > 1 diff --git a/interfaces/matlab/toolbox/ck2ctml.m b/interfaces/matlab/toolbox/ck2ctml.m deleted file mode 100644 index 47f136be6..000000000 --- a/interfaces/matlab/toolbox/ck2ctml.m +++ /dev/null @@ -1,45 +0,0 @@ -function f = ck2ctml(infile, thermo, transport) -% CK2CTML - Convert a Chemkin-compatible reaction mechanism file to -% CTML. -% -% Cantera uses an XML-based file format (CTML) for specifying input -% parameters of any type, including specifying reaction mechanism -% attributes. This function reads a reaction mechanism file in "CK -% format" - the file format used by the Chemkin software package - -% and writes an equivalent description in CTML. -% -% f = ck2ctml('chem.inp') -% f = ck2ctml('chem.inp', 'therm.dat') -% f = ck2ctml('chem.inp', 'therm.dat', 'tran.dat') -% -% These 3 statements all create a CTML file 'chem.xml.' In the -% first case, the CK-format file contains all required species -% thermo data, while in the second case some or all thermo data is -% read from file 'therm.dat.' In the third form, the CTML file -% created will also contain transport property parameters. The -% function return value is a string containing the output file -% name. -% -if nargin == 0 - error('input file name must be supplied') -elseif nargin == 1 - thermo = '-'; - transport = '-'; -elseif nargin == 2 - transport = '-'; -end - -dotloc = findstr(infile,'.'); -if dotloc(end) > 1 - idtag = infile(1:dotloc(end)-1); - outfile = [idtag '.xml']; -else - idtag = infile; - outfile = [infile '.xml']; -end - -iok = ctmethods(0, 1, infile, thermo, transport, outfile, idtag); -if iok - error(geterr); -end -f = outfile;