def test_add_boundary_raise(self): h = Hgrid(self.nodes, self.elements) h.add_boundary_type('ibtype') indexes = ['10000'] self.assertRaises( AssertionError, h.set_boundary_data, 'ibtype', 0, indexes, )
def test_add_boundary_custom_raise(self): h = Hgrid(self.nodes, self.elements) h.add_boundary_type('ibtype') indexes = [('2', '7'), ('3', '10000'), ('4', '9')] props = {'flow': [1, 2, 3]} self.assertRaises( AssertionError, h.set_boundary_data, 'ibtype', 0, indexes, **props )
def test_add_boundary(self): h = Hgrid(self.nodes, self.elements) h.add_boundary_type('ibtype') indexes = ['1'] h.set_boundary_data('ibtype', 0, indexes)
def test_add_custom_boundary_custom(self): h = Hgrid(self.nodes, self.elements) h.add_boundary_type('ibtype') indexes = [('2', '7'), ('3', '8'), ('4', '9')] props = {'flow': [1, 2, 3]} h.set_boundary_data('ibtype', 0, indexes, properties=props)