def __cell_ref(self, cell_ptr): if self.is_RFT(): return EclRFTCell.createCReference(cell_ptr, self) elif self.is_PLT(): return EclPLTCell.createCReference(cell_ptr, self) else: raise NotImplementedError("Only RFT and PLT cells are implemented")
def __cell_ref( self , cell_ptr ): if self.is_RFT(): return EclRFTCell.createCReference( cell_ptr , self ) elif self.is_PLT(): return EclPLTCell.createCReference( cell_ptr , self ) else: raise NotImplementedError("Only RFT and PLT cells are implemented")
def test_RFT_cell(self): i = 10 j = 8 k = 100 depth = 100 pressure = 65 swat = 0.56 sgas = 0.10 cell = EclRFTCell(i, j, k, depth, pressure, swat, sgas) self.assertEqual(i, cell.get_i()) self.assertEqual(j, cell.get_j()) self.assertEqual(k, cell.get_k()) self.assertFloatEqual(pressure, cell.pressure) self.assertFloatEqual(depth, cell.depth) self.assertFloatEqual(swat, cell.swat) self.assertFloatEqual(sgas, cell.sgas) self.assertFloatEqual(1 - (sgas + swat), cell.soil)