(self)
| 2910 | r.component_index("fail") |
| 2911 | |
| 2912 | def test_misc(self): |
| 2913 | class DummyReactor(ct.ExtensibleReactor): |
| 2914 | def __init__(self, gas): |
| 2915 | super().__init__(gas) |
| 2916 | self.sync_calls = 0 |
| 2917 | |
| 2918 | def after_species_index(self, name): |
| 2919 | # This will cause returned species indices to be higher by 5 than they |
| 2920 | # would be otherwise |
| 2921 | return 5 |
| 2922 | |
| 2923 | def before_sync_state(self): |
| 2924 | self.sync_calls += 1 |
| 2925 | |
| 2926 | r = DummyReactor(self.gas) |
| 2927 | net = ct.ReactorNet([r]) |
| 2928 | assert r.component_index("H2") == 5 + 3 + self.gas.species_index("H2") |
| 2929 | r.syncState() |
| 2930 | net.advance(1) |
| 2931 | r.syncState() |
| 2932 | assert r.sync_calls == 2 |
| 2933 | |
| 2934 | def test_RHS_LHS(self): |
| 2935 | # set initial state |
nothing calls this directly
no test coverage detected