[Cython] Added Sphinx docs for composite classes & importing

This commit is contained in:
Ray Speth 2012-12-26 23:56:24 +00:00
parent 8e355464de
commit f53ad9b47b
4 changed files with 47 additions and 3 deletions

View file

@ -0,0 +1,18 @@
.. py:currentmodule:: cantera
Importing Phase Objects
=======================
These classes are composite representations of a substance which has
thermodynamic, chemical kinetic, and (optionally) transport properties.
.. autoclass:: Solution
.. autoclass:: Interface
.. autoclass:: DustyGas
Utility Functions
-----------------
.. autofunction:: addDirectory

View file

@ -6,6 +6,7 @@ Contents:
.. toctree::
:maxdepth: 2
importing
thermo
kinetics
transport

View file

@ -1,8 +1,32 @@
class Solution(ThermoPhase, Kinetics, Transport):
pass
"""
A class for chemically-reacting solutions.
Instances can be created to represent any type of solution -- a
mixture of gases, a liquid solution, or a solid solution, for
example.
Class Solution derives from classes `ThermoPhase`, `Kinetics`, and
`Transport`. It defines very few methods of its own, and is provided so
that a single object can be used to compute thermodynamic, kinetic, and
transport properties of a solution.
"""
class Interface(InterfacePhase, InterfaceKinetics):
pass
"""
Two-dimensional interfaces.
Instances of class Interface represent reacting 2D interfaces
between bulk 3D phases. Class Interface defines no methods of its
own. All of its methods derive from either `InterfacePhase` or
`InterfaceKinetics`.
"""
class DustyGas(ThermoPhase, Kinetics, DustyGasTransport):
pass
"""
A composite class which models a gas in a stationary, solid, porous medium.
The only transport properties computed are the multicomponent diffusion
coefficients. The model does not compute viscosity or thermal conductivity.
"""

View file

@ -17,6 +17,7 @@ cdef pystr(string x):
return s.decode()
def addDirectory(directory):
""" Add a directory to search for Cantera data files. """
CxxAddDirectory(stringify(directory))
def _have_sundials():