示例#1
0
 def test_sj3d(self):
     """
     """
     model = models.ReducedSetHindmarshRose()
     history_shape = (1, model._nvar, 1, model.number_of_modes)
     model_ic = model.initial(dt, history_shape)
     self.assertEqual(model._nvar, 6)
     self.assertEqual(model.number_of_modes, 3)
示例#2
0
 def test_sj3d(self):
     """
     """
     model = models.ReducedSetHindmarshRose()
     self._validate_initialization(model, 6, 3)
     fp = numpy.array([
         [-2.154452, -1.387575, -2.018075],
         [-24.581927, -18.522624, -21.449834],
         [5.094243, 5.094284, 5.161934],
         [-2.145466, -1.405172, -2.000391],
         [-24.353387, -19.002245, -21.028078],
         [5.119597, 5.096642, 5.199867],
     ])
     self._test_steady_state(model, fp)
 def test_sj3d(self):
     """
     """
     model = models.ReducedSetHindmarshRose()
     history_shape = (1, model._nvar, 1, model.number_of_modes)
     model_ic = model.initial(dt, history_shape)
     self.assertEqual(model._nvar, 6)
     self.assertEqual(model.number_of_modes, 3)
     self.assertTrue(ArrayAlmostEqual(model_ic, numpy.array([[[[ 0.81113082, 0.22578466, 1.05767095]],
                                              [[ 3.39866927, -1.59312788, -1.59319147]],
                                              [[ 8.57884373, 7.25321566, 6.76664846]],
                                              [[ 0.88599684, 0.75675792, 0.7605335 ]],
                                              [[ 0.88352129, 6.98631166, 6.29850938]],
                                              [[ 6.91821169, 7.65394629, 6.51316375]]]])) is None)
示例#4
0
 def test_sj3d(self):
     """
     """
     model = models.ReducedSetHindmarshRose()
     history_shape = (1, model._nvar, 1, model.number_of_modes)
     model_ic = model.initial(dt, history_shape)
     self.assertEqual(model._nvar, 6)
     self.assertEqual(model.number_of_modes, 3)
     assert_array_almost_equal(
         model_ic,
         numpy.array([[[[-0.02763104, 0.14269546, 0.0534609]],
                       [[-2.56553276, -2.16156801, -2.37320634]],
                       [[5.97236896, 6.14269546, 6.0534609]],
                       [[-0.02763104, 0.14269546, 0.0534609]],
                       [[-0.06178488, 0.31907674, 0.1195422]],
                       [[5.97236896, 6.14269546, 6.0534609]]]]))
示例#5
0
 def test_sj3d(self):
     """
     """
     model = models.ReducedSetHindmarshRose()
     self._validate_initialization(model, 6, 3)