Cantera  3.2.0a2
Loading...
Searching...
No Matches

The main library of the generated CLib API contains Cantera service functions. More...

Collaboration diagram for ct Library:

Detailed Description

The main library of the generated CLib API contains Cantera service functions.

Warning
This library is an experimental part of the Cantera API and may be changed or removed without notice.

Functions

int32_t ct_version (int32_t bufLen, char *buf)
 Returns the Cantera version.
 
int32_t ct_gitCommit (int32_t bufLen, char *buf)
 Returns the hash of the git commit from which Cantera was compiled, if known.
 
int32_t ct_addDataDirectory (const char *dir)
 Add a directory to the data file search path.
 
int32_t ct_getDataDirectories (const char *sep, int32_t bufLen, char *buf)
 Get the Cantera data directories.
 
int32_t ct_findInputFile (const char *name, int32_t bufLen, char *buf)
 Find an input file.
 
int32_t ct_suppress_deprecation_warnings ()
 Globally disable printing of deprecation warnings.
 
int32_t ct_make_deprecation_warnings_fatal ()
 Turns deprecation warnings into exceptions.
 
int32_t ct_suppress_warnings ()
 Globally disable printing of (user) warnings.
 
int32_t ct_warnings_suppressed ()
 Returns.
 
int32_t ct_make_warnings_fatal ()
 Turns Cantera warnings into exceptions.
 
int32_t ct_suppress_thermo_warnings (int32_t suppress)
 Globally disable printing of warnings about problematic thermo data, such as NASA polynomials with discontinuities at the midpoint temperature.
 
int32_t ct_use_legacy_rate_constants (int32_t legacy)
 Set definition used for rate constant calculation.
 
int32_t ct_appdelete ()
 Delete and free all memory associated with the application.
 
const double ct_Avogadro ()
 Avogadro's Number.
 
const double ct_Boltzmann ()
 Boltzmann constant.
 
const double ct_Planck ()
 Planck constant.
 
const double ct_ElectronCharge ()
 Elementary charge.
 
const double ct_lightSpeed ()
 Speed of Light in a vacuum.
 
const double ct_OneAtm ()
 One atmosphere [Pa].
 
const double ct_OneBar ()
 One bar [Pa].
 
const double ct_fineStructureConstant ()
 Fine structure constant.
 
const double ct_ElectronMass ()
 Electron Mass.
 
const double ct_GasConstant ()
 Universal Gas Constant.
 
const double ct_StefanBoltz ()
 Stefan-Boltzmann constant.
 
const double ct_Faraday ()
 Faraday constant.
 
const double ct_permeability_0 ()
 Permeability of free space.
 
const double ct_epsilon_0 ()
 Permittivity of free space.
 
int32_t ct_getCanteraError (int32_t bufLen, char *buf)
 Get Cantera error.
 
int32_t ct_setLogCallback (LogCallback writer)
 Set Logger callback.
 
int32_t ct_writeLog (const char *msg)
 Write a message to the logger.
 
int32_t ct_clearStorage ()
 Delete all objects with mapping preserved.
 
int32_t ct_resetStorage ()
 Delete all objects and erase mapping.
 

Function Documentation

◆ ct_version()

int32_t ct_version ( int32_t  bufLen,
char *  buf 
)

Returns the Cantera version.

Wraps C++ function: string version()

Parameters
[in]bufLenLength of reserved array.
[out]bufReturned string value.
Returns
Actual length of string including string-terminating null byte, \0, or -1 for exception handling.

Definition at line 92 of file ct.cpp.

◆ ct_gitCommit()

int32_t ct_gitCommit ( int32_t  bufLen,
char *  buf 
)

Returns the hash of the git commit from which Cantera was compiled, if known.

Wraps C++ function: string gitCommit()

Parameters
[in]bufLenLength of reserved array.
[out]bufReturned string value.
Returns
Actual length of string including string-terminating null byte, \0, or -1 for exception handling.

Definition at line 104 of file ct.cpp.

◆ ct_addDataDirectory()

int32_t ct_addDataDirectory ( const char *  dir)

Add a directory to the data file search path.

Wraps C++ function: void addDirectory(const string&)

Parameters
dirString name for the directory to be added to the search path

Definition at line 116 of file ct.cpp.

◆ ct_getDataDirectories()

int32_t ct_getDataDirectories ( const char *  sep,
int32_t  bufLen,
char *  buf 
)

Get the Cantera data directories.

Wraps C++ function: string getDataDirectories(const string&)

Parameters
sepSeparator to use between directories in the string
[in]bufLenLength of reserved array.
[out]bufReturned string value.
Returns
Actual length of string including string-terminating null byte, \0, or -1 for exception handling.

Definition at line 127 of file ct.cpp.

◆ ct_findInputFile()

int32_t ct_findInputFile ( const char *  name,
int32_t  bufLen,
char *  buf 
)

Find an input file.

Wraps C++ function: string findInputFile(const string&)

Parameters
nameName of the input file to be searched for
[in]bufLenLength of reserved array.
[out]bufReturned string value.
Returns
Actual length of string including string-terminating null byte, \0, or -1 for exception handling.

Definition at line 139 of file ct.cpp.

◆ ct_suppress_deprecation_warnings()

int32_t ct_suppress_deprecation_warnings ( )

Globally disable printing of deprecation warnings.

Wraps C++ function: void suppress_deprecation_warnings()

Definition at line 151 of file ct.cpp.

◆ ct_make_deprecation_warnings_fatal()

int32_t ct_make_deprecation_warnings_fatal ( )

Turns deprecation warnings into exceptions.

Wraps C++ function: void make_deprecation_warnings_fatal()

Definition at line 162 of file ct.cpp.

◆ ct_suppress_warnings()

int32_t ct_suppress_warnings ( )

Globally disable printing of (user) warnings.

Wraps C++ function: void suppress_warnings()

Definition at line 173 of file ct.cpp.

◆ ct_warnings_suppressed()

int32_t ct_warnings_suppressed ( )

Returns.

Wraps C++ function: bool warnings_suppressed()

Definition at line 184 of file ct.cpp.

◆ ct_make_warnings_fatal()

int32_t ct_make_warnings_fatal ( )

Turns Cantera warnings into exceptions.

Wraps C++ function: void make_warnings_fatal()

Definition at line 195 of file ct.cpp.

◆ ct_suppress_thermo_warnings()

int32_t ct_suppress_thermo_warnings ( int32_t  suppress)

Globally disable printing of warnings about problematic thermo data, such as NASA polynomials with discontinuities at the midpoint temperature.

Wraps C++ function: void suppress_thermo_warnings(bool)

Parameters
suppressUndocumented.

Definition at line 206 of file ct.cpp.

◆ ct_use_legacy_rate_constants()

int32_t ct_use_legacy_rate_constants ( int32_t  legacy)

Set definition used for rate constant calculation.

Wraps C++ function: void use_legacy_rate_constants(bool)

Parameters
legacyUndocumented.

Definition at line 218 of file ct.cpp.

◆ ct_appdelete()

int32_t ct_appdelete ( )

Delete and free all memory associated with the application.

Wraps C++ function: void appdelete()

Definition at line 230 of file ct.cpp.

◆ ct_Avogadro()

const double ct_Avogadro ( )

Avogadro's Number.

Wraps C++ variable-getter: const double Avogadro

Definition at line 241 of file ct.cpp.

◆ ct_Boltzmann()

const double ct_Boltzmann ( )

Boltzmann constant.

Wraps C++ variable-getter: const double Boltzmann

Definition at line 251 of file ct.cpp.

◆ ct_Planck()

const double ct_Planck ( )

Planck constant.

Wraps C++ variable-getter: const double Planck

Definition at line 261 of file ct.cpp.

◆ ct_ElectronCharge()

const double ct_ElectronCharge ( )

Elementary charge.

Wraps C++ variable-getter: const double ElectronCharge

Definition at line 271 of file ct.cpp.

◆ ct_lightSpeed()

const double ct_lightSpeed ( )

Speed of Light in a vacuum.

Wraps C++ variable-getter: const double lightSpeed

Definition at line 281 of file ct.cpp.

◆ ct_OneAtm()

const double ct_OneAtm ( )

One atmosphere [Pa].

Wraps C++ variable-getter: const double OneAtm

Definition at line 291 of file ct.cpp.

◆ ct_OneBar()

const double ct_OneBar ( )

One bar [Pa].

Wraps C++ variable-getter: const double OneBar

Definition at line 301 of file ct.cpp.

◆ ct_fineStructureConstant()

const double ct_fineStructureConstant ( )

Fine structure constant.

Wraps C++ variable-getter: const double fineStructureConstant

Definition at line 311 of file ct.cpp.

◆ ct_ElectronMass()

const double ct_ElectronMass ( )

Electron Mass.

Wraps C++ variable-getter: const double ElectronMass

Definition at line 321 of file ct.cpp.

◆ ct_GasConstant()

const double ct_GasConstant ( )

Universal Gas Constant.

Wraps C++ variable-getter: const double GasConstant

Definition at line 331 of file ct.cpp.

◆ ct_StefanBoltz()

const double ct_StefanBoltz ( )

Stefan-Boltzmann constant.

Wraps C++ variable-getter: const double StefanBoltz

Definition at line 341 of file ct.cpp.

◆ ct_Faraday()

const double ct_Faraday ( )

Faraday constant.

Wraps C++ variable-getter: const double Faraday

Definition at line 351 of file ct.cpp.

◆ ct_permeability_0()

const double ct_permeability_0 ( )

Permeability of free space.

Wraps C++ variable-getter: const double permeability_0

Definition at line 361 of file ct.cpp.

◆ ct_epsilon_0()

const double ct_epsilon_0 ( )

Permittivity of free space.

Wraps C++ variable-getter: const double epsilon_0

Definition at line 371 of file ct.cpp.

◆ ct_getCanteraError()

int32_t ct_getCanteraError ( int32_t  bufLen,
char *  buf 
)

Get Cantera error.

Wraps C++ function: custom code

Parameters
bufLenLength of reserved array.
bufString containing Cantera error.
Returns
Actual length of string or -1 for exception handling.

Definition at line 381 of file ct.cpp.

◆ ct_setLogCallback()

int32_t ct_setLogCallback ( LogCallback  writer)

Set Logger callback.

Wraps C++ function: custom code

Parameters
writerCallback that is invoked to produce log output.

Definition at line 395 of file ct.cpp.

◆ ct_writeLog()

int32_t ct_writeLog ( const char *  msg)

Write a message to the logger.

Wraps C++ function: void writelog_direct(const string&)

Parameters
msgC++ string to be written to the logger

Definition at line 409 of file ct.cpp.

◆ ct_clearStorage()

int32_t ct_clearStorage ( )

Delete all objects with mapping preserved.

Wraps C++ reserved CLib function: custom code

Returns
Zero if successful or -1 for exception handling.

Definition at line 420 of file ct.cpp.

◆ ct_resetStorage()

int32_t ct_resetStorage ( )

Delete all objects and erase mapping.

Wraps C++ reserved CLib function: custom code

Returns
Zero if successful or -1 for exception handling.

Definition at line 445 of file ct.cpp.