Skip to content
Snippets Groups Projects
Commit 83e87342 authored by Martin Bauer's avatar Martin Bauer Committed by Martin Bauer
Browse files

lbmpy: various small improvements

- getShearRelaxationRate is a free function now -> works also with cumulant methods
- better error message when calling kernels with wrong or too few parameters
- entropic & incompressible is not working by default due to pdf shift -> added NotImplemented exception
- new creation function for 'raw_mrt' where all relaxation rates can be independently specified
- enhanced entropic creation funtion, supports omega output field now
parent dbbfba4a
No related merge requests found
......@@ -400,7 +400,11 @@ def buildCTypeArgumentList(parameterSpecification, argumentDict):
arrayShapes = set()
for arg in parameterSpecification:
if arg.isFieldArgument:
field = argumentDict[arg.fieldName]
try:
field = argumentDict[arg.fieldName]
except KeyError:
raise KeyError("Missing field parameter for kernel call " + arg.fieldName)
symbolicField = arg.field
if arg.isFieldPtrArgument:
ctArguments.append(field.ctypes.data_as(ctypeFromString(arg.dtype)))
......@@ -429,7 +433,10 @@ def buildCTypeArgumentList(parameterSpecification, argumentDict):
else:
assert False
else:
param = argumentDict[arg.name]
try:
param = argumentDict[arg.name]
except KeyError:
raise KeyError("Missing parameter for kernel call " + arg.name)
expectedType = ctypeFromString(arg.dtype)
ctArguments.append(expectedType(param))
......
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