Example #1
0
 def test_grid_perturbation_1d_internal_nodes_fixed(self):
     g = TensorGrid(np.arange(4))
     h = refinement.distort_grid_1d(g, fixed_nodes=[1])
     self.assertTrue(
         np.allclose(g.nodes[:, [0, 1, 3]], h.nodes[:, [0, 1, 3]]))
Example #2
0
 def test_grid_perturbation_1d_bound_nodes_fixed(self):
     g = TensorGrid(np.array([0, 1, 2]))
     h = refinement.distort_grid_1d(g)
     self.assertTrue(np.allclose(g.nodes[:, [0, 2]], h.nodes[:, [0, 2]]))