Skip to content

Commit

Permalink
misc: Change file name
Browse files Browse the repository at this point in the history
  • Loading branch information
ZoeLeibowitz committed Sep 5, 2024
1 parent 66b70f1 commit 2fc71fd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion devito/petsc/clusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions devito/petsc/iet/routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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]

Expand Down Expand Up @@ -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]

Expand Down Expand Up @@ -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]

Expand Down
8 changes: 4 additions & 4 deletions devito/petsc/iet/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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)
2 changes: 1 addition & 1 deletion tests/test_petsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2fc71fd

Please sign in to comment.