[Richards] Read YML correctly in ODE test

parent 8dbbb81b
......@@ -36,11 +36,12 @@ def evaluate(iniinfo,runtime):
if mapping_file in ["None", "none", ""]:
medium_index = int(mapping_dataset)
param = get_parameter_data(medium_index, volumes=param_data["volumes"])
if param["type"] != "MvG":
param_type = param["water_flow"]["type"]
if param_type != "MvG":
raise NotImplementedError("This testing function only supports "
"Mualem van Genuchten parameterizations. "
"Parameterization was: {}".format(
param["type"]))
param_type))
parfun = lambda y: param["parameters"]
......@@ -58,11 +59,12 @@ def evaluate(iniinfo,runtime):
cell = math.floor(y * mapping.shape[0] / extensions[-1])
index = mapping[cell, ...].flatten()
param = get_parameter_data(index, volumes=param_data["volumes"])
if param["type"] != "MvG":
param_type = param["water_flow"]["type"]
if param_type != "MvG":
raise NotImplementedError("This testing function only supports "
"Mualem van Genuchten parameterizations. "
"Parameterization was: {}".format(
param["type"]))
param_type))
return param["parameters"]
print("Operating on file: {}".format(vtk_file))
......
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