mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
28 lines
997 B
Matlab
28 lines
997 B
Matlab
function ctLoad()
|
|
% Load the Cantera C Library into Memory
|
|
%
|
|
if ispc
|
|
ctName = '/Lib/cantera_shared.dll';
|
|
elseif ismac
|
|
ctName = '/Lib/libcantera_shared.dylib';
|
|
elseif isunix
|
|
ctName = '/lib/libcantera_shared.so';
|
|
else
|
|
error('Operating System Not Supported!');
|
|
return;
|
|
end
|
|
|
|
if ~libisloaded(ctSharedLibrary)
|
|
[~, warnings] = loadlibrary([ctRoot, ctName], ...
|
|
[ctRoot, '/include/cantera/clib/ctmatlab.h'], ...
|
|
'includepath', [ctRoot '/include'], ...
|
|
'addheader', 'ct', 'addheader', 'ctfunc', ...
|
|
'addheader', 'ctmultiphase', 'addheader', ...
|
|
'ctonedim', 'addheader', 'ctreactor', ...
|
|
'addheader', 'ctrpath', 'addheader', 'ctsurf');
|
|
end
|
|
|
|
disp(sprintf('Cantera %s is ready for use.', ctVersion))
|
|
|
|
end
|