示例#1
0
 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())