Esempio n. 1
0
    def runTest(self):
        import docs.examples.ex44 as ex  # noqa

        stepper = ex.evolve(0., ex.U)
        for itr in range(10):
            t, u = next(stepper)
            self.assertAlmostEqual(np.sum(u), 11.34, 2)
    def runTest(self):
        import docs.examples.ex39 as ex  # noqa

        t, u = next(ex.evolve(0.0, ex.u_init))
        self.assertAlmostEqual(*[(ex.probe @ s)[0] for s in [ex.exact(t), u]],
                               5)