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

Method test_max_steps

test/python/test_reactor.py:1865–1877  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1863 assert fail.rate.count > 0
1864
1865 def test_max_steps(self):
1866 surf, gas = self.import_phases()
1867 gas.TPX = 1500, 4000, 'NH3:1.0, SiF4:0.4'
1868 surf.TP = gas.TP
1869 r, rsurf, sim = self.make_reactors(gas, surf)
1870
1871 sim.max_steps = 13
1872 assert sim.max_steps == 13
1873
1874 with pytest.raises(ct.CanteraError, match="Maximum number of timesteps"):
1875 sim.advance(0.1)
1876
1877 assert sim.solver_stats['steps'] == 13
1878
1879 def test_independent_variable(self):
1880 surf, gas = self.import_phases()

Callers

nothing calls this directly

Calls 3

import_phasesMethod · 0.95
make_reactorsMethod · 0.95
advanceMethod · 0.80

Tested by

no test coverage detected