File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -223,16 +223,16 @@ def zero(self, r):
223223 if not currently_zeroed :
224224 self .restore ()
225225
226+
226227def homogenize (bc ):
227- """Create a homogeneous version of a :class:`.DirichletBC` object and return it. If
228- ``bc`` is a list or tuple containing one or more :class:`.DirichletBC` objects,
229- then return a list of the homogeneous versions of those :class:`.DirichletBC`s.
230-
231- :arg bc: a :class:`.DirichletBC`, or list or tuple comprising :class:`.DirichletBC`(s).
232- """
233- if isinstance (bc , (list , tuple )):
234- bcs = bc
235- return [homogenize (bc ) for bc in bcs ]
236- V = bc .function_space ()
237- homogenized_bc = DirichletBC (V , 0 , bc .sub_domain )
238- return homogenized_bc
228+ """Create a homogeneous version of a :class:`.DirichletBC` object and return it. If
229+ ``bc`` is a list or tuple containing one or more :class:`.DirichletBC` objects,
230+ then return a list of the homogeneous versions of those :class:`.DirichletBC`s.
231+
232+ :arg bc: a :class:`.DirichletBC`, or list or tuple comprising :class:`.DirichletBC`(s).
233+ """
234+ if isinstance (bc , (list , tuple )):
235+ return [homogenize (i ) for i in bc ]
236+ V = bc .function_space ()
237+ homogenized_bc = DirichletBC (V , 0 , bc .sub_domain )
238+ return homogenized_bc
You can’t perform that action at this time.
0 commit comments