From 34323dabacae85ee04aaebc88a508d092536e1e5 Mon Sep 17 00:00:00 2001 From: patnr Date: Fri, 22 Sep 2023 13:28:17 +0200 Subject: [PATCH] Add convenient properties: nInj, nProd --- TPFA_ResSim/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/TPFA_ResSim/__init__.py b/TPFA_ResSim/__init__.py index 2a46a48..f246ec7 100644 --- a/TPFA_ResSim/__init__.py +++ b/TPFA_ResSim/__init__.py @@ -86,6 +86,11 @@ def __setattr__(self, key, val): por: np.ndarray = None """Porosity; Array of shape `(Nx, Ny)`).""" + nInj = property(lambda self: len(self.inj_xy)) + """Num. of injector wells.""" + nProd = property(lambda self: len(self.prod_xy)) + """Num. of producer wells.""" + inj_xy: np.ndarray = None """Array of shape `(nWell, 2)` of x- and y-coords for `nWell` injectors.