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

Method test_iteration_limits

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

Source from the content-addressed store, hash-verified

1933 assert tight_rtol['steps'] > baseline['steps']
1934
1935 def test_iteration_limits(self):
1936 surf, gas = self.import_phases()
1937 gas.TPX = 1700, 4000, 'NH3:1.0, SiF4:0.4'
1938 surf.TP = gas.TP
1939
1940 r, rsurf, sim = self.make_reactors(gas, surf)
1941
1942 # Too restrictive limits should cause integration errors:
1943 sim.advance(0.1)
1944 sim.max_nonlinear_iterations = 1
1945 sim.max_nonlinear_convergence_failures = 1
1946 sim.include_algebraic_in_error_test = True
1947 sim.max_err_test_fails = 2
1948 sim.rtol = 1e-12
1949 with pytest.raises(ct.CanteraError, match="corrector convergence"):
1950 sim.advance(0.2)
1951
1952 def test_solver_order(self):
1953 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