@@ -88,7 +88,7 @@ def _setup(self):
8888 snes_get_ksp = petsc_call ('SNESGetKSP' ,
8989 [sobjs ['snes' ], Byref (sobjs ['ksp' ])])
9090
91- matvec = self .callback_builder .main_matvec_callback
91+ matvec = self .callback_builder .main_matvec_efunc
9292 matvec_operation = petsc_call (
9393 'MatShellSetOperation' ,
9494 [sobjs ['Jac' ], 'MATOP_MULT' , MatShellSetOp (matvec .name , void , void )]
@@ -147,7 +147,7 @@ def _create_dmda_calls(self, dmda):
147147 mainctx = self .solver_objs ['userctx' ]
148148
149149 call_struct_callback = petsc_call (
150- self .callback_builder .user_struct_callback .name , [Byref (mainctx )]
150+ self .callback_builder .user_struct_efunc .name , [Byref (mainctx )]
151151 )
152152
153153 calls_set_app_ctx = petsc_call ('DMSetApplicationContext' , [dmda , Byref (mainctx )])
@@ -238,7 +238,7 @@ def _setup(self):
238238 snes_get_ksp = petsc_call ('SNESGetKSP' ,
239239 [sobjs ['snes' ], Byref (sobjs ['ksp' ])])
240240
241- matvec = self .callback_builder .main_matvec_callback
241+ matvec = self .callback_builder .main_matvec_efunc
242242 matvec_operation = petsc_call (
243243 'MatShellSetOperation' ,
244244 [sobjs ['Jac' ], 'MATOP_MULT' , MatShellSetOp (matvec .name , void , void )]
@@ -259,7 +259,7 @@ def _setup(self):
259259 mainctx = sobjs ['userctx' ]
260260
261261 call_struct_callback = petsc_call (
262- self .callback_builder .user_struct_callback .name , [Byref (mainctx )]
262+ self .callback_builder .user_struct_efunc .name , [Byref (mainctx )]
263263 )
264264
265265 # TODO: maybe don't need to explictly set this
@@ -345,7 +345,7 @@ def _setup(self):
345345 create_submats ) + \
346346 tuple (deref_dms ) + tuple (xglobals ) + tuple (xlocals ) + (BlankLine ,)
347347 return coupled_setup
348-
348+
349349
350350class ConstrainedBCMixin :
351351 """
@@ -359,7 +359,9 @@ def _create_dmda_calls(self, dmda):
359359 dmda_create = self ._create_dmda (dmda )
360360 # TODO: probs need to set the dm options prefix the same as snes?
361361 # don't hardcode this probs? - the dm needs to be specific to the solver as well
362- da_create_section = petsc_call ('PetscOptionsSetValue' , [Null , String ("-da_use_section" ), Null ])
362+ da_create_section = petsc_call (
363+ 'PetscOptionsSetValue' , [Null , String ("-da_use_section" ), Null ]
364+ )
363365 dm_set_from_opts = petsc_call ('DMSetFromOptions' , [dmda ])
364366 dm_setup = petsc_call ('DMSetUp' , [dmda ])
365367 dm_mat_type = petsc_call ('DMSetMatType' , [dmda , 'MATSHELL' ])
@@ -372,24 +374,31 @@ def _create_dmda_calls(self, dmda):
372374 self .callback_builder ._point_bc_efunc .name , [dmda , sobjs ['numBC' ]]
373375 )
374376
375- get_local_section = petsc_call ('DMGetLocalSection' , [dmda , Byref (sobjs ['lsection' ])])
377+ get_local_section = petsc_call (
378+ 'DMGetLocalSection' , [dmda , Byref (sobjs ['lsection' ])]
379+ )
376380
377381 import cgen as c
378382 tmp = c .Line ("PetscCall(PetscSectionView(lsection0, NULL));" )
379383
380384 get_point_sf = petsc_call ('DMGetPointSF' , [dmda , Byref (sobjs ['sf' ])])
381385
382386 create_global_section = petsc_call (
383- 'PetscSectionCreateGlobalSection' , [sobjs ['lsection' ], sobjs ['sf' ], 'PETSC_TRUE' , 'PETSC_FALSE' , 'PETSC_FALSE' , Byref (sobjs ['gsection' ])]
387+ 'PetscSectionCreateGlobalSection' ,
388+ [sobjs ['lsection' ], sobjs ['sf' ], 'PETSC_TRUE' , 'PETSC_FALSE' , 'PETSC_FALSE' ,
389+ Byref (sobjs ['gsection' ])]
384390 )
385391
386- dm_set_global_section = petsc_call ('DMSetGlobalSection' , [ dmda , sobjs [ 'gsection' ]])
387-
388- dm_create_section_sf = petsc_call ( 'DMCreateSectionSF' , [ dmda , sobjs [ 'lsection' ], sobjs [ 'gsection' ]] )
392+ dm_set_global_section = petsc_call (
393+ 'DMSetGlobalSection' , [ dmda , sobjs [ 'gsection' ]]
394+ )
389395
396+ dm_create_section_sf = petsc_call (
397+ 'DMCreateSectionSF' , [dmda , sobjs ['lsection' ], sobjs ['gsection' ]]
398+ )
390399
391400 call_struct_callback = petsc_call (
392- self .callback_builder .user_struct_callback .name , [Byref (mainctx )]
401+ self .callback_builder .user_struct_efunc .name , [Byref (mainctx )]
393402 )
394403
395404 calls_set_app_ctx = petsc_call ('DMSetApplicationContext' , [dmda , Byref (mainctx )])
@@ -411,7 +420,7 @@ def _create_dmda_calls(self, dmda):
411420 dm_set_global_section ,
412421 dm_create_section_sf
413422 )
414-
423+
415424
416425class ConstrainedBCBuilder (ConstrainedBCMixin , BuilderBase ):
417426 pass
0 commit comments