MCPcopy Create free account
hub / github.com/FEniCS/dolfinx / collapse

Method collapse

python/dolfinx/fem/function.py:844–853  ·  view source on GitHub ↗

Create a new function space by collapsing a subspace. Returns: A new function space and the map from new to old degrees-of-freedom.

(self)

Source from the content-addressed store, hash-verified

842 return self._mesh
843
844 def collapse(self) -> tuple[FunctionSpace[Real], list[npt.NDArray[np.int32]]]:
845 """Create a new function space by collapsing a subspace.
846
847 Returns:
848 A new function space and the map from new to old
849 degrees-of-freedom.
850 """
851 cpp_space, dofs = self._cpp_object.collapse()
852 V = FunctionSpace(self._mesh, self.ufl_element(), cpp_space)
853 return V, dofs
854
855 def tabulate_dof_coordinates(self) -> npt.NDArray[Real]:
856 """Tabulate coordinates of function space degrees-of-freedom.

Callers

nothing calls this directly

Calls 2

FunctionSpaceClass · 0.70
collapseMethod · 0.45

Tested by

no test coverage detected