MCPcopy Create free account
hub / github.com/Cantera/cantera / convert

Method convert

test/python/test_convert.py:19–38  ·  view source on GitHub ↗
(self, inputFile, thermo=None, transport=None,
                surface=None, output=None, quiet=True, extra=None, **kwargs)

Source from the content-addressed store, hash-verified

17 self.test_data_path = test_data_path
18
19 def convert(self, inputFile, thermo=None, transport=None,
20 surface=None, output=None, quiet=True, extra=None, **kwargs):
21 if output is None:
22 output = Path(inputFile or thermo).stem # strip '.inp'
23 if inputFile is not None:
24 inputFile = self.test_data_path / inputFile
25 if thermo is not None:
26 thermo = self.test_data_path / thermo
27 if transport is not None:
28 transport = self.test_data_path / transport
29 if surface is not None:
30 surface = self.test_data_path / surface
31 if extra is not None:
32 extra = self.test_data_path / extra
33 output = self.test_work_path / (output + "-from-ck.yaml")
34 output.unlink(missing_ok=True)
35 ck2yaml.convert(inputFile, thermo_file=thermo,
36 transport_file=transport, surface_file=surface, out_name=output,
37 extra_file=extra, quiet=quiet, **kwargs)
38 return output
39
40 def checkConversion(self, refFile, testFile):
41 ref = ct.Solution(refFile)

Callers 15

test_gri30Method · 0.95
test_sootMethod · 0.95
test_pdepMethod · 0.95
test_species_onlyMethod · 0.95
test_missing_thermoMethod · 0.95
test_duplicate_thermoMethod · 0.95
test_bad_nasa7_floatMethod · 0.95

Calls 1

PathClass · 0.85

Tested by

no test coverage detected