From 36eb37a59e81d590484fe6547bb8de56eed9f353 Mon Sep 17 00:00:00 2001 From: ZoeLeibowitz Date: Mon, 2 Sep 2024 16:10:34 +0100 Subject: [PATCH] misc: Change file name --- devito/petsc/clusters.py | 2 +- devito/petsc/iet/routines.py | 8 ++++---- devito/petsc/iet/utils.py | 8 ++++---- tests/test_petsc.py | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) 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 6e938b57c9..80b685a50c 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] @@ -211,7 +211,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] @@ -330,7 +330,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