def test_basics(self): grid = EclGrid.createRectangular((17, 13, 11), (1, 1, 1)) fc = FieldConfig('PORO', grid) print(fc) print(str(fc)) print(repr(fc)) pfx = 'FieldConfig(type' rep = repr(fc) self.assertEqual(pfx, rep[:len(pfx)]) fc_xyz = fc.get_nx(), fc.get_ny(), fc.get_nz() ex_xyz = 17, 13, 11 self.assertEqual(ex_xyz, fc_xyz) self.assertEqual(0, fc.get_truncation_mode()) self.assertEqual(ex_xyz, (grid.getNX(), grid.getNY(), grid.getNZ()))
def test_basics(self): nx = 17 ny = 13 nz = 11 actnum = [1] * nx * ny * nz actnum[0] = 0 grid = EclGridGenerator.create_rectangular((nx, ny, nz), (1, 1, 1), actnum) fc = FieldConfig("PORO", grid) pfx = "FieldConfig(type" rep = repr(fc) self.assertEqual(pfx, rep[: len(pfx)]) fc_xyz = fc.get_nx(), fc.get_ny(), fc.get_nz() ex_xyz = nx, ny, nz self.assertEqual(ex_xyz, fc_xyz) self.assertEqual(0, fc.get_truncation_mode()) self.assertEqual(ex_xyz, (grid.getNX(), grid.getNY(), grid.getNZ())) self.assertEqual(fc.get_data_size(), grid.get_num_active())