Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(vtk): change in export_model when packages_names is None (#770)
model packages extraction change from ml.packageslist to model.packageslist
- Loading branch information
1 parent
ec71e6c
commit 73f7051
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
""" | ||
Test vtk export_model function without packages_names definition | ||
""" | ||
|
||
import os | ||
import flopy | ||
from flopy.export import vtk | ||
|
||
mf_exe_name = 'mf6' | ||
|
||
def test_vtk_export_model_without_packages_names(): | ||
|
||
ws = os.path.join('.', 'temp', 't069') | ||
name = 'mymodel' | ||
sim = flopy.mf6.MFSimulation(sim_name=name, sim_ws=ws, exe_name='mf6') | ||
tdis = flopy.mf6.ModflowTdis(sim) | ||
ims = flopy.mf6.ModflowIms(sim) | ||
gwf = flopy.mf6.ModflowGwf(sim, modelname=name, save_flows=True) | ||
dis = flopy.mf6.ModflowGwfdis(gwf, nrow=10, ncol=10) | ||
ic = flopy.mf6.ModflowGwfic(gwf) | ||
npf = flopy.mf6.ModflowGwfnpf(gwf, save_specific_discharge=True) | ||
chd = flopy.mf6.ModflowGwfchd(gwf, stress_period_data=[[(0, 0, 0), 1.], | ||
[(0, 9, 9), 0.]]) | ||
|
||
# Export model without specifying packages_names parameter | ||
vtk.export_model(sim.get_model(), ws) | ||
|
||
# If the function executes without error then test was successful | ||
assert True | ||
|
||
if __name__ == '__main__': | ||
test_vtk_export_model_without_packages_names() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters