@@ -247,15 +247,15 @@ def test_dmda_create():
247247 op3 = Operator (petsc3 , opt = 'noop' )
248248
249249 assert 'PetscCall(DMDACreate1d(PETSC_COMM_WORLD,DM_BOUNDARY_GHOSTED,' + \
250- '2,1,2,NULL,&( da0) ));' in str (op1 )
250+ '2,1,2,NULL,&da0));' in str (op1 )
251251
252252 assert 'PetscCall(DMDACreate2d(PETSC_COMM_WORLD,DM_BOUNDARY_GHOSTED,' + \
253- 'DM_BOUNDARY_GHOSTED,DMDA_STENCIL_BOX,2,2,1,1,1,4,NULL,NULL,&( da0) ));' \
253+ 'DM_BOUNDARY_GHOSTED,DMDA_STENCIL_BOX,2,2,1,1,1,4,NULL,NULL,&da0));' \
254254 in str (op2 )
255255
256256 assert 'PetscCall(DMDACreate3d(PETSC_COMM_WORLD,DM_BOUNDARY_GHOSTED,' + \
257257 'DM_BOUNDARY_GHOSTED,DM_BOUNDARY_GHOSTED,DMDA_STENCIL_BOX,6,5,4' + \
258- ',1,1,1,1,6,NULL,NULL,NULL,&( da0) ));' in str (op3 )
258+ ',1,1,1,1,6,NULL,NULL,NULL,&da0));' in str (op3 )
259259
260260
261261@skipif ('petsc' )
@@ -390,12 +390,12 @@ def test_petsc_frees():
390390 frees = op .body .frees
391391
392392 # Check the frees appear in the following order
393- assert str (frees [0 ]) == 'PetscCall(VecDestroy(&( bglobal0) ));'
394- assert str (frees [1 ]) == 'PetscCall(VecDestroy(&( xglobal0) ));'
395- assert str (frees [2 ]) == 'PetscCall(VecDestroy(&( xlocal0) ));'
396- assert str (frees [3 ]) == 'PetscCall(MatDestroy(&(J0) ));'
397- assert str (frees [4 ]) == 'PetscCall(SNESDestroy(&( snes0) ));'
398- assert str (frees [5 ]) == 'PetscCall(DMDestroy(&( da0) ));'
393+ assert str (frees [0 ]) == 'PetscCall(VecDestroy(&bglobal0));'
394+ assert str (frees [1 ]) == 'PetscCall(VecDestroy(&xglobal0));'
395+ assert str (frees [2 ]) == 'PetscCall(VecDestroy(&xlocal0));'
396+ assert str (frees [3 ]) == 'PetscCall(MatDestroy(&J0 ));'
397+ assert str (frees [4 ]) == 'PetscCall(SNESDestroy(&snes0));'
398+ assert str (frees [5 ]) == 'PetscCall(DMDestroy(&da0));'
399399
400400
401401@skipif ('petsc' )
@@ -863,13 +863,13 @@ def test_coupled_frees(self, n_fields):
863863
864864 # IS Destroy calls
865865 for i in range (n_fields ):
866- assert str (frees [i ]) == f'PetscCall(ISDestroy(&( fields0[{ i } ]) ));'
866+ assert str (frees [i ]) == f'PetscCall(ISDestroy(&fields0[{ i } ]));'
867867 assert str (frees [n_fields ]) == 'PetscCall(PetscFree(fields0));'
868868
869869 # DM Destroy calls
870870 for i in range (n_fields ):
871871 assert str (frees [n_fields + 1 + i ]) == \
872- f'PetscCall(DMDestroy(&( subdms0[{ i } ]) ));'
872+ f'PetscCall(DMDestroy(&subdms0[{ i } ]));'
873873 assert str (frees [n_fields * 2 + 1 ]) == 'PetscCall(PetscFree(subdms0));'
874874
875875 @skipif ('petsc' )
@@ -895,15 +895,15 @@ def test_dmda_dofs(self):
895895
896896 # Check the number of dofs in the DMDA for each field
897897 assert 'PetscCall(DMDACreate2d(PETSC_COMM_WORLD,DM_BOUNDARY_GHOSTED,' + \
898- 'DM_BOUNDARY_GHOSTED,DMDA_STENCIL_BOX,11,11,1,1,1,2,NULL,NULL,&( da0) ));' \
898+ 'DM_BOUNDARY_GHOSTED,DMDA_STENCIL_BOX,11,11,1,1,1,2,NULL,NULL,&da0));' \
899899 in str (op1 )
900900
901901 assert 'PetscCall(DMDACreate2d(PETSC_COMM_WORLD,DM_BOUNDARY_GHOSTED,' + \
902- 'DM_BOUNDARY_GHOSTED,DMDA_STENCIL_BOX,11,11,1,1,2,2,NULL,NULL,&( da0) ));' \
902+ 'DM_BOUNDARY_GHOSTED,DMDA_STENCIL_BOX,11,11,1,1,2,2,NULL,NULL,&da0));' \
903903 in str (op2 )
904904
905905 assert 'PetscCall(DMDACreate2d(PETSC_COMM_WORLD,DM_BOUNDARY_GHOSTED,' + \
906- 'DM_BOUNDARY_GHOSTED,DMDA_STENCIL_BOX,11,11,1,1,3,2,NULL,NULL,&( da0) ));' \
906+ 'DM_BOUNDARY_GHOSTED,DMDA_STENCIL_BOX,11,11,1,1,3,2,NULL,NULL,&da0));' \
907907 in str (op3 )
908908
909909 @skipif ('petsc' )
0 commit comments