diff --git a/boundaries/boundaryhandling.py b/boundaries/boundaryhandling.py index 4f7edcaabf950fe3e72babec3e0c4bfc2278de7c..3f68a725c7edd45d5b89a4f058e3e7796dc30c57 100644 --- a/boundaries/boundaryhandling.py +++ b/boundaries/boundaryhandling.py @@ -164,7 +164,7 @@ def generateBoundaryHandling(pdfField, indexArr, lbMethod, boundaryFunctor): cellLoopBody.append(be) functionBody = Block([cellLoop]) - ast = KernelFunction(functionBody, [pdfField, indexField]) + ast = KernelFunction(functionBody, [indexField] + list(fieldsAccessed)) if len(additionalNodes) > 0: loops = ast.atoms(LoopOverCoordinate) diff --git a/plot2d.py b/plot2d.py index b1bb364721d143a77814256105d9cabdf847db2f..0023377f7eb609bd16f59d3fc6bec5940d615227 100644 --- a/plot2d.py +++ b/plot2d.py @@ -1,12 +1,7 @@ from matplotlib.pyplot import * -def removeGhostLayers(field): - return field[1:-1, 1:-1] - - def vectorField(field, step=2, **kwargs): - field = removeGhostLayers(field) veln = field.swapaxes(0, 1) quiver(veln[::step, ::step, 0], veln[::step, ::step, 1], **kwargs) @@ -19,7 +14,6 @@ def vectorFieldMagnitude(field, **kwargs): def scalarField(field, **kwargs): import numpy as np - field = removeGhostLayers(field) field = np.swapaxes(field, 0, 1) return imshow(field, origin='lower', **kwargs) diff --git a/updatekernels.py b/updatekernels.py index d27ed4f6ad0f4bad8632a90c0cff90ad5ee49910..08a282478e412cc0e1402846bb71449b5ec56bcf 100644 --- a/updatekernels.py +++ b/updatekernels.py @@ -75,7 +75,7 @@ def createStreamPullKernel(collisionRule, numpyField=None, srcFieldName="src", d def createPdfArray(size, numDirections, ghostLayers=1, layout='fzyx'): """ - Creates an empy numpy array for a pdf field with the specified memory layout. + Creates an empty numpy array for a pdf field with the specified memory layout. Examples: >>> createPdfArray((3, 4, 5), 9, layout='zyxf', ghostLayers=0).shape