Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function space: fix collapse #3861

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading