[Cython] Added the "import_phases" convenience function
This commit is contained in:
parent
a60e10c3de
commit
34a1304297
2 changed files with 10 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
from ._cantera import *
|
||||
from ._cantera import __version__, _have_sundials
|
||||
from .liquidvapor import *
|
||||
from .utils import *
|
||||
|
||||
import os as _os
|
||||
add_directory(_os.path.join(_os.path.dirname(__file__), 'data'))
|
||||
|
|
|
|||
9
interfaces/cython/cantera/utils.py
Normal file
9
interfaces/cython/cantera/utils.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
from . import Solution
|
||||
|
||||
|
||||
def import_phases(filename, phase_names):
|
||||
"""
|
||||
Import multiple phases from one file. The phase names should be
|
||||
entered as a list of strings.
|
||||
"""
|
||||
return [Solution(filename, p) for p in phase_names]
|
||||
Loading…
Add table
Reference in a new issue