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

Generated CLib API for Cantera's Solution class. More...

Collaboration diagram for ctsol Library:

Detailed Description

Generated CLib API for Cantera's Solution class.

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

Functions

int32_t sol_newSolution (const char *infile, const char *name, const char *transport)
 Create and initialize a new Solution manager from an input file.
 
int32_t sol_newInterface (const char *infile, const char *name, int32_t adjacentLen, const int32_t *adjacent)
 Create and initialize a new Interface from an input file.
 
int32_t sol_del (int32_t handle)
 Delete Solution object.
 
int32_t sol_name (int32_t handle, int32_t bufLen, char *buf)
 Return the name of this Solution object.
 
int32_t sol_setName (int32_t handle, const char *name)
 Set the name of this Solution object.
 
int32_t sol_thermo (int32_t handle)
 Accessor for the ThermoPhase pointer.
 
int32_t sol_kinetics (int32_t handle)
 Accessor for the Kinetics pointer.
 
int32_t sol_transport (int32_t handle)
 Accessor for the Transport pointer.
 
int32_t sol_transportModel (int32_t handle, int32_t bufLen, char *buf)
 Retrieve transport model name.
 
int32_t sol_setTransportModel (int32_t handle, const char *model)
 Set the Transport object by name.
 
int32_t sol_nAdjacent (int32_t handle)
 Get the number of adjacent phases.
 
int32_t sol_adjacent (int32_t handle, int32_t i)
 Get the Solution object for an adjacent phase by index.
 
int32_t sol_adjacentName (int32_t handle, int32_t i, int32_t bufLen, char *buf)
 Get the name of an adjacent phase by index.
 
int32_t sol_source (int32_t handle, int32_t bufLen, char *buf)
 Retrieve source used for object creation; usually an input file name.
 
int32_t sol_cabinetSize ()
 Return size of Solution storage.
 

Function Documentation

◆ sol_newSolution()

int32_t sol_newSolution ( const char *  infile,
const char *  name,
const char *  transport 
)

Create and initialize a new Solution manager from an input file.

Wraps C++ constructor: shared_ptr<Solution> newSolution(const string&, const string&, const string&)

Uses:

  • shared_ptr<ThermoPhase> Solution::thermo()
  • shared_ptr<Kinetics> Solution::kinetics()
  • shared_ptr<Transport> Solution::transport()
Parameters
infilename of the input file
namename of the phase in the file. If this is blank, the first phase in the file is used.
transportname of the transport model.
Returns
Handle to stored Solution object or -1 for exception handling.

Definition at line 55 of file ctsol.cpp.

◆ sol_newInterface()

int32_t sol_newInterface ( const char *  infile,
const char *  name,
int32_t  adjacentLen,
const int32_t *  adjacent 
)

Create and initialize a new Interface from an input file.

Wraps C++ constructor: shared_ptr<Interface> newInterface(const string&, const string&, const vector<shared_ptr<Solution>>&)

Uses:

  • shared_ptr<ThermoPhase> Solution::thermo()
  • shared_ptr<Kinetics> Solution::kinetics()
Parameters
infilename of the input file
namename of the phase in the file. If this is the empty string, the first phase in the file is used.
[in]adjacentLenLength of array reserved for adjacent.
adjacentMemory holding Solution objects. vector containing adjacent Solution objects. If empty, adjacent phases will be instantiated based on the phase definition.
Returns
Handle to stored Interface object or -1 for exception handling.

Definition at line 76 of file ctsol.cpp.

◆ sol_del()

int32_t sol_del ( int32_t  handle)

Delete Solution object.

Wraps C++ destructor: undefined

Uses:

  • shared_ptr<ThermoPhase> Solution::thermo()
  • shared_ptr<Kinetics> Solution::kinetics()
  • shared_ptr<Transport> Solution::transport()
Parameters
handleHandle to Solution object.
Returns
Zero for success and -1 for exception handling.

Definition at line 98 of file ctsol.cpp.

◆ sol_name()

int32_t sol_name ( int32_t  handle,
int32_t  bufLen,
char *  buf 
)

Return the name of this Solution object.

Wraps C++ getter: string Solution::name()

Parameters
handleHandle to queried Solution object.
[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 129 of file ctsol.cpp.

◆ sol_setName()

int32_t sol_setName ( int32_t  handle,
const char *  name 
)

Set the name of this Solution object.

Wraps C++ setter: void Solution::setName(const string&)

Parameters
handleHandle to queried Solution object.
nameUndocumented.

Definition at line 141 of file ctsol.cpp.

◆ sol_thermo()

int32_t sol_thermo ( int32_t  handle)

Accessor for the ThermoPhase pointer.

Wraps C++ getter: shared_ptr<ThermoPhase> Solution::thermo()

Parameters
handleHandle to queried Solution object.
Returns
Handle to stored ThermoPhase object or -1 for exception handling.

Definition at line 152 of file ctsol.cpp.

◆ sol_kinetics()

int32_t sol_kinetics ( int32_t  handle)

Accessor for the Kinetics pointer.

Wraps C++ getter: shared_ptr<Kinetics> Solution::kinetics()

Parameters
handleHandle to queried Solution object.
Returns
Handle to stored Kinetics object or -1 for exception handling.

Definition at line 163 of file ctsol.cpp.

◆ sol_transport()

int32_t sol_transport ( int32_t  handle)

Accessor for the Transport pointer.

Wraps C++ getter: shared_ptr<Transport> Solution::transport()

Parameters
handleHandle to queried Solution object.
Returns
Handle to stored Transport object or -1 for exception handling.

Definition at line 174 of file ctsol.cpp.

◆ sol_transportModel()

int32_t sol_transportModel ( int32_t  handle,
int32_t  bufLen,
char *  buf 
)

Retrieve transport model name.

Wraps C++ getter: string Solution::transportModel()

Parameters
handleHandle to queried Solution object.
[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 185 of file ctsol.cpp.

◆ sol_setTransportModel()

int32_t sol_setTransportModel ( int32_t  handle,
const char *  model 
)

Set the Transport object by name.

Wraps C++ accessor: void Solution::setTransportModel(const string&)

Uses:

  • shared_ptr<Transport> Solution::transport()
Parameters
handleHandle to queried Solution object.
modelname of transport model; if omitted, the default model is used

Definition at line 197 of file ctsol.cpp.

◆ sol_nAdjacent()

int32_t sol_nAdjacent ( int32_t  handle)

Get the number of adjacent phases.

Wraps C++ getter: size_t Solution::nAdjacent()

Parameters
handleHandle to queried Solution object.

Definition at line 213 of file ctsol.cpp.

◆ sol_adjacent()

int32_t sol_adjacent ( int32_t  handle,
int32_t  i 
)

Get the Solution object for an adjacent phase by index.

Wraps C++ accessor: shared_ptr<Solution> Solution::adjacent(size_t)

Uses:

  • size_t Solution::nAdjacent()
  • shared_ptr<ThermoPhase> Solution::thermo()
  • shared_ptr<Kinetics> Solution::kinetics()
  • shared_ptr<Transport> Solution::transport()
Parameters
handleHandle to queried Solution object.
iUndocumented.
Returns
Handle to stored Solution object or -1 for exception handling.

Definition at line 223 of file ctsol.cpp.

◆ sol_adjacentName()

int32_t sol_adjacentName ( int32_t  handle,
int32_t  i,
int32_t  bufLen,
char *  buf 
)

Get the name of an adjacent phase by index.

Wraps C++ method: string Solution::adjacentName(size_t)

Parameters
handleHandle to queried Solution object.
iUndocumented.
[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 247 of file ctsol.cpp.

◆ sol_source()

int32_t sol_source ( int32_t  handle,
int32_t  bufLen,
char *  buf 
)

Retrieve source used for object creation; usually an input file name.

Wraps C++ getter: const string Solution::source()

Parameters
handleHandle to queried Solution object.
[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 259 of file ctsol.cpp.

◆ sol_cabinetSize()

int32_t sol_cabinetSize ( )

Return size of Solution storage.

Wraps C++ reserved CLib function: custom code

Returns
Size or -1 for exception handling.

Definition at line 271 of file ctsol.cpp.