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

Method test_integrateWithAdvance

test/python/test_reactor.py:2535–2550  ·  view source on GitHub ↗
(self, request, test_data_path, setup_combustor_tests)

Source from the content-addressed store, hash-verified

2533 assert not bad, bad
2534
2535 def test_integrateWithAdvance(self, request, test_data_path, setup_combustor_tests):
2536 sim = setup_combustor_tests['sim']
2537 combustor = setup_combustor_tests['combustor']
2538
2539 data = []
2540 for t in np.linspace(0, 0.25, 101)[1:]:
2541 sim.advance(t)
2542 data.append([t, combustor.T] + list(combustor.thermo.X))
2543
2544 saveReference = request.config.getoption("--save-reference")
2545 if saveReference == 'combustor':
2546 np.savetxt(self.referenceFile, np.array(data), '%11.6e', ', ')
2547 else:
2548 bad = compareProfiles(test_data_path / self.referenceFile, data,
2549 rtol=1e-6, atol=1e-12)
2550 assert not bad, bad
2551
2552 def test_invasive_mdot_function(self, test_data_path, setup_combustor_tests):
2553 igniter = setup_combustor_tests['igniter']

Callers

nothing calls this directly

Calls 3

compareProfilesFunction · 0.85
advanceMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected