Fixed a few problems in Samples and Utility

This commit is contained in:
ssun30 2022-09-06 15:58:06 -04:00 committed by Ray Speth
parent 8852e4bf72
commit e54cc97c56
5 changed files with 12 additions and 13 deletions

View File

@ -21,7 +21,7 @@ classdef Solution < handle & ThermoPhase & Kinetics & Transport
% of each species, which may be given as mole fractions or mass
% fractions. ::
%
% >> s = Solution('input.yaml'[, phase_name[, transport_model]])
% >> s = Solution('input.yaml', phase_name, transport_model)
%
% constructs a :mat:func:`Solution` object from a specification contained in
% file ``input.yaml`` with the name of the phase to be imported specified with

View File

@ -6,8 +6,5 @@ function v = canteraGitCommit()
% A string containing the Git commit hash for the current version of Cantera
%
checklib;
buflen = callct('ct_getGitCommit', 0, '');
aa = char(zeros(1, buflen));
[~, aa] = callct('ct_getGitCommit', buflen, aa);
v = aa;
v = callct2('ct_getGitCommit');
end

View File

@ -6,8 +6,5 @@ function v = canteraVersion()
% A string containing the Cantera version
%
checklib;
buflen = callct('ct_getCanteraVersion', 0, '');
aa = char(zeros(1, buflen));
[~, aa] = callct('ct_getCanteraVersion', buflen, aa);
v = aa;
v = callct2('ct_getCanteraVersion');
end

View File

@ -0,0 +1,3 @@
function output = cantera_root()
output = '/home/ssnit/anaconda3/envs/ct-matlab-test';
end

View File

@ -7,8 +7,10 @@ function d = getDataDirectories()
% Cell array with strings representing the data file search directories
%
checklib;
buflen = callct('ct_getDataDirectories', 0, '', ';');
aa = char(zeros(1, buflen));
[~, aa, ~] = callct('ct_getDataDirectories', buflen, aa, ';');
d = aa;
buflen = calllib(ct, 'ct_getDataDirectories', 0, '', ';');
aa = char(ones(1, buflen));
ptr = libpointer('cstring', aa);
[~, bb, ~] = calllib(ct, 'ct_getDataDirectories', buflen, ptr, ';');
d = bb;
clear aa, bb, ptr
end