Skip to content

Commit

Permalink
function space: fix collapse
Browse files Browse the repository at this point in the history
  • Loading branch information
ksagiyam committed Nov 12, 2024
1 parent 29c486d commit 49a4ff1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions firedrake/functionspaceimpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,8 +843,7 @@ def local_to_global_map(self, bcs, lgmap=None):
return PETSc.LGMap().create(indices, bsize=bsize, comm=lgmap.comm)

def collapse(self):
from firedrake import FunctionSpace
return FunctionSpace(self.mesh(), self.ufl_element())
return type(self)(self.mesh(), self.ufl_element())


class RestrictedFunctionSpace(FunctionSpace):
Expand Down Expand Up @@ -1161,8 +1160,7 @@ def _ises(self):
return self.dof_dset.field_ises

def collapse(self):
from firedrake import MixedFunctionSpace
return MixedFunctionSpace([V_ for V_ in self])
return type(self)([V_ for V_ in self], self.mesh())


class ProxyFunctionSpace(FunctionSpace):
Expand Down

0 comments on commit 49a4ff1

Please sign in to comment.