mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
Added an option to remove all Cantera search paths from Matlab
This commit is contained in:
parent
4e122e443d
commit
132dd6a81f
@ -1,22 +1,23 @@
|
||||
function LoadCantera
|
||||
if ispc
|
||||
ctname = 'cantera_shared.dll';
|
||||
elseif ismac
|
||||
ctname = 'libcantera_shared.dylib';
|
||||
elseif isunix
|
||||
ctname = 'libcantera_shared.so';
|
||||
else
|
||||
error('Operating System Not Supported!');
|
||||
return;
|
||||
end
|
||||
if ~libisloaded(ct)
|
||||
[~,warnings] = loadlibrary([cantera_root '/Lib/' ctname], ...
|
||||
[cantera_root '/include/cantera/clib/ctmatlab.h'], ...
|
||||
'includepath', [cantera_root '/include'], ...
|
||||
'addheader','ct','addheader','ctfunc', ...
|
||||
'addheader','ctmultiphase','addheader', ...
|
||||
'ctonedim','addheader','ctreactor', ...
|
||||
'addheader','ctrpath','addheader','ctsurf');
|
||||
end
|
||||
disp('Cantera is ready for use');
|
||||
% LoadCantera
|
||||
% Load the Cantera C Library into the Memory
|
||||
%
|
||||
if ispc
|
||||
ctname = 'cantera_shared.dll';
|
||||
elseif ismac
|
||||
ctname = 'libcantera_shared.dylib';
|
||||
elseif isunix
|
||||
ctname = 'libcantera_shared.so';
|
||||
else
|
||||
error('Operating System Not Supported!');
|
||||
return;
|
||||
end
|
||||
if ~libisloaded(ct)
|
||||
[~,warnings] = loadlibrary([cantera_root '/Lib/' ctname], ...
|
||||
[cantera_root '/include/cantera/clib/ctmatlab.h'], ...
|
||||
'includepath', [cantera_root '/include'], ...
|
||||
'addheader','ct','addheader','ctfunc', ...
|
||||
'addheader','ctmultiphase','addheader', ...
|
||||
'ctonedim','addheader','ctreactor', ...
|
||||
'addheader','ctrpath','addheader','ctsurf');
|
||||
end
|
||||
disp('Cantera is ready for use');
|
||||
|
@ -1,3 +1,6 @@
|
||||
% UnloadCantera
|
||||
% Unload the Cantear C Library from the Memory
|
||||
%
|
||||
if libisloaded(ct)
|
||||
unloadlibrary(ct);
|
||||
end
|
||||
|
@ -1,4 +1,5 @@
|
||||
function cleanup()
|
||||
% CLEANUP
|
||||
% Delete all stored Cantera objects and reclaim memory.
|
||||
%
|
||||
checklib;
|
||||
|
@ -1,4 +1,5 @@
|
||||
function e = geterr()
|
||||
% GETERR
|
||||
% Get the error message from a Cantera error.
|
||||
%
|
||||
checklib;
|
||||
|
Loading…
Reference in New Issue
Block a user