Skip to content

Commit

Permalink
Add convenient properties: nInj, nProd
Browse files Browse the repository at this point in the history
  • Loading branch information
patnr committed Sep 22, 2023
1 parent d02f116 commit 34323da
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions TPFA_ResSim/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 34323da

Please sign in to comment.