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

Method test_component_index

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

Source from the content-addressed store, hash-verified

1363 assert self.surf1.name == "name-of-reactor-surface"
1364
1365 def test_component_index(self):
1366 self.create_reactors(add_surf=True)
1367 for (gas,net,iface,r) in ((self.gas1, self.net1, self.interface1, self.r1),
1368 (self.gas2, self.net2, self.interface2, self.r2)):
1369 net.step()
1370
1371 N0 = net.n_vars - gas.n_species - iface.n_species
1372 N1 = net.n_vars - iface.n_species
1373 for i, name in enumerate(gas.species_names):
1374 assert i + N0 == r.component_index(name)
1375 for i, name in enumerate(iface.species_names):
1376 assert i + N1 == r.component_index(name)
1377
1378 def test_component_names(self):
1379 self.create_reactors(add_surf=True)

Callers

nothing calls this directly

Calls 2

create_reactorsMethod · 0.95
stepMethod · 0.45

Tested by

no test coverage detected