3131
3232@iet_pass
3333def lower_petsc (iet , ** kwargs ):
34- # Check if PETScSolve was used
34+ # Check if `petscsolve` was used
3535 inject_solve_mapper = MapNodes (Iteration , PetscMetaData ,
3636 'groupby' ).visit (iet )
3737
@@ -55,19 +55,19 @@ def lower_petsc(iet, **kwargs):
5555 unique_grids = {i .expr .rhs .grid for (i ,) in inject_solve_mapper .values ()}
5656 # Assumption is that all solves are on the same grid
5757 if len (unique_grids ) > 1 :
58- raise ValueError ("All PETScSolves must use the same Grid , but multiple found." )
58+ raise ValueError ("All `petscsolve` calls must use the same grid , but multiple grids were found." )
5959 grid = unique_grids .pop ()
6060 devito_mpi = kwargs ['options' ].get ('mpi' , False )
6161 comm = grid .distributor ._obj_comm if devito_mpi else 'PETSC_COMM_WORLD'
6262
63- # Create core PETSc calls (not specific to each PETScSolve )
63+ # Create core PETSc calls (not specific to each `petscsolve` )
6464 core = make_core_petsc_calls (objs , comm )
6565
6666 setup = []
6767 subs = {}
6868 efuncs = {}
6969
70- # Map PETScSolve to its Section (for logging)
70+ # Map each `PetscMetaData`` to its Section (for logging)
7171 section_mapper = MapNodes (Section , PetscMetaData , 'groupby' ).visit (iet )
7272
7373 # Prefixes within the same `Operator` should not be duplicated
@@ -78,7 +78,7 @@ def lower_petsc(iet, **kwargs):
7878 dup_list = ", " .join (repr (p ) for p in sorted (duplicates ))
7979 raise ValueError (
8080 f"The following `options_prefix` values are duplicated "
81- f"among your PETScSolves . Ensure each one is unique: { dup_list } "
81+ f"among your `petscsolve` calls . Ensure each one is unique: { dup_list } "
8282 )
8383
8484 # List of `Call`s to clear options from the global PETSc options database,
0 commit comments