mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
[Input] Fix validation handling with minimal Python module
This commit is contained in:
parent
518b74d5fe
commit
781f7d74a2
@ -2238,7 +2238,7 @@ def main(argv):
|
|||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import cantera as ct
|
from cantera import Solution, Interface
|
||||||
except ImportError:
|
except ImportError:
|
||||||
logger.warning('WARNING: Unable to import Cantera Python module. '
|
logger.warning('WARNING: Unable to import Cantera Python module. '
|
||||||
'Output mechanism has not been validated')
|
'Output mechanism has not been validated')
|
||||||
@ -2246,9 +2246,9 @@ def main(argv):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
logger.info('Validating mechanism...')
|
logger.info('Validating mechanism...')
|
||||||
gas = ct.Solution(out_name)
|
gas = Solution(out_name)
|
||||||
for surf_name in surfaces:
|
for surf_name in surfaces:
|
||||||
phase = ct.Interface(out_name, surf_name, [gas])
|
phase = Interface(out_name, surf_name, [gas])
|
||||||
logger.info('PASSED')
|
logger.info('PASSED')
|
||||||
except RuntimeError as e:
|
except RuntimeError as e:
|
||||||
logger.info('FAILED')
|
logger.info('FAILED')
|
||||||
|
@ -1771,7 +1771,7 @@ def main():
|
|||||||
|
|
||||||
# Do full validation by importing the resulting mechanism
|
# Do full validation by importing the resulting mechanism
|
||||||
try:
|
try:
|
||||||
import cantera as ct
|
from cantera import Solution, Interface
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print("WARNING: Unable to import Cantera Python module. "
|
print("WARNING: Unable to import Cantera Python module. "
|
||||||
"Output mechanism has not been validated")
|
"Output mechanism has not been validated")
|
||||||
@ -1779,9 +1779,9 @@ def main():
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
print("Validating mechanism...")
|
print("Validating mechanism...")
|
||||||
gas = ct.Solution(output_name)
|
gas = Solution(output_name)
|
||||||
for surf_name in surfaces:
|
for surf_name in surfaces:
|
||||||
phase = ct.Interface(output_name, surf_name)
|
phase = Interface(output_name, surf_name)
|
||||||
print("PASSED")
|
print("PASSED")
|
||||||
except RuntimeError as e:
|
except RuntimeError as e:
|
||||||
print("FAILED")
|
print("FAILED")
|
||||||
|
Loading…
Reference in New Issue
Block a user