Skip to content

Commit

Permalink
changed solver algorithm in ribasim to Rodas5p
Browse files Browse the repository at this point in the history
  • Loading branch information
rleander committed Oct 4, 2024
1 parent 9f31a9c commit debee94
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/fixtures/fixture_ribasim.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import ribasim
import ribasim_testmodels

solver_algorithm: str = 'Rodas5P'

def add_subgrid(model: ribasim.Model) -> ribasim.Model:
"""Add 1:1 subgrid levels to model"""
Expand Down Expand Up @@ -33,29 +34,36 @@ def add_subgrid(model: ribasim.Model) -> ribasim.Model:
def ribasim_bucket_model() -> ribasim.Model:
bucket = ribasim_testmodels.bucket_model()
bucket.endtime = datetime(2023, 1, 1, 0, 0)
bucket.solver.algorithm = solver_algorithm
return add_subgrid(bucket)


@pytest_cases.fixture(scope="function")
def ribasim_bucket_model_no_subgrid() -> ribasim.Model:
bucket = ribasim_testmodels.bucket_model()
bucket.endtime = datetime(2023, 1, 1, 0, 0)
bucket.solver.algorithm = solver_algorithm
return bucket


@pytest_cases.fixture(scope="function")
def ribasim_backwater_model() -> ribasim.Model:
return add_subgrid(ribasim_testmodels.backwater_model())
backwater = ribasim_testmodels.backwater_model()
backwater.solver.algorithm = solver_algorithm
return add_subgrid(backwater)


@pytest_cases.fixture(scope="function")
def ribasim_two_basin_model() -> ribasim.Model:
return ribasim_testmodels.two_basin_model()
twobasin = ribasim_testmodels.two_basin_model()
twobasin.solver.algorithm = solver_algorithm
return twobasin


@pytest_cases.fixture(scope="function")
def ribasim_two_basin_model_dbg() -> ribasim.Model:
model = ribasim_testmodels.two_basin_model()
# model.logging.verbosity = ribasim.Verbosity("debug")
# model.logging.verbosity = "debug"
model.solver.algorithm = solver_algorithm
return model

0 comments on commit debee94

Please sign in to comment.