Return a sub-function (a view into the ``Function``). Sub-functions are indexed ``i = 0, ..., N-1``, where ``N`` is the number of sub-spaces. Args: i: Index of the sub-function to extract. Returns: A view into the parent ``Function``.
(self, i: int)
| 582 | return self.name |
| 583 | |
| 584 | def sub(self, i: int) -> Function[Scalar]: |
| 585 | """Return a sub-function (a view into the ``Function``). |
| 586 | |
| 587 | Sub-functions are indexed ``i = 0, ..., N-1``, where ``N`` is |
| 588 | the number of sub-spaces. |
| 589 | |
| 590 | Args: |
| 591 | i: Index of the sub-function to extract. |
| 592 | |
| 593 | Returns: |
| 594 | A view into the parent ``Function``. |
| 595 | |
| 596 | Note: |
| 597 | If the sub-Function is re-used, for performance reasons the |
| 598 | returned ``Function`` should be stored by the caller to |
| 599 | avoid repeated re-computation of the subspace. |
| 600 | """ |
| 601 | return Function(self._V.sub(i), self.x, name=f"{self!s}_{i}") |
| 602 | |
| 603 | def split(self) -> tuple[Function[Scalar], ...]: |
| 604 | """Extract (any) sub-functions. |