MCPcopy Create free account
hub / github.com/NanoComp/meep / test_time

Method test_time

python/tests/test_simulation.py:831–840  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

829 self.assertAlmostEqual(pt2, expected)
830
831 def test_time(self):
832 sim = self.init_simple_simulation()
833
834 num_timesteps = 212
835 sim.init_sim()
836 end_t = sim.fields.dt * num_timesteps
837 sim.run(until=end_t)
838
839 self.assertAlmostEqual(sim.meep_time(), end_t)
840 self.assertEqual(sim.timestep(), num_timesteps)
841
842
843if __name__ == "__main__":

Callers

nothing calls this directly

Calls 5

meep_timeMethod · 0.80
timestepMethod · 0.80
init_simMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected