diff --git a/devito/petsc/clusters.py b/devito/petsc/clusters.py index 7208193dc2..bfec3dc52a 100644 --- a/devito/petsc/clusters.py +++ b/devito/petsc/clusters.py @@ -22,7 +22,7 @@ def petsc_lift(clusters): @timed_pass() def petsc_project(clusters): """ - Drop time-loop for expressions which appear in PETSc callback functions. + Drop time loop for clusters which appear in PETSc callback functions. """ processed = [] for c in clusters: diff --git a/devito/petsc/iet/routines.py b/devito/petsc/iet/routines.py index 9b1ebe6834..dd9592ec48 100644 --- a/devito/petsc/iet/routines.py +++ b/devito/petsc/iet/routines.py @@ -12,7 +12,7 @@ from devito.petsc.types import PETScArray from devito.petsc.iet.nodes import (PETScCallable, FormFunctionCallback, MatVecCallback) -from devito.petsc.iet.utils import petsc_call, petsc_struct, remove_CallbackExpr +from devito.petsc.iet.utils import petsc_call, petsc_struct, drop_callbackexpr from devito.ir.support import SymbolRegistry @@ -86,7 +86,7 @@ def make_matvec(self, injectsolve, objs, solver_objs): def create_matvec_body(self, injectsolve, body, solver_objs, objs): linsolveexpr = injectsolve.expr.rhs - body = remove_CallbackExpr(body) + body = drop_callbackexpr(body) dmda = objs['da_so_%s' % linsolveexpr.target.space_order] @@ -213,7 +213,7 @@ def make_formfunc(self, injectsolve, objs, solver_objs): def create_formfunc_body(self, injectsolve, body, solver_objs, objs): linsolveexpr = injectsolve.expr.rhs - body = remove_CallbackExpr(body) + body = drop_callbackexpr(body) dmda = objs['da_so_%s' % linsolveexpr.target.space_order] @@ -332,7 +332,7 @@ def make_formrhs(self, injectsolve, objs, solver_objs): def create_formrhs_body(self, injectsolve, body, solver_objs, objs): linsolveexpr = injectsolve.expr.rhs - body = remove_CallbackExpr(body) + body = drop_callbackexpr(body) dmda = objs['da_so_%s' % linsolveexpr.target.space_order] diff --git a/devito/petsc/iet/utils.py b/devito/petsc/iet/utils.py index ed69fbfec4..576a71fd8f 100644 --- a/devito/petsc/iet/utils.py +++ b/devito/petsc/iet/utils.py @@ -35,7 +35,7 @@ def spatial_iteration_loops(iet): petsc_iet_mapper = {OpInjectSolve: InjectSolveDummy} -def remove_CallbackExpr(body): +def drop_callbackexpr(body): from devito.petsc.types import CallbackExpr nodes = FindNodes(Expression).visit(body) mapper = { @@ -61,12 +61,12 @@ def assign_time_iters(iet, struct): if not time_iters: return iet - dimension_mapper = {} + mapper = {} for iter in time_iters: common_dimensions = [dim for dim in iter.dimensions if dim in struct.fields] common_dimensions = [DummyExpr(FieldFromComposite(dim, struct), dim) for dim in common_dimensions] iter_new = iter._rebuild(nodes=List(body=tuple(common_dimensions)+iter.nodes)) - dimension_mapper.update({iter: iter_new}) + mapper.update({iter: iter_new}) - return Transformer(dimension_mapper).visit(iet) + return Transformer(mapper).visit(iet) diff --git a/tests/test_petsc.py b/tests/test_petsc.py index af3ee4cf32..197e299fd8 100644 --- a/tests/test_petsc.py +++ b/tests/test_petsc.py @@ -554,7 +554,7 @@ def test_calls_to_callbacks(): @skipif('petsc') -def test_start_prt(): +def test_start_ptr(): """ Verify that a pointer to the start of the memory address is correctly generated for TimeFunction objects. This pointer should indicate the