Commit 569f8b13 authored by Lukas Riedel's avatar Lukas Riedel

Correct adaptation of ODE evaluation script to new config parameters

parent 2b825cb0
......@@ -25,10 +25,11 @@ def evaluate(iniinfo,runtime):
# get parameter data
param_data = read_yml(iniinfo["richards.parameters.file"])
mapping_file = iniinfo["grid.mapping.file"]
mapping_dataset = iniinfo["grid.mapping.volume"]
# homogeneous setting
if mapping_file in ["None", "none", ""]:
medium_index = int(iniinfo["grid.globalIndex"])
medium_index = int(mapping_dataset)
param = get_parameter_data(medium_index, volumes=param_data["volumes"])
if param["type"] != "MvG":
raise NotImplementedError("This testing function only supports "
......@@ -39,9 +40,7 @@ def evaluate(iniinfo,runtime):
parfun = lambda y: param["parameters"]
# 1D heterogeneity
else:
mapping_dataset = iniinfo["grid.mapping.volume"]
mapping = read_h5_dataset(mapping_file, mapping_dataset)
# check mapping shape
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment