def test_anti_symmetric_in_y(self): """ cells in antisymmetric arrangement should return correct values """ layout = """ 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1""" anti_map_y = mat_map(lib=self.lib, layout=layout, layout_dict=self.mat_dict, x_max=10, n=20) mesh = Mesh(20, 10, anti_map_y) for cell in mesh.cells(): if cell.index()[0] < 10: eq_(cell.get('id'), 'test_mat') else: eq_(cell.get('id'), 'test_mat2')
def test_mesh_cells_size(self): mesh_cells = 4 domain_upper = 10 mesh = Mesh(mesh_cells, domain_upper, self.testmap) eq_(len(mesh.cells()), mesh_cells**2)