Skip to content

Commit

Permalink
[Python] Add ThermoPhase._native_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl authored and speth committed Apr 9, 2023
1 parent 124048f commit 9b87264
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions interfaces/cython/cantera/thermo.pxd
Expand Up @@ -46,6 +46,7 @@ cdef extern from "cantera/thermo/ThermoPhase.h" namespace "Cantera":
cbool hasPhaseTransition()
cbool isPure()
cbool isCompressible()
string nativeMode()
stdmap[string, size_t] nativeState() except +translate_exception
vector[string] fullStates()
vector[string] partialStates()
Expand Down
5 changes: 5 additions & 0 deletions interfaces/cython/cantera/thermo.pyx
Expand Up @@ -331,6 +331,11 @@ cdef class ThermoPhase(_SolutionBase):
def __get__(self):
return self.thermo.isCompressible()

@property
def _native_mode(self):
""" Return string acronym representing native state """
return pystr(self.thermo.nativeMode())

property _native_state:
"""
Default properties defining a state
Expand Down

0 comments on commit 9b87264

Please sign in to comment.