Utility Functions#

Caution

The MATLAB toolbox is an experimental part of the Cantera API and may be changed without notice. It includes breaking changes from the legacy MATLAB API. While almost all features of the legacy MATLAB API are implemented, the toolbox does not include all functionality available for the C++ and Python interfaces.

Library Setup#

ct.load(mode)#

Load the MATLAB-to-C++ Interface

Usage:

ct.load % defaults to ‘outofprocess’ ct.load(‘inprocess’) % load in-process ct.load(‘outofprocess’)% load out-of-process

ct.unload()#

Unload Cantera MATLAB C++ interface and clean up MATLAB side

ct.isLoaded(throw)#

Check whether Cantera MATLAB C++ interface is loaded.

>> s = ct.isLoaded >> s = ct.isLoaded(true)

Parameters:

throw – If interface is not loaded, throw error instead of issuing warning; default is false.

Returns:

true if loaded, otherwise false.

ct.cleanUp()#

Delete all stored Cantera objects and reclaim memory.

Global Settings#

ct.dataDirectories()#

Get a cell array of the directories searched for data files.

>> ct.dataDirectories()

Get a cell array of the directories Cantera searches for data files

Returns:

Cell array with strings representing the data file search directories

ct.makeDeprecationWarningsFatal()#

Turns deprecation warnings into exceptions.

>> ct.makeDeprecationWarningsFatal()

Library Information#

ct.gitCommit()#

Get Cantera Git commit hash.

>> ct.gitCommit()
Returns:

A string containing the Git commit hash for the current version of Cantera.

ct.usesHDF5()#

Returns true if Cantera was compiled with HDF5 support.

>> ct.usesHDF5()
Returns:

A string containing the Git commit hash for the current version of Cantera.

ct.version()#

Get Cantera version information.

>> ct.version()
Returns:

A string containing the Cantera version.