Skip to content

Commit

Permalink
avoid defining name for mup3d class
Browse files Browse the repository at this point in the history
  • Loading branch information
p-ortega committed Nov 29, 2024
1 parent 76bb212 commit 1bbd119
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/mf6rtm/mup3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,16 @@ def set_packtype(self, packtype):


class Mup3d(object):
def __init__(self, name, solutions, nlay, nrow, ncol):
def __init__(self, name=None, solutions=None, nlay=None, nrow=None, ncol=None):
if solutions is None and isinstance(name, Solutions):
# New style: first argument is solutions
solutions = name
name = None
# Validate required parameters
if solutions is None:
raise ValueError("solutions parameter is required")
if any(param is None for param in [nlay, nrow, ncol]):
raise ValueError("nlay, nrow, and ncol parameters are required")
self.name = name
self.wd = None
self.charge_offset = 0.0
Expand Down

0 comments on commit 1bbd119

Please sign in to comment.