11from os import PathLike
2- from pathlib import Path
32from warnings import warn
43
54from flopy .discretization .modeltime import ModelTime
65from modflow_devtools .misc import cd , run_cmd
76from xattree import xattree
87
9- from flopy4 .mf6 .component import Component
8+ from flopy4 .mf6 .context import Context
109from flopy4 .mf6 .exchange import Exchange
1110from flopy4 .mf6 .model import Model
1211from flopy4 .mf6 .solution import Solution
@@ -23,13 +22,12 @@ def convert_time(value):
2322
2423
2524@xattree
26- class Simulation (Component ):
25+ class Simulation (Context ):
2726 models : dict [str , Model ] = field ()
2827 exchanges : dict [str , Exchange ] = field ()
2928 solutions : dict [str , Solution ] = field ()
3029 tdis : Tdis = field (converter = convert_time )
31- workspace : Path = field (default = None )
32- filename : str = field (default = "mfsim.nam" )
30+ filename : str = field (default = "mfsim.nam" , init = False )
3331
3432 def __attrs_post_init__ (self ):
3533 super ().__attrs_post_init__ ()
@@ -40,13 +38,6 @@ def __attrs_post_init__(self):
4038 )
4139 self .filename = "mfsim.nam"
4240
43- @property
44- def path (self ) -> Path :
45- """Return the path to the simulation namefile."""
46- if self .workspace is None :
47- raise ValueError ("Simulation has no workspace path." )
48- return Path (self .workspace ).expanduser ().resolve () / self .filename
49-
5041 @property
5142 def time (self ) -> ModelTime :
5243 """Return the simulation time discretization."""
0 commit comments