Example #1
0
class test_BoundaryEdgeCells(unittest.TestCase):
    def setUp(self):
        self.mesh = InscribedTet().get_dolfin_mesh()
        self.DUT = Geometry.BoundaryEdgeCells(self.mesh)

    def test_mark(self):
        mark_value = 3
        desired_edgecells = np.ones(self.mesh.num_cells())*mark_value
        # All except last tet are edge-connected to the boundary for
        # the inscribed tet mesh
        desired_edgecells[-1] = 0
        cell_fn = dolfin.CellFunction('uint', self.mesh)
        self.DUT.mark(cell_fn, mark_value)
        self.assertTrue(np.all(cell_fn.array() == desired_edgecells))
Example #2
0
class test_BoundaryEdgeCells(unittest.TestCase):
    def setUp(self):
        self.mesh = InscribedTet().get_dolfin_mesh()
        self.DUT = Geometry.BoundaryEdgeCells(self.mesh)

    def test_mark(self):
        mark_value = 3
        desired_edgecells = np.ones(self.mesh.num_cells()) * mark_value
        # All except last tet are edge-connected to the boundary for
        # the inscribed tet mesh
        desired_edgecells[-1] = 0
        cell_fn = dolfin.CellFunction('uint', self.mesh)
        self.DUT.mark(cell_fn, mark_value)
        self.assertTrue(np.all(cell_fn.array() == desired_edgecells))
Example #3
0
 def setUp(self):
     self.mesh = InscribedTet().get_dolfin_mesh()
     self.DUT = Geometry.BoundaryEdgeCells(self.mesh)
Example #4
0
 def setUp(self):
     self.mesh = InscribedTet().get_dolfin_mesh()
     self.DUT = Geometry.BoundaryEdgeCells(self.mesh)